RFR: 8367982: Unify ObjectSynchronizer and LightweightSynchronizer [v2]
David Holmes
dholmes at openjdk.org
Mon Oct 27 00:33:11 UTC 2025
On Fri, 24 Oct 2025 13:52:42 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 1454:
>>
>>> 1452: // -----------------------------------------------------------------------------
>>> 1453: // ConcurrentHashTable storing links from objects to ObjectMonitors
>>> 1454: class ObjectMonitorTable : AllStatic {
>>
>> I guess after looking at this, it made sense to combine the lightweightSynchronizer code into synchronizer.cpp (should be ObjectSynchronizer.hpp/cpp). I wonder if the OM table code could be split out into its own file objectMontitorTable.hpp/cpp. I feel like synchronzer.hpp/cpp again does too many different things.
>
> Since we are currently investigating the OM table elseware (see: [JDK-8365493](https://bugs.openjdk.org/browse/JDK-8365493)) I wote for not doing any OM table refactoring in this PR.
I agree on both counts: move it to a new file in a new PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27915#discussion_r2464184483
More information about the hotspot-dev
mailing list