Remove unnecessary oopDesc::klass() calls

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • gc
    • b64

        This is a follow-up cleanup task for the JDK-8075955 patch.

        There are a few places where we, unnecessarily, call oopDesc::klass() even though we already have the Klass*.

        For example:
         void InstanceKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
           assert(obj != NULL, "can't follow the content of NULL object");
         
           PSParallelCompact::follow_klass(cm, obj->klass());

        The call to obj->klass() returns the same address as 'this'.

              Assignee:
              Stefan Karlsson
              Reporter:
              Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: