|
@@ -1516,7 +1516,7 @@ void Deoptimization::deoptimize_single_frame(JavaThread* thread, frame fr, Deopt |
|
|
fr.deoptimize(thread); |
|
|
} |
|
|
|
|
|
void Deoptimization::deoptimize(JavaThread* thread, frame fr, RegisterMap *map, DeoptReason reason) { |
|
|
void Deoptimization::deoptimize(JavaThread* thread, frame fr, DeoptReason reason) { |
|
|
// Deoptimize only if the frame comes from compile code. |
|
|
// Do not deoptimize the frame which is already patched |
|
|
// during the execution of the loops below. |
|
@@ -1534,15 +1534,15 @@ address Deoptimization::deoptimize_for_missing_exception_handler(CompiledMethod* |
|
|
cm->make_not_entrant(); |
|
|
|
|
|
// Use Deoptimization::deoptimize for all of its side-effects: |
|
|
// revoking biases of monitors, gathering traps statistics, logging... |
|
|
// gathering traps statistics, logging... |
|
|
// it also patches the return pc but we do not care about that |
|
|
// since we return a continuation to the deopt_blob below. |
|
|
JavaThread* thread = JavaThread::current(); |
|
|
RegisterMap reg_map(thread, UseBiasedLocking); |
|
|
RegisterMap reg_map(thread, false); |
|
|
frame runtime_frame = thread->last_frame(); |
|
|
frame caller_frame = runtime_frame.sender(®_map); |
|
|
assert(caller_frame.cb()->as_compiled_method_or_null() == cm, "expect top frame compiled method"); |
|
|
Deoptimization::deoptimize(thread, caller_frame, ®_map, Deoptimization::Reason_not_compiled_exception_handler); |
|
|
Deoptimization::deoptimize(thread, caller_frame, Deoptimization::Reason_not_compiled_exception_handler); |
|
|
|
|
|
MethodData* trap_mdo = get_method_data(thread, methodHandle(thread, cm->method()), true); |
|
|
if (trap_mdo != NULL) { |
|
@@ -1557,12 +1557,12 @@ void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id, |
|
|
assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(), |
|
|
"can only deoptimize other thread at a safepoint"); |
|
|
// Compute frame and register map based on thread and sp. |
|
|
RegisterMap reg_map(thread, UseBiasedLocking); |
|
|
RegisterMap reg_map(thread, false); |
|
|
frame fr = thread->last_frame(); |
|
|
while (fr.id() != id) { |
|
|
fr = fr.sender(®_map); |
|
|
} |
|
|
deoptimize(thread, fr, ®_map, reason); |
|
|
deoptimize(thread, fr, reason); |
|
|
} |
|
|
|
|
|
|
|
|