RFR: 8348570: CTW: Expose the code hidden by uncommon traps [v3]

Aleksey Shipilev shade at openjdk.org
Tue Feb 4 19:35:12 UTC 2025


> 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](https://bugs.openjdk.org/browse/JDK-8348572), which reliably fails with more aggressive compilation mode. **We cannot integrate this PR until that bug is fixed**. But we can discuss if this makes sense, and/or we want some other options included to expand CTW testing.

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge branch 'master' into JDK-8348570-ctw-uncommon-traps
 - Also do markMethodProfiled for extra scope
 - Fix

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/23296/files
  - new: https://git.openjdk.org/jdk/pull/23296/files/5247bec7..78fa50c4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23296&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23296&range=01-02

  Stats: 40733 lines in 2955 files changed: 18556 ins; 12154 del; 10023 mod
  Patch: https://git.openjdk.org/jdk/pull/23296.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23296/head:pull/23296

PR: https://git.openjdk.org/jdk/pull/23296


More information about the hotspot-compiler-dev mailing list