8206953: compiler/profiling/TestTypeProfiling.java fails when JVMCI build disabled
Restore original behavior when C2 is used Reviewed-by: thartmann, mdoerr, dnsimon, gdub
This commit is contained in:
parent
0df02a4cb8
commit
dbb21a2a92
src/hotspot/share/runtime
test/hotspot/jtreg/compiler/profiling
@ -2044,7 +2044,7 @@ Deoptimization::update_method_data_from_interpreter(MethodData* trap_mdo, int tr
|
||||
bool ignore_maybe_prior_recompile;
|
||||
assert(!reason_is_speculate(reason), "reason speculate only used by compiler");
|
||||
// JVMCI uses the total counts to determine if deoptimizations are happening too frequently -> do not adjust total counts
|
||||
bool update_total_counts = JVMCI_ONLY(false) NOT_JVMCI(true);
|
||||
bool update_total_counts = true JVMCI_ONLY( && !UseJVMCICompiler);
|
||||
query_update_method_data(trap_mdo, trap_bci,
|
||||
(DeoptReason)reason,
|
||||
update_total_counts,
|
||||
|
@ -117,22 +117,15 @@ public class TestTypeProfiling {
|
||||
}
|
||||
|
||||
// should deoptimize for speculative type check
|
||||
// Intepreter will also add actual type check trap information into MDO
|
||||
// when it throw ClassCastException
|
||||
if (!deoptimize(method, src_obj)) {
|
||||
throw new RuntimeException(method.getName() + " is not deoptimized");
|
||||
}
|
||||
|
||||
// compile again
|
||||
WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
||||
if (!WHITE_BOX.isMethodCompiled(method)) {
|
||||
throw new RuntimeException(method.getName() + " is not recompiled");
|
||||
}
|
||||
|
||||
// should deoptimize for actual type check
|
||||
if (!deoptimize(method, src_obj)) {
|
||||
throw new RuntimeException(method.getName() + " is not deoptimized (should deoptimize for actual type check)");
|
||||
}
|
||||
|
||||
// compile once again
|
||||
// c2 will generate throw instead of uncommon trap because
|
||||
// actual type check trap information is present in MDO
|
||||
WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
||||
if (!WHITE_BOX.isMethodCompiled(method)) {
|
||||
throw new RuntimeException(method.getName() + " is not recompiled");
|
||||
|
Loading…
x
Reference in New Issue
Block a user