JDK-8348570 : CTW: Expose the code hidden by uncommon traps
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,21,25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-24
  • Updated: 2025-02-17
  • Resolved: 2025-02-06
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
25 b10Fixed
Related Reports
Blocks :  
Causes :  
Relates :  
Description
We have been looking at some related compiler behaviors, and realized that in the absence of profiling data, C2 routinely uncommon-traps a lot of code that is presumed to be never executed. This apparently is a norm in CTW tests: CTW runners never execute code, and so only the most basic java.base classes are having any profile. This seems to limit the scope of CTW testing.

I think we need to run CTW in the mode that exposes more code to the compiler optimizations.

Case in point:  JDK-8348572, which reliably fails with more aggressive compilation mode.
Comments
Changeset: 10791477 Branch: master Author: Aleksey Shipilev <shade@openjdk.org> Date: 2025-02-06 20:20:43 +0000 URL: https://git.openjdk.org/jdk/commit/10791477cf0a0a31d2703fc718a7a649d494d534
06-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23296 Date: 2025-01-24 11:15:33 +0000
24-01-2025