RFR: Use oopDesc::mark_offset_in_bytes() instead of 0 for addressing mark word
Roman Kennke
rkennke at redhat.com
Thu Oct 13 08:08:45 UTC 2016
There are some places in assembly code where we access the mark word
using Address(obj, 0). Not only is this bad style, but it makes it very
hard to find all accesses of the mark word (that was my problem). Also,
should the object layout ever change in the future (*cough*), this
makes it easier to do.
This patch changes hopefully all the places in x86 and aarch64. In
aarch64, we're cmpxchg'ing the mark word in some places using the
obj_reg as address. I've not put a lea ahead of it, but only an assert
that the mark_offset_in_bytes() == 0.
This is not strictly a shenandoah specific patch, but I need it in our
repos for upcoming patches. Not sure if it's useful to propose upstream
at this point in jdk9 dev? Also, it would probably require fixing ppc
and sparc as well, which I have currently no desire to do ;-)
http://cr.openjdk.java.net/~rkennke/markoffset/webrev.00/
Ok to commit?
Roman
More information about the shenandoah-dev
mailing list