8257910: [JVMCI] Set exception_seen accordingly in the runtime.

Reviewed-by: kvn
This commit is contained in:
Yudi Zheng 2020-12-10 22:43:37 +00:00 committed by Vladimir Kozlov
parent e90d0d1da4
commit 58dca9253d
4 changed files with 62 additions and 28 deletions

View file

@ -1731,6 +1731,18 @@ address Deoptimization::deoptimize_for_missing_exception_handler(CompiledMethod*
frame runtime_frame = thread->last_frame();
frame caller_frame = runtime_frame.sender(&reg_map);
assert(caller_frame.cb()->as_compiled_method_or_null() == cm, "expect top frame compiled method");
vframe* vf = vframe::new_vframe(&caller_frame, &reg_map, thread);
compiledVFrame* cvf = compiledVFrame::cast(vf);
ScopeDesc* imm_scope = cvf->scope();
MethodData* imm_mdo = get_method_data(thread, methodHandle(thread, imm_scope->method()), true);
if (imm_mdo != NULL) {
ProfileData* pdata = imm_mdo->allocate_bci_to_data(imm_scope->bci(), NULL);
if (pdata != NULL && pdata->is_BitData()) {
BitData* bit_data = (BitData*) pdata;
bit_data->set_exception_seen();
}
}
Deoptimization::deoptimize(thread, caller_frame, Deoptimization::Reason_not_compiled_exception_handler);
MethodData* trap_mdo = get_method_data(thread, methodHandle(thread, cm->method()), true);