8268405: Several regressions 4-17% after CHA changes

Reviewed-by: kvn, dlong
This commit is contained in:
Vladimir Ivanov 2021-06-18 07:50:22 +00:00
parent 483f1ee211
commit 7ed3634da8
9 changed files with 61 additions and 41 deletions

View file

@ -1957,7 +1957,9 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* current, jint tr
ScopeDesc* trap_scope = cvf->scope();
if (TraceDeoptimization) {
bool is_receiver_constraint_failure = VerifyReceiverTypes && (reason == Deoptimization::Reason_receiver_constraint);
if (TraceDeoptimization || is_receiver_constraint_failure) {
ttyLocker ttyl;
tty->print_cr(" bci=%d pc=" INTPTR_FORMAT ", relative_pc=" INTPTR_FORMAT ", method=%s" JVMCI_ONLY(", debug_id=%d"), trap_scope->bci(), p2i(fr.pc()), fr.pc() - nm->code_begin(), trap_scope->method()->name_and_sig_as_C_string()
#if INCLUDE_JVMCI
@ -2016,7 +2018,7 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* current, jint tr
trap_method->name_and_sig_as_C_string(), trap_bci, nm->compiler_name());
// Print a bunch of diagnostics, if requested.
if (TraceDeoptimization || LogCompilation) {
if (TraceDeoptimization || LogCompilation || is_receiver_constraint_failure) {
ResourceMark rm;
ttyLocker ttyl;
char buf[100];
@ -2109,6 +2111,10 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* current, jint tr
}
// (End diagnostic printout.)
if (is_receiver_constraint_failure) {
fatal("missing receiver type check");
}
// Load class if necessary
if (unloaded_class_index >= 0) {
constantPoolHandle constants(current, trap_method->constants());
@ -2598,6 +2604,7 @@ const char* Deoptimization::_trap_reason_name[] = {
"rtm_state_change",
"unstable_if",
"unstable_fused_if",
"receiver_constraint",
#if INCLUDE_JVMCI
"aliasing",
"transfer_to_interpreter",