JDK-8261225 : TieredStopAtLevel should have no effect if TieredCompilation is disabled
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-02-05
  • Updated: 2021-03-02
  • Resolved: 2021-02-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b11Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
If TieredCompilation is disabled, setting TieredStopAtLevel to a value <= CompLevel::CompLevel_full_optimization should not have any effect. However, after JDK-8251462, compilations with a level > TieredStopAtLevel requested via the `enqueueMethodForCompilation` start to fail with:

WB error: invalid compilation level 4

Comments
Changeset: 977a21ad Author: Igor Veresov <iveresov@openjdk.org> Date: 2021-02-19 19:44:58 +0000 URL: https://git.openjdk.java.net/jdk/commit/977a21ad
19-02-2021

I think we can emulate that behavior by making CompilerConfig::is_c1_only() and CompilerConfig::is_c1_simple_only() check TieredCompilation flag in conjunction with the TieredStopAtLevel checks. But we'd need a round of thorough testing to make sure that doesn't break anything.
05-02-2021

Attached tests passes before JDK-8251462 and fails after. [~iveresov] could you please confirm that this is a bug? Thanks.
05-02-2021

ILW = Unexpected behavior of TieredStopAtLevel, with TieredStopAtLevel=1,2,3 and -XX:-TieredCompilation, enable tiered compilation = MLM = P4
05-02-2021