58 int _hash_seed;
59 uint _worker_id;
60
61 // Map from young-age-index (0 == not young, 1 is youngest) to
62 // surviving words. base is what we get back from the malloc call
63 size_t* _surviving_young_words_base;
64 // this points into the array, as we use the first few entries for padding
65 size_t* _surviving_young_words;
66
67 // Indicates whether in the last generation (old) there is no more space
68 // available for allocation.
69 bool _old_gen_is_full;
70
71 #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t))
72
73 DirtyCardQueue& dirty_card_queue() { return _dcq; }
74 G1SATBCardTableModRefBS* ctbs() { return _ct_bs; }
75
76 InCSetState dest(InCSetState original) const {
77 assert(original.is_valid(),
78 err_msg("Original state invalid: " CSETSTATE_FORMAT, original.value()));
79 assert(_dest[original.value()].is_valid_gen(),
80 err_msg("Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value()));
81 return _dest[original.value()];
82 }
83
84 public:
85 G1ParScanThreadState(G1CollectedHeap* g1h, uint worker_id, size_t young_cset_length);
86 ~G1ParScanThreadState();
87
88 void set_ref_processor(ReferenceProcessor* rp) { _scanner.set_ref_processor(rp); }
89
90 #ifdef ASSERT
91 bool queue_is_empty() const { return _refs->is_empty(); }
92
93 bool verify_ref(narrowOop* ref) const;
94 bool verify_ref(oop* ref) const;
95 bool verify_task(StarTask ref) const;
96 #endif // ASSERT
97
98 template <class T> void push_on_queue(T* ref);
99
100 template <class T> void update_rs(HeapRegion* from, T* p, uint tid) {
|
58 int _hash_seed;
59 uint _worker_id;
60
61 // Map from young-age-index (0 == not young, 1 is youngest) to
62 // surviving words. base is what we get back from the malloc call
63 size_t* _surviving_young_words_base;
64 // this points into the array, as we use the first few entries for padding
65 size_t* _surviving_young_words;
66
67 // Indicates whether in the last generation (old) there is no more space
68 // available for allocation.
69 bool _old_gen_is_full;
70
71 #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t))
72
73 DirtyCardQueue& dirty_card_queue() { return _dcq; }
74 G1SATBCardTableModRefBS* ctbs() { return _ct_bs; }
75
76 InCSetState dest(InCSetState original) const {
77 assert(original.is_valid(),
78 "Original state invalid: " CSETSTATE_FORMAT, original.value());
79 assert(_dest[original.value()].is_valid_gen(),
80 "Dest state is invalid: " CSETSTATE_FORMAT, _dest[original.value()].value());
81 return _dest[original.value()];
82 }
83
84 public:
85 G1ParScanThreadState(G1CollectedHeap* g1h, uint worker_id, size_t young_cset_length);
86 ~G1ParScanThreadState();
87
88 void set_ref_processor(ReferenceProcessor* rp) { _scanner.set_ref_processor(rp); }
89
90 #ifdef ASSERT
91 bool queue_is_empty() const { return _refs->is_empty(); }
92
93 bool verify_ref(narrowOop* ref) const;
94 bool verify_ref(oop* ref) const;
95 bool verify_task(StarTask ref) const;
96 #endif // ASSERT
97
98 template <class T> void push_on_queue(T* ref);
99
100 template <class T> void update_rs(HeapRegion* from, T* p, uint tid) {
|