diff --git a/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java b/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java index 8ce7c03f62d..9ed1069155b 100644 --- a/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java +++ b/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -117,11 +117,8 @@ public interface HotSpotDiagnosticMXBean extends PlatformManagedObject { * does not exist. * *
When the format is specified as {@link ThreadDumpFormat#JSON JSON}, the - * thread dump is generated in JavaScript Object Notation. - * threadDump.schema.json - * describes the thread dump format in draft - * - * JSON Schema Language version 2. + * thread dump is generated as JSON text in the + * JSON Thread Dump Format. * *
The thread dump will include output for all platform threads. It may * include output for some or all virtual threads. diff --git a/src/jdk.management/share/classes/com/sun/management/doc-files/threadDump.html b/src/jdk.management/share/classes/com/sun/management/doc-files/threadDump.html new file mode 100644 index 00000000000..f7dd84d4f32 --- /dev/null +++ b/src/jdk.management/share/classes/com/sun/management/doc-files/threadDump.html @@ -0,0 +1,283 @@ + + + +
+| Name | +Data type | +Optional | +Description | +
|---|---|---|---|
| formatVersion | +number | +no | +The format version. Its value is 2. | +
| processId | +number | +no | +The process identifier (pid) of the VM that generated the thread dump. | +
| time | +string | +no | +The timestamp, in ISO 8601 format, when the thread dump was generated. | +
| runtimeVersion | +string | +no | +The {@linkplain java.lang.Runtime.Version runtime version} of the VM that + generated the thread dump. | +
| threadContainers | +array | +no | +The array of thread "groupings". The first element is the root grouping/container + with name "<root>". | +
Each element in the "threadContainers" array is an object that represents a + grouping/container of threads with the following members: +
| Name | +Data type | +Optional | +Description | +
|---|---|---|---|
| container | +string | +no | +The thread container name. The name is unique. | +
| parent | +string or null | +no | +The thread container parent's name or {@code null} for the root container. | +
| owner | +number or null | +no | +The {@linkplain java.lang.Thread#threadId() thread identifier} of the thread + that owns the thread container or {@code null} if no owner. | +
| threads | +array | +no | +The array of threads in the thread grouping/container. | +
| threadCount | +number | +yes | +The number of threads in the thread grouping/container. If the thread dump + includes all virtual threads then this count is the same as the number of + elements in the threads array. If all virtual threads are not included then + it may be larger than the number of elements in the threads array. | +
Each element in a "threads" array is an object with the following members: +
| Name | +Data type | +Optional | +Description | +
|---|---|---|---|
| tid | +number | +no | +The {@linkplain java.lang.Thread#threadId() thread identifier}. | +
| time | +string | +no | +The timestamp, in ISO 8601 format, when the thread was sampled. | +
| name | +string | +no | +The {@linkplain java.lang.Thread#getName() thread name}. | +
| state | +string | +no | +The string representation of the {@linkplain java.lang.Thread#getState() thread state}. | +
| virtual | +boolean | +yes | +{@code true} if the thread is a {@linkplain java.lang.Thread#isVirtual() virtual thread}. | +
| carrier | +number | +yes | +The thread identifier of the carrier thread when this thread is a mounted + virtual thread. | +
| stack | +array | +no | +The thread stack. The elements in the array are of type string with the string + representation of a {@linkplain java.lang.StackTraceElement stack trace element}. + If the thread stack has one or more elements, then the first element is the top + of the stack. | +
| parkBlocker | +object | +yes | +The object responsible for the thread parking. Its members identify the + blocker object, and the exclusive owner thread if owned. | +
| blockedOn | +string | +yes | +The {@linkplain java.util.Objects#toIdentityString(Object) identity string} of the + object that the thread is blocked on waiting to enter/re-enter a synchronization + method or block. | +
| waitingOn | +string | +yes | +The {@linkplain java.util.Objects#toIdentityString(Object) identity string} + of the object that the thread is {@linkplain java.lang.Object#wait() waiting} + to be notified. | +
| monitorsOwned | +array | +yes | +The objects for which a monitor is owned by the thread. | +
A "parkBlocker" object has the following members: +
| Name | +Data type | +Optional | +Description | +
|---|---|---|---|
| object | +string | +no | +The {@linkplain java.util.Objects#toIdentityString(Object) identity string} + of the {@linkplain java.util.concurrent.locks.LockSupport#park(Object) blocker + object} responsible for the thread parking. | +
| owner | +number | +yes | +The thread identifier of the exclusive owner thread when the parkBlocker is + an {@link java.util.concurrent.locks.AbstractOwnableSynchronizer}. | +
Each element in a "monitorsOwned" array is an object with the following members:
+| Name | +Data type | +Optional | +Description | +
|---|---|---|---|
| depth | +number | +no | +The stack depth at which the monitors are owned. | +
| locks | +array | +no | +The elements of the array are of type string or null. An element of type string + has a value that is the {@linkplain java.util.Objects#toIdentityString(Object) + identity string} of the object for which the monitor is owned by the thread. + The element is of type null when the object has been eliminated. | +