src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp

Print this page

        

@@ -1198,17 +1198,14 @@
   // Check mark and maybe push on marking stack
   template <class T> static inline void mark_and_push(ParCompactionManager* cm,
                                                       T* p);
   template <class T> static inline void adjust_pointer(T* p);
 
-  static void follow_klass(ParCompactionManager* cm, Klass* klass);
-  static void adjust_klass(ParCompactionManager* cm, Klass* klass);
+  static inline void follow_klass(ParCompactionManager* cm, Klass* klass);
 
   static void follow_class_loader(ParCompactionManager* cm,
                                   ClassLoaderData* klass);
-  static void adjust_class_loader(ParCompactionManager* cm,
-                                  ClassLoaderData* klass);
 
   // Compaction support.
   // Return true if p is in the range [beg_addr, end_addr).
   static inline bool is_in(HeapWord* p, HeapWord* beg_addr, HeapWord* end_addr);
   static inline bool is_in(oop* p, HeapWord* beg_addr, HeapWord* end_addr);

@@ -1378,10 +1375,15 @@
       oopDesc::encode_store_heap_oop_not_null(p, new_obj);
     }
   }
 }
 
+inline void PSParallelCompact::follow_klass(ParCompactionManager* cm, Klass* klass) {
+  oop holder = klass->klass_holder();
+  PSParallelCompact::mark_and_push(cm, &holder);
+}
+
 template <class T>
 inline void PSParallelCompact::KeepAliveClosure::do_oop_work(T* p) {
   mark_and_push(_compaction_manager, p);
 }