RFR: 8341039: compiler/cha/TypeProfileFinalMethod.java fails with assertEquals expected: 0 but was: 2 [v2]
Daniel Lundén
dlunden at openjdk.org
Wed Nov 12 09:33:36 UTC 2025
> The test `compiler/cha/TypeProfileFinalMethod.java` exercises a specific compilation pattern and easily breaks by setting various VM flags (e.g., `-Xcomp`).
>
> ### Changeset
>
> - Make the test flagless.
> - Ensure the test only compiles the intended methods.
> - Fix problems with compiler directives used in the test (incorrect signatures and some directives getting unintentionally shadowed by other directives).
> - Force C2 inlining of a method which the test author likely intended to always be inlined (based on source code comments in the test).
> - Switch argument order in `assertEquals` to make error message correct.
>
> Note for reviewers: A more fundamental rewrite of the test is beyond the scope of this changeset. The objective here is simply to ensure the test runs only in contexts intended by the test author.
>
> ### Testing
>
> - [GitHub Actions](https://github.com/dlunde/jdk/actions/runs/18972906513)
> - `tier1` and HotSpot parts of `tier2` and `tier3` (and additional Oracle-internal testing) on Windows x64, Linux x64, Linux aarch64, macOS x64, and macOS aarch64.
> - Stress testing of the specific test on Windows x64, Linux x64, Linux aarch64, macOS x64, and macOS aarch64.
Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
Update test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java
Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28200/files
- new: https://git.openjdk.org/jdk/pull/28200/files/da0d3140..f92667fc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28200&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28200&range=00-01
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28200.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28200/head:pull/28200
PR: https://git.openjdk.org/jdk/pull/28200
More information about the hotspot-compiler-dev
mailing list