RFR: 8318015: Lock inflation not needed for OSR or Deopt for new locking modes [v2]
Martin Doerr
mdoerr at openjdk.org
Fri Oct 13 14:48:44 UTC 2023
On Fri, 13 Oct 2023 14:17:45 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Skip copying displaced header.
>
> src/hotspot/share/runtime/basicLock.cpp line 70:
>
>> 68:
>> 69: if (LockingMode == LM_LEGACY && displaced_header().is_neutral()) {
>> 70: // The object is locked and the resulting ObjectMonitor* will also be
>
> Isn't the set_displaced_header() below also unnecessary for other locking modes, i.e shouldn't it be `if (LockingMode != LM_LEGACY) { return; }`?
Correct. We can skip copying the displaced header completely (also for OSR). I've updated the PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16165#discussion_r1358361190
More information about the hotspot-dev
mailing list