JDK-8368071 : Compilation throughput regressed 2X-8X after JDK-8355003
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-09-19
  • Updated: 2025-12-10
  • Resolved: 2025-09-22
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 25 JDK 26
25.0.2Fixed 26 b17Fixed
Related Reports
Causes :  
Causes :  
Relates :  
Description
We noticed a large startup performance regression for -XX:+TieredCompilation when comparing JDK 25 vs JDK 21. This regression is obvious and severe for extremely large applications. In our case, the application sets -XX:CICompilerCount=12, and may compile >750K methods in the first hour after startup with JDK 21. With JDK 25, it only compiles ~370K methods in the first hour. In addition, with JDK 25 it takes 8 hours to warm up this application to the same level (in terms of code cache usage and overall throughput) as JDK 21 could do in 1 hour. Performance suffers badly in the first 8 hours because much more code is interpreted instead of JIT compiled.

We also noticed a relevant regression in time spent in compilation (reported by java.ci.totalTime hsperfdata counter) for a separate, moderate-size application. java.ci.totalTime increased by 10-20% with JDK 25, but this application did not notice obvious regression in startup or throughput.

We found the culprit is JDK-8355003. In particular, the change in `CompilationPolicy::common()` that switched `Predicate::apply()` to `Predicate::apply_scaled()` with a scale of 1.0.

`LoopPredicate::apply` and `CallPredicate::apply` are quite different from `LoopPredicate::apply_scaled` and `CallPredicate::apply_scaled`. `apply_scaled` does not have the logic in `CompilationPolicy::threshold_scale()` to adjust the scale based on code cache usage and compilation queue size.


Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk25u/pull/229 Date: 2025-09-22 18:48:08 +0000
22-09-2025

Should we also backport this into 25.0.1 with "jdk25u-critical-request" label?
22-09-2025

[jdk25u-fix-request] Justification: This bug could lead to serious performance regression to large applications. Risk: Low. The bug was introduced in JDK 25, and the fix reverts to the previous behavior. It applies cleanly to jdk25u. Test: Existing tests will cover this change.
22-09-2025

Yes, we need to backport this to 25.
22-09-2025

Changeset: bdfe05b5 Branch: master Author: Man Cao <manc@openjdk.org> Date: 2025-09-22 18:05:48 +0000 URL: https://git.openjdk.org/jdk/commit/bdfe05b595d86c62f7dad78549023a3426423679
22-09-2025

ILW = Significant performance regression with large applications, single reported case, no workaround = HLH = P2
22-09-2025

Consider to backport the fix into JDK 25u after pushing into mainline (26).
19-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27383 Date: 2025-09-19 07:52:16 +0000
19-09-2025