diff src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @ 20278:2c6ef90f030a

8049421: G1 Class Unloading after completing a concurrent mark cycle Reviewed-by: tschatzl, ehelin, brutisso, coleenp, roland, iveresov Contributed-by: stefan.karlsson@oracle.com, mikael.gerdin@oracle.com
author stefank
date Mon, 07 Jul 2014 10:12:40 +0200
parents 828056cf311f
children a3953c777565
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Tue Jul 01 09:03:55 2014 +0200
+++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Mon Jul 07 10:12:40 2014 +0200
@@ -929,7 +929,10 @@
 
 void HeapRegionRemSet::remove_strong_code_root(nmethod* nm) {
   assert(nm != NULL, "sanity");
-  _code_roots.remove(nm);
+  assert_locked_or_safepoint(CodeCache_lock);
+
+  _code_roots.remove_lock_free(nm);
+
   // Check that there were no duplicates
   guarantee(!_code_roots.contains(nm), "duplicate entry found");
 }