RFR: 8367982: Unify ObjectSynchronizer and LightweightSynchronizer [v2]
Fredrik Bredberg
fbredberg at openjdk.org
Fri Oct 31 13:57:10 UTC 2025
On Mon, 27 Oct 2025 00:20:19 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update after review
>
> src/hotspot/share/runtime/synchronizer.cpp line 287:
>
>> 285: _last_async_deflation_time_ns = os::javaTimeNanos();
>> 286:
>> 287: ObjectSynchronizer::create_om_table();
>
> The original code should effectively be inlined here:
>
> if (UseObjectMonitorTable) {
> ObjectMonitorTable::create();
> }
Tried to do a quick fix for this, but `ObjectMonitorTable` is not known at this point, and forward declaring it turned out to be a mess. So, since we agreed to move out `ObjectMonitorTable` to a separate file, I think this can be postponed until that file has been created.
> src/hotspot/share/runtime/synchronizer.cpp line 1838:
>
>> 1836: if (!UseObjectMonitorTable) {
>> 1837: return;
>> 1838: }
>
> This should move to the caller and be replaced with an assertion at this level. Though you don't need to introduce this method at all as the caller can call `OMT::create` directly.
Same as last answer, this is easily done once we have moved `ObjectMonitorTable` to a separate file, but not until then.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27915#discussion_r2481507181
PR Review Comment: https://git.openjdk.org/jdk/pull/27915#discussion_r2481511224
More information about the hotspot-dev
mailing list