RFR: 8349191: Test compiler/ciReplay/TestIncrementalInlining.java failed
Damon Fenacci
dfenacci at openjdk.org
Thu Aug 7 08:11:17 UTC 2025
On Wed, 6 Aug 2025 09:14:36 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
> 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`)
LGTM too. Thanks @benoitmaillard!
-------------
Marked as reviewed by dfenacci (Committer).
PR Review: https://git.openjdk.org/jdk/pull/26654#pullrequestreview-3095932441
More information about the hotspot-compiler-dev
mailing list