< prev index next >

src/share/vm/gc_implementation/g1/concurrentMark.hpp

Print this page
rev 7323 : 8069367: Eagerly reclaimed humongous objects left on mark stack
Summary: Prevent eager reclaim of objects that might be on mark stack.
Reviewed-by: brutisso, tschatzl

@@ -1110,10 +1110,12 @@
 
   // Test whether objAddr might have already been passed over by the
   // mark bitmap scan, and so needs to be pushed onto the mark stack.
   bool is_below_finger(HeapWord* objAddr, HeapWord* global_finger) const;
 
+  template<bool scan> void process_grey_object(oop obj);
+
 public:
   // It resets the task; it should be called right at the beginning of
   // a marking phase.
   void reset(CMBitMap* _nextMarkBitMap);
   // it clears all the fields that correspond to a claimed region.

@@ -1162,11 +1164,11 @@
   // It grays the object by marking it and, if necessary, pushing it
   // on the local queue
   inline void deal_with_reference(oop obj);
 
   // It scans an object and visits its children.
-  void scan_object(oop obj);
+  void scan_object(oop obj) { process_grey_object<true>(obj); }
 
   // It pushes an object on the local queue.
   inline void push(oop obj);
 
   // These two move entries to/from the global stack.
< prev index next >