Improve inlining of Klass accessors

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 14
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: