8262323: do not special case JVMCI in tiered compilation policy
Reviewed-by: kvn, never
This commit is contained in:
parent
3022baa953
commit
4f0a12ec87
@ -1054,33 +1054,18 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
if (common<Predicate>(method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
|
if (common<Predicate>(method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
|
||||||
next_level = CompLevel_full_optimization;
|
next_level = CompLevel_full_optimization;
|
||||||
} else if (!CompilationModeFlag::disable_intermediate() && Predicate::apply(i, b, cur_level, method)) {
|
} else if (!CompilationModeFlag::disable_intermediate() && Predicate::apply(i, b, cur_level, method)) {
|
||||||
#if INCLUDE_JVMCI
|
// C1-generated fully profiled code is about 30% slower than the limited profile
|
||||||
if (EnableJVMCI && UseJVMCICompiler) {
|
// code that has only invocation and backedge counters. The observation is that
|
||||||
// Since JVMCI takes a while to warm up, its queue inevitably backs up during
|
// if C2 queue is large enough we can spend too much time in the fully profiled code
|
||||||
// early VM execution. As of 2014-06-13, JVMCI's inliner assumes that the root
|
// while waiting for C2 to pick the method from the queue. To alleviate this problem
|
||||||
// compilation method and all potential inlinees have mature profiles (which
|
// we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long
|
||||||
// includes type profiling). If it sees immature profiles, JVMCI's inliner
|
// we choose to compile a limited profiled version and then recompile with full profiling
|
||||||
// can perform pathologically bad (e.g., causing OutOfMemoryErrors due to
|
// when the load on C2 goes down.
|
||||||
// exploring/inlining too many graphs). Since a rewrite of the inliner is
|
if (!disable_feedback && CompileBroker::queue_size(CompLevel_full_optimization) >
|
||||||
// in progress, we simply disable the dialing back heuristic for now and will
|
Tier3DelayOn * compiler_count(CompLevel_full_optimization)) {
|
||||||
// revisit this decision once the new inliner is completed.
|
next_level = CompLevel_limited_profile;
|
||||||
|
} else {
|
||||||
next_level = CompLevel_full_profile;
|
next_level = CompLevel_full_profile;
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// C1-generated fully profiled code is about 30% slower than the limited profile
|
|
||||||
// code that has only invocation and backedge counters. The observation is that
|
|
||||||
// if C2 queue is large enough we can spend too much time in the fully profiled code
|
|
||||||
// while waiting for C2 to pick the method from the queue. To alleviate this problem
|
|
||||||
// we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long
|
|
||||||
// we choose to compile a limited profiled version and then recompile with full profiling
|
|
||||||
// when the load on C2 goes down.
|
|
||||||
if (!disable_feedback && CompileBroker::queue_size(CompLevel_full_optimization) >
|
|
||||||
Tier3DelayOn * compiler_count(CompLevel_full_optimization)) {
|
|
||||||
next_level = CompLevel_limited_profile;
|
|
||||||
} else {
|
|
||||||
next_level = CompLevel_full_profile;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -451,6 +451,16 @@ void CompilerConfig::set_jvmci_specific_flags() {
|
|||||||
if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
|
if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
|
||||||
FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
|
FLAG_SET_DEFAULT(NewSizeThreadIncrease, MAX2(4*K, NewSizeThreadIncrease));
|
||||||
}
|
}
|
||||||
|
if (FLAG_IS_DEFAULT(Tier3DelayOn)) {
|
||||||
|
// This effectively prevents the compile broker scheduling tier 2
|
||||||
|
// (i.e., limited C1 profiling) compilations instead of tier 3
|
||||||
|
// (i.e., full C1 profiling) compilations when the tier 4 queue
|
||||||
|
// backs up (which is quite likely when using a non-AOT compiled JVMCI
|
||||||
|
// compiler). The observation based on jargraal is that the downside
|
||||||
|
// of skipping full profiling is much worse for performance than the
|
||||||
|
// queue backing up.
|
||||||
|
FLAG_SET_DEFAULT(Tier3DelayOn, 100000);
|
||||||
|
}
|
||||||
} // !UseJVMCINativeLibrary
|
} // !UseJVMCINativeLibrary
|
||||||
} // UseJVMCICompiler
|
} // UseJVMCICompiler
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user