On Wed, 23 Oct 2024 00:08:54 GMT, Coleen Phillimore <[email protected]> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5341:
>>
>>> 5339:
>>> 5340: void MacroAssembler::inc_held_monitor_count() {
>>> 5341: Address dst = Address(rthread,
>>> JavaThread::held_monitor_count_offset());
>>
>> Suggestion:
>>
>> // Clobbers: rscratch1 and rscratch2
>> void MacroAssembler::inc_held_monitor_count() {
>> Address dst = Address(rthread, JavaThread::held_monitor_count_offset());
>
> Also, is it better to have this without assignment. Which is a nit.
> Address dst(rthread, JavaThread::held_monitor_count_offset());
The `=` in a variable definition is always construction, never assignment.
That said, I also prefer `Address dst(rthread,
JavaThread::held_monitor_count_offset());` Less redundant information.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1811925424