RFR: 8343840: Rewrite the ObjectMonitor lists [v2]

Fredrik Bredberg fbredberg at openjdk.org
Tue Mar 4 18:12:59 UTC 2025


On Tue, 4 Mar 2025 17:36:43 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> We don't rebuild at this point. The thread that is removing itself just sets tail to null if there is no prev. Later when F exits the monitor it will construct the DLL to find the next successor.
>
> But if there is a previous node (just no previous pointer set) we have to rebuild the list, otherwise G would still be pointing to F. It would be this case: https://github.com/fbredber/jdk/blob/283c2431ec64b0865d4e678913c636732d01658f/src/hotspot/share/runtime/objectMonitor.cpp#L1313

You're quite right. I'll rewrite that section of the comment. Thank you for spotting this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23421#discussion_r1979966484


More information about the hotspot-dev mailing list