Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 20494:7baf47cb97cb
8048268: G1 Code Root Migration performs poorly
Summary: Replace G1CodeRootSet with a Hashtable based implementation, merge Code Root Migration phase into Code Root Scanning
Reviewed-by: jmasa, brutisso, tschatzl
author | mgerdin |
---|---|
date | Fri, 29 Aug 2014 13:12:21 +0200 |
parents | 1f1d373cd044 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20493:152cf4afc11f | 20494:7baf47cb97cb |
---|---|
351 } | 351 } |
352 | 352 |
353 // Returns the memory occupancy of all static data structures associated | 353 // Returns the memory occupancy of all static data structures associated |
354 // with remembered sets. | 354 // with remembered sets. |
355 static size_t static_mem_size() { | 355 static size_t static_mem_size() { |
356 return OtherRegionsTable::static_mem_size() + G1CodeRootSet::free_chunks_static_mem_size(); | 356 return OtherRegionsTable::static_mem_size() + G1CodeRootSet::static_mem_size(); |
357 } | 357 } |
358 | 358 |
359 // Returns the memory occupancy of all free_list data structures associated | 359 // Returns the memory occupancy of all free_list data structures associated |
360 // with remembered sets. | 360 // with remembered sets. |
361 static size_t fl_mem_size() { | 361 static size_t fl_mem_size() { |
362 return OtherRegionsTable::fl_mem_size() + G1CodeRootSet::free_chunks_mem_size(); | 362 return OtherRegionsTable::fl_mem_size(); |
363 } | 363 } |
364 | 364 |
365 bool contains_reference(OopOrNarrowOopStar from) const { | 365 bool contains_reference(OopOrNarrowOopStar from) const { |
366 return _other_regions.contains_reference(from); | 366 return _other_regions.contains_reference(from); |
367 } | 367 } |
368 | 368 |
369 // Routines for managing the list of code roots that point into | 369 // Routines for managing the list of code roots that point into |
370 // the heap region that owns this RSet. | 370 // the heap region that owns this RSet. |
371 void add_strong_code_root(nmethod* nm); | 371 void add_strong_code_root(nmethod* nm); |
372 void add_strong_code_root_locked(nmethod* nm); | |
372 void remove_strong_code_root(nmethod* nm); | 373 void remove_strong_code_root(nmethod* nm); |
373 | |
374 // During a collection, migrate the successfully evacuated strong | |
375 // code roots that referenced into the region that owns this RSet | |
376 // to the RSets of the new regions that they now point into. | |
377 // Unsuccessfully evacuated code roots are not migrated. | |
378 void migrate_strong_code_roots(); | |
379 | 374 |
380 // Applies blk->do_code_blob() to each of the entries in | 375 // Applies blk->do_code_blob() to each of the entries in |
381 // the strong code roots list | 376 // the strong code roots list |
382 void strong_code_roots_do(CodeBlobClosure* blk) const; | 377 void strong_code_roots_do(CodeBlobClosure* blk) const; |
378 | |
379 void clean_strong_code_roots(HeapRegion* hr); | |
383 | 380 |
384 // Returns the number of elements in the strong code roots list | 381 // Returns the number of elements in the strong code roots list |
385 size_t strong_code_roots_list_length() const { | 382 size_t strong_code_roots_list_length() const { |
386 return _code_roots.length(); | 383 return _code_roots.length(); |
387 } | 384 } |