JDK-8199735 : Mark word updates need to use Access API
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-03-16
  • Updated: 2021-08-18
  • Resolved: 2018-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently, the mark word is accessed directly in oopDesc::mark() set_mark() and a bunch of other accessors. Those need to use the Access API instead because GC might want to employ barriers on those accesses, pretty much like every other field in oopDesc.


Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/a47d1e21b3f1 User: jwilhelm Date: 2018-04-17 16:01:04 +0000
17-04-2018

URL: http://hg.openjdk.java.net/jdk/hs/rev/a47d1e21b3f1 User: eosterlund Date: 2018-04-09 12:36:32 +0000
09-04-2018

No, you misunderstood. The header itself is kindof like just another field in oop. Accessing it should go through Access. I've got a patch which should illustrate it. Stay tuned :-)
19-03-2018

markOop is not an oop, so I am not sure it needs any barriers. It is just the word in the header of an oop. Every time you use the markOop as an oop you are very likely to have done something wrong. See also JDK-8064885 for more information.
19-03-2018