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

Avoid loading Klass* twice in TypeArrayKlass::oop_size()

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      generic
    • OS:
      generic

      Description

      TypeArrayKlass::oop_size() calls into TypeArrayOopDesc::object_size() which loads the Klass* from the object, but this is not necessary because we're coming from TypeArrayKlass.

      Note: This came up in Lilliput, where we need to be careful how to load the Klass, and must figure out the object size using oopDesc::size_given_klass() without blindly re-loading the Klass*.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rkennke Roman Kennke
              Reporter:
              rkennke Roman Kennke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: