95 // partitioning the work to be done. It should be the same as |
95 // partitioning the work to be done. It should be the same as |
96 // the "i" passed to the calling thread's work(i) function. |
96 // the "i" passed to the calling thread's work(i) function. |
97 // In the sequential case this param will be ignored. |
97 // In the sequential case this param will be ignored. |
98 void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, |
98 void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, |
99 CodeBlobToOopClosure* code_root_cl, |
99 CodeBlobToOopClosure* code_root_cl, |
100 int worker_i); |
100 uint worker_i); |
101 |
101 |
102 // Prepare for and cleanup after an oops_into_collection_set_do |
102 // Prepare for and cleanup after an oops_into_collection_set_do |
103 // call. Must call each of these once before and after (in sequential |
103 // call. Must call each of these once before and after (in sequential |
104 // code) any threads call oops_into_collection_set_do. (This offers an |
104 // code) any threads call oops_into_collection_set_do. (This offers an |
105 // opportunity to sequential setup and teardown of structures needed by a |
105 // opportunity to sequential setup and teardown of structures needed by a |
107 void prepare_for_oops_into_collection_set_do(); |
107 void prepare_for_oops_into_collection_set_do(); |
108 void cleanup_after_oops_into_collection_set_do(); |
108 void cleanup_after_oops_into_collection_set_do(); |
109 |
109 |
110 void scanRS(OopsInHeapRegionClosure* oc, |
110 void scanRS(OopsInHeapRegionClosure* oc, |
111 CodeBlobToOopClosure* code_root_cl, |
111 CodeBlobToOopClosure* code_root_cl, |
112 int worker_i); |
112 uint worker_i); |
113 |
113 |
114 void updateRS(DirtyCardQueue* into_cset_dcq, int worker_i); |
114 void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i); |
115 |
115 |
116 CardTableModRefBS* ct_bs() { return _ct_bs; } |
116 CardTableModRefBS* ct_bs() { return _ct_bs; } |
117 size_t cardsScanned() { return _total_cards_scanned; } |
117 size_t cardsScanned() { return _total_cards_scanned; } |
118 |
118 |
119 // Record, if necessary, the fact that *p (where "p" is in region "from", |
119 // Record, if necessary, the fact that *p (where "p" is in region "from", |
136 // Refine the card corresponding to "card_ptr". |
136 // Refine the card corresponding to "card_ptr". |
137 // If check_for_refs_into_cset is true, a true result is returned |
137 // If check_for_refs_into_cset is true, a true result is returned |
138 // if the given card contains oops that have references into the |
138 // if the given card contains oops that have references into the |
139 // current collection set. |
139 // current collection set. |
140 virtual bool refine_card(jbyte* card_ptr, |
140 virtual bool refine_card(jbyte* card_ptr, |
141 int worker_i, |
141 uint worker_i, |
142 bool check_for_refs_into_cset); |
142 bool check_for_refs_into_cset); |
143 |
143 |
144 // Print accumulated summary info from the start of the VM. |
144 // Print accumulated summary info from the start of the VM. |
145 virtual void print_summary_info(); |
145 virtual void print_summary_info(); |
146 |
146 |
169 }; |
169 }; |
170 |
170 |
171 class UpdateRSOopClosure: public ExtendedOopClosure { |
171 class UpdateRSOopClosure: public ExtendedOopClosure { |
172 HeapRegion* _from; |
172 HeapRegion* _from; |
173 G1RemSet* _rs; |
173 G1RemSet* _rs; |
174 int _worker_i; |
174 uint _worker_i; |
175 |
175 |
176 template <class T> void do_oop_work(T* p); |
176 template <class T> void do_oop_work(T* p); |
177 |
177 |
178 public: |
178 public: |
179 UpdateRSOopClosure(G1RemSet* rs, int worker_i = 0) : |
179 UpdateRSOopClosure(G1RemSet* rs, uint worker_i = 0) : |
180 _from(NULL), _rs(rs), _worker_i(worker_i) |
180 _from(NULL), _rs(rs), _worker_i(worker_i) |
181 {} |
181 {} |
182 |
182 |
183 void set_from(HeapRegion* from) { |
183 void set_from(HeapRegion* from) { |
184 assert(from != NULL, "from region must be non-NULL"); |
184 assert(from != NULL, "from region must be non-NULL"); |