diff --git a/src/hotspot/share/gc/z/zBarrierSet.cpp b/src/hotspot/share/gc/z/zBarrierSet.cpp index 9329bb8..9621b90 100644 --- a/src/hotspot/share/gc/z/zBarrierSet.cpp +++ b/src/hotspot/share/gc/z/zBarrierSet.cpp @@ -32,6 +32,7 @@ #include "gc/z/zBarrierSetAssembler.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zHeap.inline.hpp" +#include "gc/z/zNMethodBarrier.hpp" #include "gc/z/zThreadLocalData.hpp" #include "runtime/thread.hpp" @@ -80,3 +81,19 @@ void ZBarrierSet::on_thread_detach(JavaThread* thread) { // Flush and free any remaining mark stacks ZHeap::heap()->mark_flush_and_free(thread); } + +bool ZBarrierSet::needs_nmethod_entry_barrier() const { + return ClassUnloading; +} + +int ZBarrierSet::nmethod_entry_barrier_state() const { + return (int)(ZAddressBadMask >> 32); +} + +ByteSize ZBarrierSet::nmethod_entry_barrier_state_thread_offset() const { + return ZThreadLocalData::address_nmethod_barrier_offset(); +} + +bool ZBarrierSet::on_nmethod_entry_barrier(nmethod* nm, nmethodBarrier* nmbarrier) { + return ZNMethodBarrier::on_nmethod_entry_barrier(nm, nmbarrier); +}