< prev index next >

src/hotspot/share/prims/jvmtiTrace.cpp

Print this page
@@ -275,11 +275,15 @@
      return "NULL";
    }
    if (!thread->is_Java_thread()) {
      return thread->name();
    }
-   oop threadObj = JavaThread::cast(thread)->threadObj();
+   JavaThread* java_thread = JavaThread::cast(thread);
+   oop threadObj = java_thread->mounted_vthread();
+   if (threadObj == NULL) {
+     threadObj = java_thread->threadObj();
+   }
    if (threadObj == NULL) {
      return "NULL";
    }
    oop name = java_lang_Thread::name(threadObj);
    if (name == NULL) {
< prev index next >