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

Improve inlining of Klass accessors

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • None
    • hotspot
    • b19

      When linking classes, significant time is spent in klassVtable::initialize_vtable, which calls into Klass::vtable, vtable_start_offset etc. These accessors compile down to what is essentially a few instructions, so moving them to klass.inline.hpp an effective optimization: more or less footprint neutral, and removing calls in numerous places. Other oft-used accessors like Klass::class_loader are also beneficial to inline.

      In one startup test, this reduces instructions retired in initialize_vtable from 88M to 66M alone, while also improving many other call sites to the tune of about a 1% net reduction in instructions retired overall.

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

              Created:
              Updated:
              Resolved: