8349915: CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570

Reviewed-by: kvn, chagedorn
This commit is contained in:
Aleksey Shipilev 2025-02-15 07:22:20 +00:00
parent b6443f6ff9
commit 623453647a
2 changed files with 7 additions and 0 deletions

View File

@ -633,6 +633,11 @@ CompileTask* CompilationPolicy::select_task(CompileQueue* compile_queue) {
task = next_task;
continue;
}
if (task->compile_reason() == CompileTask::Reason_Whitebox) {
// Whitebox (CTW) tasks do not participate in rate selection and/or any level
// adjustments. Just return them in order.
return task;
}
Method* method = task->method();
methodHandle mh(Thread::current(), method);
if (task->can_become_stale() && is_stale(t, TieredCompileTaskTimeout, mh) && !is_old(mh)) {

View File

@ -199,6 +199,8 @@ class CompileTask : public CHeapObj<mtCompiler> {
int comp_level() { return _comp_level;}
void set_comp_level(int comp_level) { _comp_level = comp_level;}
CompileReason compile_reason() { return _compile_reason; }
AbstractCompiler* compiler() const;
CompileTask* select_for_compilation();