RFR: 8330806: test/hotspot/jtreg/compiler/c1/TestLargeMonitorOffset.java fails on ARM32

Boris Ulasevich bulasevich at openjdk.org
Thu May 2 08:19:53 UTC 2024


On Fri, 26 Apr 2024 15:22:25 GMT, Sergey Nazarkin <snazarki at openjdk.org> wrote:

>> TestLargeMonitorOffset was introduced by 8310844 with a fix for the AArch64 platform. The same issue needs to be fixed for ARM32. With this change, we add the large slot_offset handling to the ARM32 version of IR_Assembler::osr_entry().
>> 
>> Testing: jtreg hotspot, jtreg jdk tier1-3.
>
> src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp line 156:
> 
>> 154:     int slot_offset = monitor_offset - (i * 2 * BytesPerWord);
>> 155:     if (slot_offset >= 4096 - BytesPerWord) {
>> 156:       __ add_slow(R2, OSR_buf, slot_offset);
> 
> Can't we check this once before the loop? Or does such an optimization make no sense?

Hi Sergey. Thanks for looking at this.
This is not performance critical code, and the typical number_of_locks value is 0, so IF inside the FOR loop makes sense here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18891#discussion_r1587242241


More information about the hotspot-compiler-dev mailing list