1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.hpp Thu Dec 16 09:14:34 2010 -0800 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.hpp Fri Dec 17 11:26:53 2010 -0800 1.3 @@ -33,6 +33,25 @@ 1.4 typedef GenericTaskQueue<oop> CMTaskQueue; 1.5 typedef GenericTaskQueueSet<CMTaskQueue> CMTaskQueueSet; 1.6 1.7 +// Closure used by CM during concurrent reference discovery 1.8 +// and reference processing (during remarking) to determine 1.9 +// if a particular object is alive. It is primarily used 1.10 +// to determine if referents of discovered reference objects 1.11 +// are alive. An instance is also embedded into the 1.12 +// reference processor as the _is_alive_non_header field 1.13 +class G1CMIsAliveClosure: public BoolObjectClosure { 1.14 + G1CollectedHeap* _g1; 1.15 + public: 1.16 + G1CMIsAliveClosure(G1CollectedHeap* g1) : 1.17 + _g1(g1) 1.18 + {} 1.19 + 1.20 + void do_object(oop obj) { 1.21 + ShouldNotCallThis(); 1.22 + } 1.23 + bool do_object_b(oop obj); 1.24 +}; 1.25 + 1.26 // A generic CM bit map. This is essentially a wrapper around the BitMap 1.27 // class, with one bit per (1<<_shifter) HeapWords. 1.28