RFR: 8167659: Access of mark word should use oopDesc::mark_offset_in_bytes() instead of '0'
Coleen Phillimore
coleen.phillimore at oracle.com
Thu Oct 13 12:41:40 UTC 2016
Roman,
I really like this change and we can do the other platforms and combine
for 10. Can you file a bug report?
+ assert(oopDesc::mark_offset_in_bytes() == 0, "assumption");
cmpxchgptr(swap_reg, tmp_reg, obj_reg, rscratch1, here, slow_case);
Maybe for aarch64 you can make this a macro assembler instruction? And
either include the assert (which won't really add time during code
generation), or add a comment with this assumption.
Thanks,
Coleen
On 10/13/16 5:40 AM, Roman Kennke wrote:
> In several places in Hotspot's assembly routines, we're using
> Address(obj, 0) to access the object's mark word. This is bad style and
> makes it very hard to find all the places where the mark word is used.
> It should use Address(obj, oopDesc::mark_offset_in_bytes()) instead.
>
> The change addresses the issue in x86 and aarch64. I'm not familiar
> with the othe arches, maybe somebody wants to check and fill them in?
>
> http://cr.openjdk.java.net/~rkennke/markoffset-hs/webrev.00/
>
> Roman
>
More information about the hotspot-dev
mailing list