RFR: 8323685: PrintSystemDictionaryAtExit has mutex rank assert [v2]

Coleen Phillimore coleenp at openjdk.org
Fri Jan 19 15:36:30 UTC 2024


On Fri, 19 Jan 2024 14:20:43 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Use variant 2 change from PR https://github.com/openjdk/jdk/pull/16062 that allows the ConcurrentHashTable to specify lock ranking for the resize lock at construction.  SystemDictionary printing takes out both CHT resize lock and the ttyLocker.
>> 
>> Tested with tier1-7, special stress test in tier7 to verify JDK-8317440 is still fixed.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fold SampleClass into printing test.

The default rank is nosafepoint-2, from before the G1 fix.  G1 just needed a lower ranking.

src/hotspot/share/utilities/concurrentHashTable.hpp line 410:

> 408:                       size_t grow_hint = DEFAULT_GROW_HINT,
> 409:                       bool enable_statistics = DEFAULT_ENABLE_STATISTICS,
> 410:                       Mutex::Rank rank = Mutex::nosafepoint-2,

This is the default rank.  It seems reasonable to not stop for safepoints with the resizing lock (since it's the lock taken while in a safepoint - do_safepoint_scan).  This was the default before it was lowered to service-1.

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

PR Comment: https://git.openjdk.org/jdk/pull/17471#issuecomment-1900635547
PR Review Comment: https://git.openjdk.org/jdk/pull/17471#discussion_r1459210898


More information about the hotspot-gc-dev mailing list