JDK-8239347 : Refactor Symbol to make _length a standalone field again
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-02-18
  • Updated: 2020-02-27
  • Resolved: 2020-02-20
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 15
15 b12Fixed
Related Reports
Relates :  
Description
JDK-8207359 merged Symbol::_refcount and _length into a single field. We should refactor this to instead pack _refcount and _identity_hash, leaving _length as a standalone field.

_length is used in a lot more places, so not having to call a method to extract the value using shifts results in a code size reduction and potential speed-up. Except for a path only used when dumping CDS archives, _identity_hash is only accessed in one place, and there in conjunction with an access to length. 

External tools like async-profiler[1] have been found to depend on Symbol::_length, which broke and required a fix in JDK 12. I haven't found any tools that care about the _identity_hash and _refcount fields, though.

[1] https://github.com/jvm-profiling-tools/async-profiler
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/d23e418e91fe User: redestad Date: 2020-02-20 12:16:36 +0000
20-02-2020

It seems async-profiler was fixed recently: https://github.com/jvm-profiling-tools/async-profiler/pull/217
18-02-2020

Patch: http://cr.openjdk.java.net/~redestad/8239347/open.00/
18-02-2020