< prev index next >

src/hotspot/share/prims/jvm.cpp

Print this page
@@ -2959,10 +2959,15 @@
  JVM_ENTRY(jobject, JVM_GetStackTrace(JNIEnv *env, jobject jthread))
    oop trace = java_lang_Thread::async_get_stack_trace(JNIHandles::resolve(jthread), THREAD);
    return JNIHandles::make_local(THREAD, trace);
  JVM_END
  
+ JVM_ENTRY(jobject, JVM_CreateThreadSnapshot(JNIEnv* env, jobject jthread, jboolean withLocks))
+   oop snapshot = java_lang_Thread::get_thread_snapshot(jthread, withLocks != JNI_FALSE, THREAD);
+   return JNIHandles::make_local(THREAD, snapshot);
+ JVM_END
+ 
  JVM_ENTRY(void, JVM_SetNativeThreadName(JNIEnv* env, jobject jthread, jstring name))
    // We don't use a ThreadsListHandle here because the current thread
    // must be alive.
    oop java_thread = JNIHandles::resolve_non_null(jthread);
    JavaThread* thr = java_lang_Thread::thread(java_thread);

@@ -3800,10 +3805,11 @@
      }
      ThreadBlockInVM tbivm(THREAD);
      parkEvent->park();
    }
  JVM_END
+ 
  /*
   * Return the current class's class file version.  The low order 16 bits of the
   * returned jint contain the class's major version.  The high order 16 bits
   * contain the class's minor version.
   */
< prev index next >