8317440: Lock rank checking fails when code root set is modified with the Servicelock held after JDK-8315503

Reviewed-by: coleenp, ayang
This commit is contained in:
Thomas Schatzl 2023-10-09 08:27:56 +00:00
parent bcc986b9d1
commit 0cf1a558ba
2 changed files with 4 additions and 4 deletions

View File

@ -231,7 +231,7 @@ void mutex_init() {
MUTEX_DEFN(StringDedupIntern_lock , PaddedMutex , nosafepoint);
MUTEX_DEFN(RawMonitor_lock , PaddedMutex , nosafepoint-1);
MUTEX_DEFN(Metaspace_lock , PaddedMutex , nosafepoint-4);
MUTEX_DEFN(Metaspace_lock , PaddedMutex , nosafepoint-3);
MUTEX_DEFN(MetaspaceCritical_lock , PaddedMonitor, nosafepoint-1);
MUTEX_DEFN(Patching_lock , PaddedMutex , nosafepoint); // used for safepointing and code patching.
@ -302,9 +302,9 @@ void mutex_init() {
MUTEX_DEFN(UnsafeJlong_lock , PaddedMutex , nosafepoint);
#endif
MUTEX_DEFN(ContinuationRelativize_lock , PaddedMonitor, nosafepoint-4);
MUTEX_DEFN(ContinuationRelativize_lock , PaddedMonitor, nosafepoint-3);
MUTEX_DEFN(CodeHeapStateAnalytics_lock , PaddedMutex , safepoint);
MUTEX_DEFN(ThreadsSMRDelete_lock , PaddedMonitor, nosafepoint-4); // Holds ConcurrentHashTableResize_lock
MUTEX_DEFN(ThreadsSMRDelete_lock , PaddedMonitor, service-2); // Holds ConcurrentHashTableResize_lock
MUTEX_DEFN(ThreadIdTableCreate_lock , PaddedMutex , safepoint);
MUTEX_DEFN(SharedDecoder_lock , PaddedMutex , tty-1);
MUTEX_DEFN(DCmdFactory_lock , PaddedMutex , nosafepoint);

View File

@ -1024,7 +1024,7 @@ ConcurrentHashTable(size_t log2size, size_t log2size_limit, size_t grow_hint, bo
_stats_rate = nullptr;
}
_resize_lock =
new Mutex(Mutex::nosafepoint-3, "ConcurrentHashTableResize_lock");
new Mutex(Mutex::service-1, "ConcurrentHashTableResize_lock");
_table = new InternalTable(log2size);
assert(log2size_limit >= log2size, "bad ergo");
_size_limit_reached = _table->_log2_size == _log2_size_limit;