src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
Print this page
*** 929,939 ****
_code_roots.add(nm);
}
void HeapRegionRemSet::remove_strong_code_root(nmethod* nm) {
assert(nm != NULL, "sanity");
! _code_roots.remove(nm);
// Check that there were no duplicates
guarantee(!_code_roots.contains(nm), "duplicate entry found");
}
class NMethodMigrationOopClosure : public OopClosure {
--- 929,942 ----
_code_roots.add(nm);
}
void HeapRegionRemSet::remove_strong_code_root(nmethod* nm) {
assert(nm != NULL, "sanity");
! 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");
}
class NMethodMigrationOopClosure : public OopClosure {