RFR: 8274794: Print all owned locks in hs_err file [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Sat Oct 16 07:48:53 UTC 2021
On Sat, 16 Oct 2021 06:34:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make mutex_array be a linked list.
>
> src/hotspot/share/runtime/mutex.cpp line 344:
>
>> 342: // Print all mutexes/monitors that are currently owned by a thread; called
>> 343: // by fatal error handler.
>> 344: void Mutex::print_owned_locks_on_error(outputStream* st) {
>
> Maybe a small comment that we explicitly avoid locking here, because we are in error handling and locking may block? That we rather risk a secondary crash instead of blocking in error handling?
You also could assert for `VMError::is_error_reported()` to prevent future use outside error handling.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5958
More information about the hotspot-dev
mailing list