The Thread::_owned_locks field and printing is only available in debug mode. It would be better if it can be used to print all the owned locks in the hs_err_pid file and not just those defined in mutexLocker.cpp.
Instead have the mutex_array be populated in the Mutex constructor under a ThreadCritical lock. There are some Mutex added after initialization in mutexLocker.cpp but the overhead of saving these is minimal. This way all held locks will be printed in the hs_err file.
Instead have the mutex_array be populated in the Mutex constructor under a ThreadCritical lock. There are some Mutex added after initialization in mutexLocker.cpp but the overhead of saving these is minimal. This way all held locks will be printed in the hs_err file.
- relates to
-
JDK-8275761 Backout: JDK-8274794 Print all owned locks in hs_err file
-
- Resolved
-
-
JDK-8275800 Redefinition leaks MethodData::_extra_data_lock
-
- Resolved
-
-
JDK-8275162 Use varargs in 'def' macros in mutexLocker.cpp
-
- Resolved
-
(1 links to)