diff src/share/vm/gc_implementation/g1/heapRegion.cpp @ 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 c02ec279b062
children 0fcaab91d485
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Aug 29 13:08:01 2014 +0200
+++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Aug 29 13:12:21 2014 +0200
@@ -549,21 +549,17 @@
   hrrs->add_strong_code_root(nm);
 }
 
+void HeapRegion::add_strong_code_root_locked(nmethod* nm) {
+  assert_locked_or_safepoint(CodeCache_lock);
+  HeapRegionRemSet* hrrs = rem_set();
+  hrrs->add_strong_code_root_locked(nm);
+}
+
 void HeapRegion::remove_strong_code_root(nmethod* nm) {
   HeapRegionRemSet* hrrs = rem_set();
   hrrs->remove_strong_code_root(nm);
 }
 
-void HeapRegion::migrate_strong_code_roots() {
-  assert(in_collection_set(), "only collection set regions");
-  assert(!isHumongous(),
-          err_msg("humongous region "HR_FORMAT" should not have been added to collection set",
-                  HR_FORMAT_PARAMS(this)));
-
-  HeapRegionRemSet* hrrs = rem_set();
-  hrrs->migrate_strong_code_roots();
-}
-
 void HeapRegion::strong_code_roots_do(CodeBlobClosure* blk) const {
   HeapRegionRemSet* hrrs = rem_set();
   hrrs->strong_code_roots_do(blk);