RFR: 8358572: C1 hits "need debug information" assert with -XX:-DeoptC1

Manuel Hässig mhaessig at openjdk.org
Thu Jun 19 15:04:06 UTC 2025


The debug flag `DeoptC1` is required to be true for dependency recording by an assert, but not all uses of dependency recording in C1 are guarded with `if (DeoptC1)`. Hence, running `java -XX:-DeoptC1 -version`fails at the aforementioned assert.

This error has been present unconditionally in debug builds since dependency recording was enabled outside of JVMTI in [JDK-8324241]([https://bugs.openjdk.org/browse/JDK-8324241) and at least since JDK7 with JVMTI. Because this issue was discovered by searching for crashes of `java -version` plus some other flag, which indicates this flag has not been used in at least one year since every invocation with `-XX:-DeoptC1`crashes. Further, `DeoptC1` is only used for guarding dependency recording in three places. Thus, this PR removes the `DeoptC1` flag.

This was tested with:
 - [ ] [Github Actions](https://github.com/mhaessig/jdk/actions/runs/15760179189)
 - [x] tier1, tier2 plus Oracle internal testing on Oracle supported platforms

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

Commit messages:
 - Remove DeoptC1 debug flag

Changes: https://git.openjdk.org/jdk/pull/25900/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25900&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358572
  Stats: 7 lines in 3 files changed: 0 ins; 4 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/25900.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25900/head:pull/25900

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


More information about the hotspot-compiler-dev mailing list