mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8210498: nmethod entry barriers
Reviewed-by: kvn, pliden
This commit is contained in:
parent
e39c5811b5
commit
0192c14c9b
25 changed files with 699 additions and 4 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "code/codeCache.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "gc/shared/barrierSetNMethod.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
|
@ -1045,6 +1046,13 @@ nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, addr
|
|||
Method* method = last_frame.method();
|
||||
int bci = method->bci_from(last_frame.bcp());
|
||||
nm = method->lookup_osr_nmethod_for(bci, CompLevel_none, false);
|
||||
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
|
||||
if (nm != NULL && bs_nm != NULL) {
|
||||
// in case the transition passed a safepoint we need to barrier this again
|
||||
if (!bs_nm->nmethod_osr_entry_barrier(nm)) {
|
||||
nm = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nm != NULL && thread->is_interp_only_mode()) {
|
||||
// Normally we never get an nm if is_interp_only_mode() is true, because
|
||||
|
@ -1081,6 +1089,13 @@ IRT_ENTRY(nmethod*,
|
|||
nmethod* osr_nm = CompilationPolicy::policy()->event(method, method, branch_bci, bci, CompLevel_none, NULL, thread);
|
||||
assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions");
|
||||
|
||||
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
|
||||
if (osr_nm != NULL && bs_nm != NULL) {
|
||||
if (!bs_nm->nmethod_osr_entry_barrier(osr_nm)) {
|
||||
osr_nm = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (osr_nm != NULL) {
|
||||
// We may need to do on-stack replacement which requires that no
|
||||
// monitors in the activation are biased because their
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue