changeset 35491:663c609dfeee

8147000: VM crashes during initialization trying to print log message Reviewed-by: kbarrett, dholmes
author brutisso
date Thu, 14 Jan 2016 09:18:11 +0100
parents 74e4d7d16790
children c8c0273e6b91 863fb33f9940 f0d335e847c5
files hotspot/src/share/vm/gc/shared/gcId.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc/shared/gcId.cpp	Thu Jan 14 01:25:30 2016 -0500
+++ b/hotspot/src/share/vm/gc/shared/gcId.cpp	Thu Jan 14 09:18:11 2016 +0100
@@ -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 @@
 }
 
 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);