Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8239347

Refactor Symbol to make _length a standalone field again

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 15
    • 12, 13, 14
    • hotspot
    • b12

    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

      Attachments

        Issue Links

          Activity

            People

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: