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

Optimize Klass::is_shared()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • None
    • hotspot
    • b21

      During itable/vtable initialization, klass->is_shared() is called frequently. Because there's no specialized implementation of Klass::is_shared(), we end up calling MetaspaceObj::is_shared, which walks the list of shared regions.

      JDK-8178351 proposes simplifying MetaspaceObj::is_shared() by doing fewer comparisons. However, in the case of Klass, we can actually use a free bit in Klass::_access_flags to indicate whether the Klass is shared, so we can have an even more optimal implementation of Klass::is_shared().

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: