RFR: 8360936: Test compiler/onSpinWait/TestOnSpinWaitAArch64.java fails after JDK-8359435 [v8]

Aleksey Shipilev shade at openjdk.org
Thu Jul 10 08:44:45 UTC 2025


On Wed, 9 Jul 2025 20:13:57 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> Test compiler/onSpinWait/TestOnSpinWaitAArch64.java needs debug info to identify a position of spin wait instructions in generated code. The test switched to use `XX:CompileCommand=print` instead of `XX:+PrintAssembly` to have assembly only for a tested Java method. In release builds  `XX:+PrintAssembly` prints out debug info but `XX:CompileCommand=print` does not.
>> 
>> This PR reimplements the test to parse instructions and to check them. The test does not rely on debug info anymore.
>> 
>> Tested on Linux and MacOS with and without hsdis:
>> - Fastdebug: test passed
>> - Slowdebug: test passed.
>> - Release: test passed.
>
> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Apply 8360936-cosmetics-1.patch.txt from PR

Marked as reviewed by shade (Reviewer).

test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitAArch64.java line 151:

> 149:         while (iter.hasNext()) {
> 150:             String line = iter.next().trim();
> 151:             if (line.startsWith(";;}")) {

Oh, apologies, I made a little mistake here when playing around with trims. Should be: 
Suggestion:

            if (line.startsWith(";; }")) {


The test probably does not fail because it meets no instructions beyond the spin_wait block. Cleaner to fix it anyway.

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

PR Review: https://git.openjdk.org/jdk/pull/26072#pullrequestreview-3004580240
PR Review Comment: https://git.openjdk.org/jdk/pull/26072#discussion_r2197012939


More information about the hotspot-compiler-dev mailing list