27
28 #include "gc_implementation/g1/heapRegionSets.hpp"
29 #include "utilities/taskqueue.hpp"
30
31 class G1CollectedHeap;
32 class CMTask;
33 typedef GenericTaskQueue<oop, mtGC> CMTaskQueue;
34 typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet;
35
36 // Closure used by CM during concurrent reference discovery
37 // and reference processing (during remarking) to determine
38 // if a particular object is alive. It is primarily used
39 // to determine if referents of discovered reference objects
40 // are alive. An instance is also embedded into the
41 // reference processor as the _is_alive_non_header field
42 class G1CMIsAliveClosure: public BoolObjectClosure {
43 G1CollectedHeap* _g1;
44 public:
45 G1CMIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) { }
46
47 void do_object(oop obj) {
48 ShouldNotCallThis();
49 }
50 bool do_object_b(oop obj);
51 };
52
53 // A generic CM bit map. This is essentially a wrapper around the BitMap
54 // class, with one bit per (1<<_shifter) HeapWords.
55
56 class CMBitMapRO VALUE_OBJ_CLASS_SPEC {
57 protected:
58 HeapWord* _bmStartWord; // base address of range covered by map
59 size_t _bmWordSize; // map size (in #HeapWords covered)
60 const int _shifter; // map to char or bit
61 VirtualSpace _virtual_space; // underlying the bit map
62 BitMap _bm; // the bit map itself
63
64 public:
65 // constructor
66 CMBitMapRO(int shifter);
67
68 enum { do_yield = true };
69
|
27
28 #include "gc_implementation/g1/heapRegionSets.hpp"
29 #include "utilities/taskqueue.hpp"
30
31 class G1CollectedHeap;
32 class CMTask;
33 typedef GenericTaskQueue<oop, mtGC> CMTaskQueue;
34 typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet;
35
36 // Closure used by CM during concurrent reference discovery
37 // and reference processing (during remarking) to determine
38 // if a particular object is alive. It is primarily used
39 // to determine if referents of discovered reference objects
40 // are alive. An instance is also embedded into the
41 // reference processor as the _is_alive_non_header field
42 class G1CMIsAliveClosure: public BoolObjectClosure {
43 G1CollectedHeap* _g1;
44 public:
45 G1CMIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) { }
46
47 bool do_object_b(oop obj);
48 };
49
50 // A generic CM bit map. This is essentially a wrapper around the BitMap
51 // class, with one bit per (1<<_shifter) HeapWords.
52
53 class CMBitMapRO VALUE_OBJ_CLASS_SPEC {
54 protected:
55 HeapWord* _bmStartWord; // base address of range covered by map
56 size_t _bmWordSize; // map size (in #HeapWords covered)
57 const int _shifter; // map to char or bit
58 VirtualSpace _virtual_space; // underlying the bit map
59 BitMap _bm; // the bit map itself
60
61 public:
62 // constructor
63 CMBitMapRO(int shifter);
64
65 enum { do_yield = true };
66
|