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

Remove unnecessary oopDesc::klass() calls

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • 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'.

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

                Created:
                Updated:
                Resolved: