RFR: 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT [v3]
Coleen Phillimore
coleenp at openjdk.org
Wed Nov 15 17:24:45 UTC 2023
On Wed, 15 Nov 2023 17:15:36 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'upstream_jdk/pr/16602' into JDK-8319773
>> - Simplify test.
>> - 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16603#discussion_r1394521859
More information about the hotspot-dev
mailing list