On Tue, 23 Jul 2024 13:19:02 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> src/hotspot/share/runtime/lightweightSynchronizer.cpp line 62: >> >>> 60: class ObjectMonitorWorld : public CHeapObj<MEMFLAGS::mtObjectMonitor> { >>> 61: struct Config { >>> 62: using Value = ObjectMonitor*; >> >> Does this alias really help? We don't state the type that many times and it >> looks odd to end up with a mix of `Value` and `ObjectMonitor*` in the same >> code. > > This alias is present in the other CHT implementations, alas as a typedef in > StringTable and SymbolTable so this follows the pattern and allows cut/paste > of the allocate_node, get_hash, and other functions. It is required by the `ConcurrentHashTable` implementation. https://github.com/openjdk/jdk/blob/ebf1154292aa5e78c9eb9ddb26a1a3f9885c2ef8/src/hotspot/share/utilities/concurrentHashTable.hpp#L43-L45 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20067#discussion_r1715304376