hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
changeset 25492 d27050bdfb04
parent 25491 70fb742e40aa
child 25889 221296ac4359
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Mon Jul 07 12:37:11 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Mon Jul 07 10:12:40 2014 +0200
@@ -931,7 +931,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");
 }