JDK-8064885 : Remove oopDesc inheritance relation from markOopDesc
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-11-14
  • Updated: 2020-09-24
  • Resolved: 2020-09-24
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
For some ancient reason markOop inherits from oopDesc, while not being an oop at all.

This is very confusing, and even misleading since you cannot actually call methods from oopDesc on a markOop because markOop is in essence nothing but an integer.

Further, to avoid name clashes, naming to access the values encoded in this integer is somewhat unnatural or incomplete. I.e. it would be much better if for example it were possible to retrieve the forwarding pointer using a forwardee() method (instead of oop_decode_pointer() because forwardee() is already taken from oopDesc), or is_forwarded() instead of is_marked() because of the same reason.

Remove this inheritance relation, and introduce nice method names to retrieve the components of the various fields and their overloads.