48
49 class GenRemSet: public CHeapObj<mtGC> {
50 friend class Generation;
51
52 BarrierSet* _bs;
53 KlassRemSet _klass_rem_set;
54
55 public:
56 enum Name {
57 CardTable,
58 Other
59 };
60
61 GenRemSet(BarrierSet * bs) : _bs(bs) {}
62 GenRemSet() : _bs(NULL) {}
63
64 virtual Name rs_kind() = 0;
65
66 // These are for dynamic downcasts. Unfortunately that it names the
67 // possible subtypes (but not that they are subtypes!) Return NULL if
68 // the cast is invalide.
69 virtual CardTableRS* as_CardTableRS() { return NULL; }
70
71 // Return the barrier set associated with "this."
72 BarrierSet* bs() { return _bs; }
73
74 // Set the barrier set.
75 void set_bs(BarrierSet* bs) { _bs = bs; }
76
77 KlassRemSet* klass_rem_set() { return &_klass_rem_set; }
78
79 // Do any (sequential) processing necessary to prepare for (possibly
80 // "parallel", if that arg is true) calls to younger_refs_iterate.
81 virtual void prepare_for_younger_refs_iterate(bool parallel) = 0;
82
83 // Apply the "do_oop" method of "blk" to (exactly) all oop locations
84 // 1) that are in objects allocated in "g" at the time of the last call
85 // to "save_Marks", and
86 // 2) that point to objects in younger generations.
87 virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk) = 0;
88
|
48
49 class GenRemSet: public CHeapObj<mtGC> {
50 friend class Generation;
51
52 BarrierSet* _bs;
53 KlassRemSet _klass_rem_set;
54
55 public:
56 enum Name {
57 CardTable,
58 Other
59 };
60
61 GenRemSet(BarrierSet * bs) : _bs(bs) {}
62 GenRemSet() : _bs(NULL) {}
63
64 virtual Name rs_kind() = 0;
65
66 // These are for dynamic downcasts. Unfortunately that it names the
67 // possible subtypes (but not that they are subtypes!) Return NULL if
68 // the cast is invalid.
69 virtual CardTableRS* as_CardTableRS() { return NULL; }
70
71 // Return the barrier set associated with "this."
72 BarrierSet* bs() { return _bs; }
73
74 // Set the barrier set.
75 void set_bs(BarrierSet* bs) { _bs = bs; }
76
77 KlassRemSet* klass_rem_set() { return &_klass_rem_set; }
78
79 // Do any (sequential) processing necessary to prepare for (possibly
80 // "parallel", if that arg is true) calls to younger_refs_iterate.
81 virtual void prepare_for_younger_refs_iterate(bool parallel) = 0;
82
83 // Apply the "do_oop" method of "blk" to (exactly) all oop locations
84 // 1) that are in objects allocated in "g" at the time of the last call
85 // to "save_Marks", and
86 // 2) that point to objects in younger generations.
87 virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk) = 0;
88
|