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

Aleksey Shipilev shade at openjdk.org
Thu Jul 10 12:27:43 UTC 2025


On Thu, 10 Jul 2025 11:21:55 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> 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.
>
> I fixed this.
> I have also added a specialized lambda function to count expected instructions:
> - for disassembled code, just check a line.
> - for hex code, split and count.

Not sure lambdas make this cleaner, TBH.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26072#discussion_r2197580478


More information about the hotspot-compiler-dev mailing list