< prev index next >
src/share/vm/prims/resolvedMethodTable.cpp
Print this page
rev 14282 : Factor out keep-alive barrier from usual pre-barrier implementations.
@@ -31,13 +31,10 @@
#include "prims/resolvedMethodTable.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"
-#if INCLUDE_ALL_GCS
-#include "gc/g1/g1SATBCardTableModRefBS.hpp"
-#endif
ResolvedMethodTable::ResolvedMethodTable()
: Hashtable<oop, mtClass>(_table_size, sizeof(ResolvedMethodEntry)) { }
@@ -74,12 +71,12 @@
static void ensure_oop_alive(oop mname) {
// A lookup in the ResolvedMethodTable could return an object that was previously
// considered dead. The SATB part of G1 needs to get notified about this
// potential resurrection, otherwise the marking might not find the object.
#if INCLUDE_ALL_GCS
- if ((UseG1GC || (UseShenandoahGC && ShenandoahSATBBarrier)) && mname != NULL) {
- G1SATBCardTableModRefBS::enqueue(mname);
+ if (mname != NULL) {
+ oopDesc::bs()->keep_alive_barrier(mname);
}
#endif
}
oop ResolvedMethodTable::basic_add(Method* method, oop rmethod_name) {
< prev index next >