8147000: VM crashes during initialization trying to print log message
Reviewed-by: kbarrett, dholmes
This commit is contained in:
parent
f16c6f2d9f
commit
49d61bdeb6
@ -26,7 +26,6 @@
|
||||
#include "gc/shared/gcId.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
|
||||
uint GCId::_next_id = 0;
|
||||
|
||||
@ -53,7 +52,8 @@ const uint GCId::current_raw() {
|
||||
}
|
||||
|
||||
size_t GCId::print_prefix(char* buf, size_t len) {
|
||||
if (ThreadLocalStorage::is_initialized() && ThreadLocalStorage::thread()->is_Named_thread()) {
|
||||
Thread* thread = Thread::current_or_null();
|
||||
if (thread != NULL && thread->is_Named_thread()) {
|
||||
uint gc_id = current_raw();
|
||||
if (gc_id != undefined()) {
|
||||
int ret = jio_snprintf(buf, len, "GC(%u) ", gc_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user