RFR: 8186670: Implement _onSpinWait() intrinsic for AArch64 [v8]

Andrew Dinn adinn at openjdk.java.net
Tue Sep 28 12:58:06 UTC 2021


On Tue, 28 Sep 2021 11:26:37 GMT, Stuart Monteith <smonteith at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Separate OnSpinWaitImpl into OnSpinWaitInst and OnSpinWaitInstCount
>
> test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitAArch64.java line 87:
> 
>> 85:     private static String getSpinWaitInstHex(String spinWaitInst) {
>> 86:       if ("nop".equals(spinWaitInst)) {
>> 87:           return "1f20 03d5";
> 
> I'm getting the following when running these tests:
> STDERR:
> java.lang.RuntimeException: Wrong instruction 1f20 03d5 count 0!
>   -- expecting 7
>         at compiler.onSpinWait.TestOnSpinWaitAArch64.checkOutput(TestOnSpinWaitAArch64.java:163)
>         at compiler.onSpinWait.TestOnSpinWaitAArch64.main(TestOnSpinWaitAArch64.java:82)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>         at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
>         at java.base/java.lang.Thread.run(Thread.java:833)
> 
> I have hsdis installed as a matter of course, is the test written assuming hsdis is not present?

Yes, currently it is assumed that hsdis is not present and hence that the disassembly produces hex insns. However, if you install hsdis as part of the build (as I always do) then these tests will fail.  It would really be better if the test looked for the correct hex insns or disassembled insns.

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

PR: https://git.openjdk.java.net/jdk/pull/5562


More information about the hotspot-dev mailing list