comparison src/share/vm/gc_implementation/g1/g1OopClosures.hpp @ 3771:842b840e67db

7046558: G1: concurrent marking optimizations Summary: Some optimizations to improve the concurrent marking phase: specialize the main oop closure, make sure a few methods in the fast path are properly inlined, a few more bits and pieces, and some cosmetic fixes. Reviewed-by: stefank, johnc
author tonyp
date Tue, 14 Jun 2011 10:33:43 -0400
parents ae5b2f1dcf12
children eeae91c9baba
comparison
equal deleted inserted replaced
3770:74cd10898bea 3771:842b840e67db
31 class ConcurrentMark; 31 class ConcurrentMark;
32 class DirtyCardToOopClosure; 32 class DirtyCardToOopClosure;
33 class CMBitMap; 33 class CMBitMap;
34 class CMMarkStack; 34 class CMMarkStack;
35 class G1ParScanThreadState; 35 class G1ParScanThreadState;
36 class CMTask;
36 37
37 // A class that scans oops in a given heap region (much as OopsInGenClosure 38 // A class that scans oops in a given heap region (much as OopsInGenClosure
38 // scans oops in a generation.) 39 // scans oops in a generation.)
39 class OopsInHeapRegionClosure: public OopsInGenClosure { 40 class OopsInHeapRegionClosure: public OopsInGenClosure {
40 protected: 41 protected:
174 bool apply_to_weak_ref_discovered_field() { return true; } 175 bool apply_to_weak_ref_discovered_field() { return true; }
175 bool do_header() { return false; } 176 bool do_header() { return false; }
176 int out_of_region() { return _out_of_region; } 177 int out_of_region() { return _out_of_region; }
177 }; 178 };
178 179
180 // Closure for iterating over object fields during concurrent marking
181 class G1CMOopClosure : public OopClosure {
182 G1CollectedHeap* _g1h;
183 ConcurrentMark* _cm;
184 CMTask* _task;
185 public:
186 G1CMOopClosure(G1CollectedHeap* g1h, ConcurrentMark* cm, CMTask* task);
187 template <class T> void do_oop_nv(T* p);
188 virtual void do_oop( oop* p) { do_oop_nv(p); }
189 virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
190 };
191
179 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1OOPCLOSURES_HPP 192 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1OOPCLOSURES_HPP