RFR: 8371347: Move the ObjectMonitorTable to a separate new file

Coleen Phillimore coleenp at openjdk.org
Mon Dec 1 13:11:12 UTC 2025


On Sat, 29 Nov 2025 11:21:52 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

> The request to move the `ObjectMonitorTable` to a separate new file came from this review comment: https://github.com/openjdk/jdk/pull/27915#discussion_r2459848893
> 
> By moving the `ObjectMonitorTable` implementation out of `runtime/synchronizer.cpp` into `runtime/objectMonitorTable.[ch]pp` will make a future transition from the current `ObjectMonitorTable` implementation to a new (and better) implementation appear more clean.
> 
> Passes tier1-7 without any problems that can be traced to this PR.

If you're able to hide more of the implementation in the cpp file it'll be less dramatic when you change it.

src/hotspot/share/runtime/objectMonitorTable.hpp line 35:

> 33: 
> 34: class ObjectMonitorTable : AllStatic {
> 35:   struct Config {

Can you hide all of this in the .cpp file like symbolTable.cpp hides the CHT implementation instead of having it all in the hpp file?  The interface only needs to be the functions at the end.

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

Changes requested by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28565#pullrequestreview-3524909068
PR Review Comment: https://git.openjdk.org/jdk/pull/28565#discussion_r2577009871


More information about the hotspot-runtime-dev mailing list