< prev index next >
src/hotspot/cpu/x86/interp_masm_x86.cpp
Print this page
rev 47415 : Add Thread Local handshakes and thread local polling
*** 33,42 ****
--- 33,43 ----
#include "oops/method.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
+ #include "runtime/safepointMechanism.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/thread.inline.hpp"
// Implementation of InterpreterMacroAssembler
*** 825,836 ****
--- 826,853 ----
}
if (verifyoop) {
verify_oop(rax, state);
}
#ifdef _LP64
+
+ Label no_safepoint, dispatch;
+ address* const safepoint_table = Interpreter::safept_table(state);
+ if (SafepointMechanism::uses_thread_local_poll() && table != safepoint_table) {
+ NOT_PRODUCT(block_comment("Thread-local Safepoint poll"));
+
+ testb(Address(r15_thread, Thread::polling_page_offset()), SafepointMechanism::poll_bit());
+
+ jccb(Assembler::zero, no_safepoint);
+ lea(rscratch1, ExternalAddress((address)safepoint_table));
+ jmpb(dispatch);
+ }
+
+ bind(no_safepoint);
lea(rscratch1, ExternalAddress((address)table));
+ bind(dispatch);
jmp(Address(rscratch1, rbx, Address::times_8));
+
#else
Address index(noreg, rbx, Address::times_ptr);
ExternalAddress tbl((address)table);
ArrayAddress dispatch(tbl, index);
jump(dispatch);
< prev index next >