< prev index next >
src/share/vm/prims/unsafe.cpp
Print this page
rev 14282 : Factor out keep-alive barrier from usual pre-barrier implementations.
*** 43,55 ****
#include "trace/tracing.hpp"
#include "utilities/align.hpp"
#include "utilities/copy.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/macros.hpp"
- #if INCLUDE_ALL_GCS
- #include "gc/g1/g1SATBCardTableModRefBS.hpp"
- #endif // INCLUDE_ALL_GCS
/**
* Implementation of the jdk.internal.misc.Unsafe class
*/
--- 43,52 ----
*** 295,306 ****
}
#endif
static void ensure_satb_referent_alive(oop o, jlong offset, oop v) {
#if INCLUDE_ALL_GCS
! if ((UseG1GC || (UseShenandoahGC && ShenandoahSATBBarrier)) && v != NULL && is_java_lang_ref_Reference_access(o, offset)) {
! G1SATBCardTableModRefBS::enqueue(v);
}
#endif
}
// These functions allow a null base pointer with an arbitrary address.
--- 292,303 ----
}
#endif
static void ensure_satb_referent_alive(oop o, jlong offset, oop v) {
#if INCLUDE_ALL_GCS
! if (v != NULL && is_java_lang_ref_Reference_access(o, offset)) {
! oopDesc::bs()->keep_alive_barrier(v);
}
#endif
}
// These functions allow a null base pointer with an arbitrary address.
< prev index next >