-
Enhancement
-
Resolution: Fixed
-
P3
-
12
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8269080 | 11.0.13 | Paul Hohensee | P3 | Resolved | Fixed | b01 |
There are a number of Monitor/Mutex instances that are initialized with C++ static initialization statements. This means they execute when the JVM library is loaded and before any JVM initialization of any sort has occurred. This is only viable for trivial initialization that is independent of all other initialization actions that might occur during VM startup.
Proposed changes to mutex/monitor code requires non-trivial initialization at the OS level, which means we need to remove the static initialization of these mutex/monitor instances. (it will likely also need a new very early os::init function after which mutex/monitor initialization can take place.
./share/utilities/decoder.cpp:Mutex* Decoder::_shared_decoder_lock = new Mutex(Mutex::native, ...
./share/services/diagnosticFramework.cpp:Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, ...
./share/jfr/periodic/sampling/jfrThreadSampler.cpp:Monitor* JfrThreadSampler::_transition_block_lock = new Monitor(Mutex::leaf, ...
./share/runtime/sweeper.cpp:Monitor* NMethodSweeper::_stat_lock = new Monitor(Mutex::special, ...
./share/gc/shared/parallelCleaning.cpp:Monitor* CodeCacheUnloadingTask::_lock = new Monitor(Mutex::leaf, ...
./share/runtime/threadSMR.cpp:Monitor* ThreadsSMRSupport::_delete_lock =
new Monitor(Monitor::special, "Thread_SMR_delete_lock",
Proposed changes to mutex/monitor code requires non-trivial initialization at the OS level, which means we need to remove the static initialization of these mutex/monitor instances. (it will likely also need a new very early os::init function after which mutex/monitor initialization can take place.
./share/utilities/decoder.cpp:Mutex* Decoder::_shared_decoder_lock = new Mutex(Mutex::native, ...
./share/services/diagnosticFramework.cpp:Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, ...
./share/jfr/periodic/sampling/jfrThreadSampler.cpp:Monitor* JfrThreadSampler::_transition_block_lock = new Monitor(Mutex::leaf, ...
./share/runtime/sweeper.cpp:Monitor* NMethodSweeper::_stat_lock = new Monitor(Mutex::special, ...
./share/gc/shared/parallelCleaning.cpp:Monitor* CodeCacheUnloadingTask::_lock = new Monitor(Mutex::leaf, ...
./share/runtime/threadSMR.cpp:Monitor* ThreadsSMRSupport::_delete_lock =
new Monitor(Monitor::special, "Thread_SMR_delete_lock",
- backported by
-
JDK-8269080 Remove static initialization of monitor/mutex instances
-
- Resolved
-
- relates to
-
JDK-8213723 More Monitor/mutex initialization management
-
- Resolved
-
-
JDK-8210832 Remove sneaky locking in class Monitor
-
- Resolved
-