On Fri, 5 Jun 2026 08:11:11 GMT, Johan Sjölen <[email protected]> wrote:
> Switch the statistics gathering code to be the same as for the string table > (both being based on the statistics gathering in CHT) Except for the fact that when we can't prepare/take the CHT lock, StringTable prints whatever is cached in its static TableStatistics, and Dictionary now prints zero-initialized stats. src/hotspot/share/classfile/dictionary.cpp line 262: > 260: stats = sts.done(thread); > 261: } > 262: stats.print(st, table_name); It's not immediately obvious that we're printing the initial state of `TableStatistics` if we fail the call to `sts.prepare(thread)`, which fails if we can't take the lock of the CHT. Maybe we could add a comment explaining this behavior? ------------- PR Review: https://git.openjdk.org/jdk/pull/31398#pullrequestreview-4436111403 PR Review Comment: https://git.openjdk.org/jdk/pull/31398#discussion_r3362516489
