< prev index next > src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java
Print this page
}
private static boolean dumpThread(Thread thread, TextWriter writer) {
ThreadSnapshot snapshot = ThreadSnapshot.of(thread);
if (snapshot == null) {
- return false; // thread terminated
+ return false; // thread not alive
}
Instant now = Instant.now();
Thread.State state = snapshot.threadState();
writer.println("#" + thread.threadId() + " \"" + snapshot.threadName()
+ "\" " + (thread.isVirtual() ? "virtual " : "") + state + " " + now);
*/
private static boolean dumpThread(Thread thread, JsonWriter jsonWriter) {
Instant now = Instant.now();
ThreadSnapshot snapshot = ThreadSnapshot.of(thread);
if (snapshot == null) {
- return false; // thread terminated
+ return false; // thread not alive
}
Thread.State state = snapshot.threadState();
StackTraceElement[] stackTrace = snapshot.stackTrace();
jsonWriter.startObject();
< prev index next >