-
Enhancement
-
Resolution: Fixed
-
P4
-
12
-
b19
In decoder.hpp/cpp we have defined a DecoderLocker class that extends MutexLockerEx and handles the lock to use and whether to use safepoint checks:
DecoderLocker::DecoderLocker() :
MutexLockerEx(DecoderLocker::is_first_error_thread() ?
NULL : Decoder::shared_decoder_lock(),
Mutex::_no_safepoint_check_flag) {
_decoder = is_first_error_thread() ?
Decoder::get_error_handler_instance() : Decoder::get_shared_instance();
assert(_decoder != NULL, "null decoder");
}
but the actual methods still use MutexLockerEx e.g.
bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) {
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
MutexLockerEx locker(error_handling_thread ? NULL : shared_decoder_lock(),
Mutex::_no_safepoint_check_flag);
AbstractDecoder* decoder = error_handling_thread ?
get_error_handler_instance(): get_shared_instance();
assert(decoder != NULL, "null decoder");
return decoder->decode(addr, buf, buflen, offset, modulepath, demangle);
}
We should either use DecoderLocker as intended, or else delete it.
DecoderLocker::DecoderLocker() :
MutexLockerEx(DecoderLocker::is_first_error_thread() ?
NULL : Decoder::shared_decoder_lock(),
Mutex::_no_safepoint_check_flag) {
_decoder = is_first_error_thread() ?
Decoder::get_error_handler_instance() : Decoder::get_shared_instance();
assert(_decoder != NULL, "null decoder");
}
but the actual methods still use MutexLockerEx e.g.
bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) {
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
MutexLockerEx locker(error_handling_thread ? NULL : shared_decoder_lock(),
Mutex::_no_safepoint_check_flag);
AbstractDecoder* decoder = error_handling_thread ?
get_error_handler_instance(): get_shared_instance();
assert(decoder != NULL, "null decoder");
return decoder->decode(addr, buf, buflen, offset, modulepath, demangle);
}
We should either use DecoderLocker as intended, or else delete it.
- relates to
-
JDK-8186349 [windows] Centralize dbghelp handling code
- Resolved
-
JDK-8022335 Native stack walk while generating hs_err does not work on Windows x64
- Closed