--- old/src/share/vm/gc/shared/gcId.cpp 2016-01-13 22:23:01.188226015 +0100 +++ new/src/share/vm/gc/shared/gcId.cpp 2016-01-13 22:23:01.092226019 +0100 @@ -53,7 +53,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);