347 } |
347 } |
348 |
348 |
349 // Returns the memory occupancy of all static data structures associated |
349 // Returns the memory occupancy of all static data structures associated |
350 // with remembered sets. |
350 // with remembered sets. |
351 static size_t static_mem_size() { |
351 static size_t static_mem_size() { |
352 return OtherRegionsTable::static_mem_size() + G1CodeRootSet::free_chunks_static_mem_size(); |
352 return OtherRegionsTable::static_mem_size() + G1CodeRootSet::static_mem_size(); |
353 } |
353 } |
354 |
354 |
355 // Returns the memory occupancy of all free_list data structures associated |
355 // Returns the memory occupancy of all free_list data structures associated |
356 // with remembered sets. |
356 // with remembered sets. |
357 static size_t fl_mem_size() { |
357 static size_t fl_mem_size() { |
358 return OtherRegionsTable::fl_mem_size() + G1CodeRootSet::free_chunks_mem_size(); |
358 return OtherRegionsTable::fl_mem_size(); |
359 } |
359 } |
360 |
360 |
361 bool contains_reference(OopOrNarrowOopStar from) const { |
361 bool contains_reference(OopOrNarrowOopStar from) const { |
362 return _other_regions.contains_reference(from); |
362 return _other_regions.contains_reference(from); |
363 } |
363 } |
364 |
364 |
365 // Routines for managing the list of code roots that point into |
365 // Routines for managing the list of code roots that point into |
366 // the heap region that owns this RSet. |
366 // the heap region that owns this RSet. |
367 void add_strong_code_root(nmethod* nm); |
367 void add_strong_code_root(nmethod* nm); |
|
368 void add_strong_code_root_locked(nmethod* nm); |
368 void remove_strong_code_root(nmethod* nm); |
369 void remove_strong_code_root(nmethod* nm); |
369 |
|
370 // During a collection, migrate the successfully evacuated strong |
|
371 // code roots that referenced into the region that owns this RSet |
|
372 // to the RSets of the new regions that they now point into. |
|
373 // Unsuccessfully evacuated code roots are not migrated. |
|
374 void migrate_strong_code_roots(); |
|
375 |
370 |
376 // Applies blk->do_code_blob() to each of the entries in |
371 // Applies blk->do_code_blob() to each of the entries in |
377 // the strong code roots list |
372 // the strong code roots list |
378 void strong_code_roots_do(CodeBlobClosure* blk) const; |
373 void strong_code_roots_do(CodeBlobClosure* blk) const; |
|
374 |
|
375 void clean_strong_code_roots(HeapRegion* hr); |
379 |
376 |
380 // Returns the number of elements in the strong code roots list |
377 // Returns the number of elements in the strong code roots list |
381 size_t strong_code_roots_list_length() const { |
378 size_t strong_code_roots_list_length() const { |
382 return _code_roots.length(); |
379 return _code_roots.length(); |
383 } |
380 } |