RFR: 8315884: New Object to ObjectMonitor mapping [v9]

Coleen Phillimore coleenp at openjdk.org
Tue Jul 23 20:24:37 UTC 2024


On Tue, 23 Jul 2024 13:12:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/runtime/deoptimization.cpp line 1641:
>> 
>>> 1639:               assert(fr.is_deoptimized_frame(), "frame must be scheduled for deoptimization");
>>> 1640:               if (LockingMode == LM_LEGACY) {
>>> 1641:                 mon_info->lock()->set_displaced_header(markWord::unused_mark());
>> 
>> In the existing code how is this restricted to the LM_LEGACY case?? It appears to be unconditional which suggests you are changing the non-UOMT LM_LIGHTWEIGHT logic. ??
>
> Only legacy locking uses the displaced header, I believe, which isn't clear in this code at all.  This seems like a fix.  We should probably assert that only legacy locking uses this field as a displaced header.

Update: yes, this code change does assert if you use BasicLock's displaced header for locking modes other than LM_LEGACY.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20067#discussion_r1688668887


More information about the serviceability-dev mailing list