RFR: 8167659: Access of mark word should use oopDesc::mark_offset_in_bytes() instead of '0'

Andrew Haley aph at redhat.com
Fri Oct 14 08:01:25 UTC 2016


On 14/10/16 01:02, David Holmes wrote:

> Hmmm okay. I still dislike the proliferation of that assert, and
> think it should be fixed where possible. I don't know if there is a
> better way to write the code using obj+offset() without actually
> generating the pointless instructions. If the mark offset must
> always be zero then perhaps it should some kind of compile-time
> constant.

I don't think there is.  On ARM, atomic instructions take only the
register indirect addressing mode so there is literally nowhere to put
an offset.  It is possible to change the assembler to make these
instructions take an offset and error out at runtime if that offset
were ever anything other than zero.  However, that's an additional
complication for something I don't expect ever to change.

Andrew.


More information about the hotspot-dev mailing list