-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify checkFieldAlignmentForAtomicLong() for inlining atomics #20235
Comments
wrote a simple unit test
and added printfs in meaning that the field offset for integers is also 8 for non-compressed refs. Does this mean that the AtomicInteger methods need a similar check to AtomicLong @r30shah ? |
I think the intent of the check is to guard inlining methods of AtomicLong; the offset of the field needs to be a multiple of the alignment required by the processor. For |
- the "value" field in AtomicLong is of type "long", so it should be aligned to 8-byte boundaries to be used in the atomics intrinsics. Changed offset verification to check for a multiple of 8 instead of a multiple of 4. Closes: eclipse-openj9#20235 Signed-off-by: Matthew Hall <[email protected]>
"value" field for in AtomicLong is of type "long" and therefore should be aligned to 8-byte boundary. checkFieldAlignmentForAtomicLong was incorrectly checking that the offset of the field is a multiple of 4 instead of a multiple of 8. This commit fixes that. Closes: eclipse-openj9#20235 Signed-off-by: Matthew Hall <[email protected]>
"value" field in AtomicLong is of type "long" and therefore should be aligned to 8-byte boundary. checkFieldAlignmentForAtomicLong was incorrectly checking that the offset of the field is a multiple of 4 instead of a multiple of 8. This commit fixes that. Closes: eclipse-openj9#20235 Signed-off-by: Matthew Hall <[email protected]>
Issue Number: 20235 |
"value" field in AtomicLong is of type "long" and therefore should be aligned to 8-byte boundary. checkFieldAlignmentForAtomicLong was incorrectly checking that the offset of the field is a multiple of 4 instead of a multiple of 8. This commit fixes that. Closes: eclipse-openj9#20235 Signed-off-by: Matthew Hall <[email protected]>
"value" field in AtomicLong is of type "long" and therefore should be aligned to 8-byte boundary. checkFieldAlignmentForAtomicLong was incorrectly checking that the offset of the field is a multiple of 4 instead of a multiple of 8. This commit fixes that. Closes: eclipse-openj9#20235 Signed-off-by: Matthew Hall <[email protected]>
The method
checkFieldAlignmentForAtomicLong()
checks for a multiple of 4:However, as this is checking for alignment for an 8 byte field is should probably be checking for a multiple of 8.
Additionally, there is no similar check happening for AtomicInteger in
J9::Z::CodeGenerator::InlineDirecCall
:offset being verified also seems strange: objectheadersize + fieldoffset (instead of just field?)
Opening this issue to track investigation of the correct offset and if the verification is needed for AtomicInteger
@r30shah @keithc-ca
The text was updated successfully, but these errors were encountered: