RFR: 8359435: AArch64: add support for SB instruction to MacroAssembler::spin_wait [v2]
    Evgeny Astigeevich 
    eastigeevich at openjdk.org
       
    Wed Jun 25 13:56:10 UTC 2025
    
    
  
On Wed, 25 Jun 2025 13:43:56 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitAArch64.java line 80:
>> 
>>> 78:         OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
>>> 79: 
>>> 80:         if (analyzer.getExitValue() != 0 && "sb".equals(spinWaitInst) && analyzer.contains("CPU does not support SB")) {
>> 
>> The logic here is a bit off. Suppose we _do_ have non-zero exit code for, say, `isb`. This would not fail the test now. Do it something like this instead?
>> 
>> 
>> if ("sb".equals(spinWaitInst) && analyzer.contains("CPU does not support SB")) {
>>     System.out.println("Skipping the test. The current CPU does not support SB instruction.");
>>     return;
>> }
>> 
>> analyzer.shouldHaveExitValue(0);
>
> Thank you, Aleksey for finding this. I accidentally removed `analyzer.shouldHaveExitValue(0)`
Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25801#discussion_r2166779245
    
    
More information about the hotspot-compiler-dev
mailing list