RFR: 8349191: Test compiler/ciReplay/TestIncrementalInlining.java failed
Benoît Maillard
bmaillard at openjdk.org
Wed Aug 6 15:45:00 UTC 2025
This PR fixes a bug caused by synchronization issues in the print inlining system. Individual segments of a single line of output are interleaved with output from other commpile threads, causing tests that parse replay files to fail.
A snippet of a problematic replay file is shown below:
<writer thread='55214'/>
@ 0 compiler.ciReplay.IncrementalInliningTest::level0 (4 bytes) force inline by annotation
@ 0 compiler.ciReplay.IncrementalInliningTest::level1 (4 bytes) inline (hot)
@ 0 compiler.ciReplay.IncrementalInliningTest::level2 (4 bytes)
<writer thread='55217'/>
<make_not_compilable thread='55217' osr='0' level='4' reason='excluded by CompileCommand' method='java.lang.Class isPrimitive ()Z' bytes='5' count='1536' iicount='1536' stamp='0.110'/>
<writer thread='55214'/>
force inline by annotation
@ 0 compiler.ciReplay.IncrementalInliningTest::late (4 bytes) force inline by annotation late inline succeeded
@ 0 compiler.ciReplay.IncrementalInliningTest::level4 (6 bytes) failed to inline: inlining too deep
This makes the output impossible to parse for tests like `compiler/ciReplay/TestIncrementalInlining.java`, as they rely on regular expressions to parse individual lines. Because it is a synchronization issue, the bug quite intermittent and I was only able to reproduce it with mach5 in tier 7.
This bug was caused by [JDK-8319850](https://bugs.openjdk.org/browse/JDK-8319850), as it introduced important changes in the print inlining system. With these changes, individual segments of the output are printed directly to tty, and this risks causing problematic interleavings with multiple compile threads.
My proposed solution is to simply print everything to a `stringStream` first, and then dump it to `tty`. The PR also removes the relevant tests from `ProblemList.txt`.
### Testing
- [x] [GitHub Actions](https://github.com/benoitmaillard/jdk/actions?query=branch%3AJDK-8349191)
- [x] tier1-3, plus some internal testing
- [x] tier7 for the relevant tests (`TestIncrementalInlining.java` and `TestInliningProtectionDomain.java`)
-------------
Commit messages:
- 8349191: Remove relevant tests from ProblemList
- 8349191: Use stringStream to dump output and avoid interleaving
Changes: https://git.openjdk.org/jdk/pull/26654/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26654&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349191
Stats: 7 lines in 2 files changed: 3 ins; 3 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26654.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26654/head:pull/26654
PR: https://git.openjdk.org/jdk/pull/26654
More information about the hotspot-compiler-dev
mailing list