RFR: 8360936: Test compiler/onSpinWait/TestOnSpinWaitAArch64.java fails after JDK-8359435 [v3]
Aleksey Shipilev
shade at openjdk.org
Mon Jul 7 15:43:42 UTC 2025
On Mon, 7 Jul 2025 15:31:49 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Reimplement checking algo without using debug info
>
> test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitAArch64.java line 179:
>
>> 177: String s = instrReverseIter.previous();
>> 178: instrReverseIter.next();
>> 179: if (instrReverseIter.previous().startsWith(neededAddInst)) {
>
> Multiple issues here:
> - Confusing: what's the use of `s`, did you mean to use it for `startsWith`?
> - Indenting is off
Overall, I think searching for this multi-instruction stencil gets fairly hairy with iterators. Would a more straight-forward looping work?
int found = 0;
for (int c = 0; c < instrs.size() - 2; c++) {
if (instrs.get(c).startsWith(spinWaitInst) &&
instrs.get(c+1).startsWith(neededLdpInst) &&
instrs.get(c+2).startsWith(neededAddInst)) {
found++;
}
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26072#discussion_r2190431170
More information about the hotspot-compiler-dev
mailing list