RFR: 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT [v4]
Axel Boldt-Christmas
aboldtch at openjdk.org
Thu Nov 16 10:05:51 UTC 2023
On Wed, 15 Nov 2023 17:22:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 966:
>>
>>> 964: // Fall thru so we only have one place that installs the hash in
>>> 965: // the ObjectMonitor.
>>> 966: } else if (LockingMode == LM_LIGHTWEIGHT && mark.is_fast_locked() && is_lock_owned(current, obj)) {
>>
>> You can delete the is_lock_owned() function just above this with this patch.
>>
>> Edit: nope, never mind, I just found another caller. edit2: but you could move it down to before 'inflate'
>
> Also I think the comment before this function is wrong. We can inflate for deoptimization.
> but you could move it down to before 'inflate'
Done.
> Also I think the comment before this function is wrong. We can inflate for deoptimization.
The comment on `is_lock_owned`? For relock_objects `current` is the deoptee's thread which is a JavaThread.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16603#discussion_r1395449578
More information about the hotspot-dev
mailing list