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

Evgeny Astigeevich eastigeevich at openjdk.org
Wed Jul 2 08:47:44 UTC 2025


On Tue, 1 Jul 2025 16:05:07 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. Release builds might not generate needed debug info.
>> 
>> This PR adds a requirement for the test to be run on debug builds only.
>> 
>> Tested:
>> - Fastdebug: test passed
>> - Slowdebug: test passed.
>> - Release: test skipped.
>
> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplify requirement for debug build

> OK, are you able to bisect which change? This fix to only do debug VM needs to be correctly linked to the actual cause, IMO.



> > It looks like `XX:+PrintAssembly` prints out debug info in release builds but `XX:CompileCommand=print` does not. I am switching back to `XX:+PrintAssembly`.
> 
> That's not great. What info do you need, exactly?


  # {method} {0x0000ffff50400378} 'test' '()V' in 'compiler/onSpinWait/TestOnSpinWaitAArch64$Launcher'
  #           [sp+0x20]  (sp of caller)
  0x0000ffff985731c0: ff83 00d1 | fd7b 01a9 | 2803 0018 | 8923 40b9 | 1f01 09eb

  0x0000ffff985731d4: ;*synchronization entry
                      ; - compiler.onSpinWait.TestOnSpinWaitAArch64$Launcher::test at -1 (line 224)
  0x0000ffff985731d4: 2102 0054 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5

  0x0000ffff985731f0: ;*invokestatic onSpinWait {reexecute=0 rethrow=0 return_oop=0}
                      ; - compiler.onSpinWait.TestOnSpinWaitAArch64$Launcher::test at 0 (line 224)
  0x0000ffff985731f0: 1f20 03d5 | fd7b 41a9 | ff83 0091

  0x0000ffff985731fc: ;   {poll_return}
  0x0000ffff985731fc: 8817 40f9 | ff63 28eb | 4800 0054 | c003 5fd6

  0x0000ffff9857320c: ;   {internal_word}
  0x0000ffff9857320c: 88ff ff10 | 88a3 02f9

  0x0000ffff98573214: ;   {runtime_call SafepointBlob}
  0x0000ffff98573214: 5bc3 fe17

  0x0000ffff98573218: ;   {runtime_call Stub::method_entry_barrier}
  0x0000ffff98573218: 0850 96d2 | 480a b3f2 | e8ff dff2 | 0001 3fd6 | ecff ff17


The test searches for `- compiler.onSpinWait.TestOnSpinWaitAArch64$Launcher::test at 0` and `invokestatic onSpinWait`. They identify the place where to search instructions.

Assembly from all builds always has `{poll_return}`. I can use it as a search point.

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

PR Comment: https://git.openjdk.org/jdk/pull/26072#issuecomment-3026996074


More information about the hotspot-compiler-dev mailing list