8209626: [JVMCI] Use implicit exception table for dispatch and printing

Reviewed-by: kvn
This commit is contained in:
Tom Rodriguez 2019-06-07 10:26:21 -07:00
parent f28e32dbe3
commit 38204f9c65
17 changed files with 192 additions and 97 deletions

View file

@ -562,6 +562,7 @@ JVMCI::CodeInstallResult CodeInstaller::gather_metadata(JVMCIObject target, JVMC
metadata.set_pc_desc(_debug_recorder->pcs(), _debug_recorder->pcs_length());
metadata.set_scopes(_debug_recorder->stream()->buffer(), _debug_recorder->data_size());
metadata.set_exception_table(&_exception_handler_table);
metadata.set_implicit_exception_table(&_implicit_exception_table);
RelocBuffer* reloc_buffer = metadata.get_reloc_buffer();
@ -637,7 +638,7 @@ JVMCI::CodeInstallResult CodeInstaller::install(JVMCICompiler* compiler,
JVMCIObject mirror = installed_code;
nmethod* nm = NULL;
result = runtime()->register_method(jvmci_env(), method, nm, entry_bci, &_offsets, _orig_pc_offset, &buffer,
stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table,
stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, &_implicit_exception_table,
compiler, _debug_recorder, _dependencies, id,
has_unsafe_access, _has_wide_vector, compiled_code, mirror,
failed_speculations, speculations, speculations_len);
@ -870,6 +871,10 @@ JVMCI::CodeInstallResult CodeInstaller::initialize_buffer(CodeBuffer& buffer, bo
if (_orig_pc_offset < 0) {
JVMCI_ERROR_OK("method contains safepoint, but has no deopt rescue slot");
}
if (JVMCIENV->equals(reason, jvmci_env()->get_site_InfopointReason_IMPLICIT_EXCEPTION())) {
TRACE_jvmci_4("implicit exception at %i", pc_offset);
_implicit_exception_table.add_deoptimize(pc_offset);
}
} else {
TRACE_jvmci_4("infopoint at %i", pc_offset);
site_Infopoint(buffer, pc_offset, site, JVMCI_CHECK_OK);