162 // to hold _m, and the fine-grain table to be full.
163 PerRegionTable* delete_region_table();
164
165 // If a PRT for "hr" is in the bucket list indicated by "ind" (which must
166 // be the correct index for "hr"), delete it and return true; else return
167 // false.
168 bool del_single_region_table(size_t ind, HeapRegion* hr);
169
170 // link/add the given fine grain remembered set into the "all" list
171 void link_to_all(PerRegionTable * prt);
172 // unlink/remove the given fine grain remembered set into the "all" list
173 void unlink_from_all(PerRegionTable * prt);
174
175 public:
176 OtherRegionsTable(HeapRegion* hr, Mutex* m);
177
178 HeapRegion* hr() const { return _hr; }
179
180 // For now. Could "expand" some tables in the future, so that this made
181 // sense.
182 void add_reference(OopOrNarrowOopStar from, int tid);
183
184 // Removes any entries shown by the given bitmaps to contain only dead
185 // objects.
186 void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm);
187
188 // Returns whether this remembered set (and all sub-sets) contain no entries.
189 bool is_empty() const;
190
191 size_t occupied() const;
192 size_t occ_fine() const;
193 size_t occ_coarse() const;
194 size_t occ_sparse() const;
195
196 static jint n_coarsenings() { return _n_coarsenings; }
197
198 // Returns size in bytes.
199 // Not const because it takes a lock.
200 size_t mem_size() const;
201 static size_t static_mem_size();
202 static size_t fl_mem_size();
284 return _other_regions.occupied();
285 }
286 size_t occ_fine() const {
287 return _other_regions.occ_fine();
288 }
289 size_t occ_coarse() const {
290 return _other_regions.occ_coarse();
291 }
292 size_t occ_sparse() const {
293 return _other_regions.occ_sparse();
294 }
295
296 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); }
297
298 // Used in the sequential case.
299 void add_reference(OopOrNarrowOopStar from) {
300 _other_regions.add_reference(from, 0);
301 }
302
303 // Used in the parallel case.
304 void add_reference(OopOrNarrowOopStar from, int tid) {
305 _other_regions.add_reference(from, tid);
306 }
307
308 // Removes any entries shown by the given bitmaps to contain only dead
309 // objects.
310 void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm);
311
312 // The region is being reclaimed; clear its remset, and any mention of
313 // entries for this region in other remsets.
314 void clear();
315 void clear_locked();
316
317 // Attempt to claim the region. Returns true iff this call caused an
318 // atomic transition from Unclaimed to Claimed.
319 bool claim_iter();
320 // Sets the iteration state to "complete".
321 void set_iter_complete();
322 // Returns "true" iff the region's iteration is complete.
323 bool iter_is_complete();
324
|
162 // to hold _m, and the fine-grain table to be full.
163 PerRegionTable* delete_region_table();
164
165 // If a PRT for "hr" is in the bucket list indicated by "ind" (which must
166 // be the correct index for "hr"), delete it and return true; else return
167 // false.
168 bool del_single_region_table(size_t ind, HeapRegion* hr);
169
170 // link/add the given fine grain remembered set into the "all" list
171 void link_to_all(PerRegionTable * prt);
172 // unlink/remove the given fine grain remembered set into the "all" list
173 void unlink_from_all(PerRegionTable * prt);
174
175 public:
176 OtherRegionsTable(HeapRegion* hr, Mutex* m);
177
178 HeapRegion* hr() const { return _hr; }
179
180 // For now. Could "expand" some tables in the future, so that this made
181 // sense.
182 void add_reference(OopOrNarrowOopStar from, uint tid);
183
184 // Removes any entries shown by the given bitmaps to contain only dead
185 // objects.
186 void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm);
187
188 // Returns whether this remembered set (and all sub-sets) contain no entries.
189 bool is_empty() const;
190
191 size_t occupied() const;
192 size_t occ_fine() const;
193 size_t occ_coarse() const;
194 size_t occ_sparse() const;
195
196 static jint n_coarsenings() { return _n_coarsenings; }
197
198 // Returns size in bytes.
199 // Not const because it takes a lock.
200 size_t mem_size() const;
201 static size_t static_mem_size();
202 static size_t fl_mem_size();
284 return _other_regions.occupied();
285 }
286 size_t occ_fine() const {
287 return _other_regions.occ_fine();
288 }
289 size_t occ_coarse() const {
290 return _other_regions.occ_coarse();
291 }
292 size_t occ_sparse() const {
293 return _other_regions.occ_sparse();
294 }
295
296 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); }
297
298 // Used in the sequential case.
299 void add_reference(OopOrNarrowOopStar from) {
300 _other_regions.add_reference(from, 0);
301 }
302
303 // Used in the parallel case.
304 void add_reference(OopOrNarrowOopStar from, uint tid) {
305 _other_regions.add_reference(from, tid);
306 }
307
308 // Removes any entries shown by the given bitmaps to contain only dead
309 // objects.
310 void scrub(CardTableModRefBS* ctbs, BitMap* region_bm, BitMap* card_bm);
311
312 // The region is being reclaimed; clear its remset, and any mention of
313 // entries for this region in other remsets.
314 void clear();
315 void clear_locked();
316
317 // Attempt to claim the region. Returns true iff this call caused an
318 // atomic transition from Unclaimed to Claimed.
319 bool claim_iter();
320 // Sets the iteration state to "complete".
321 void set_iter_complete();
322 // Returns "true" iff the region's iteration is complete.
323 bool iter_is_complete();
324
|