RFR: 8278479: RunThese test failure with +UseHeavyMonitors and +VerifyHeavyMonitors
Coleen Phillimore
coleenp at openjdk.org
Tue Jul 5 16:39:24 UTC 2022
On Fri, 1 Jul 2022 20:16:06 GMT, Dean Long <dlong at openjdk.org> wrote:
>> This change adds a null check before calling into Runtime1::monitorenter when -XX:+UseHeavyMonitors is set. There's a null check in the C2 and interpreter code before calling the runtime function but not C1.
>>
>> Tested with tier1-7 (a little of 8) and built on most non-oracle platforms as well.
>
> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 2563:
>
>> 2561: if (op->info() != NULL) {
>> 2562: int null_check_offset = __ offset();
>> 2563: __ null_check(obj, -1);
>
> Suggestion:
>
> __ null_check(obj);
Yes, that would be better but it leads to a compilation error on macosx-aarch64 that null_check is ambiguous:
src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp:2563:10: error: call to member function 'null_check' is ambiguous
[2022-06-30T00:09:19,094Z] __ null_check(obj);
[2022-06-30T00:09:19,094Z] ~~~^~~~~~~~~~
src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:602:16: note: candidate function
[2022-06-30T00:09:19,094Z] virtual void null_check(Register reg, int offset = -1);
[2022-06-30T00:09:19,094Z] ^
src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.hpp:109:8: note: candidate function
[2022-06-30T00:09:19,094Z] void null_check(Register r, Label *Lnull = NULL) { MacroAssembler::null_check(r); }
[2022-06-30T00:09:19,094Z] ^
> src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp line 2438:
>
>> 2436: int null_check_offset = __ offset();
>> 2437: __ null_check(obj);
>> 2438: add_debug_info_for_null_check(null_check_offset, op->info());
>
> Is this equivalent to the following?
>
> add_debug_info_for_null_check_here(op->info());
> __ null_check(obj);
I don't know. Is it better and preferable?
-------------
PR: https://git.openjdk.org/jdk/pull/9339
More information about the hotspot-compiler-dev
mailing list