Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Thread.dumpAll is similar to Object.dump, it will dump all thread information, e.g.
println Thread.dumpAll() // yields the following thread dump: /* "Reference Handler" daemon prio=10 Id=2 RUNNABLE at java.base@11.0.3/java.lang.ref.Reference.waitForReferencePendingList(Native Method) at java.base@11.0.3/java.lang.ref.Reference.processPendingReferences(Reference.java:241) at java.base@11.0.3/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:213) "Finalizer" daemon prio=8 Id=3 WAITING on java.lang.ref.ReferenceQueue$Lock@1ac6b320 at java.base@11.0.3/java.lang.Object.wait(Native Method) - waiting on java.lang.ref.ReferenceQueue$Lock@1ac6b320 at java.base@11.0.3/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155) at java.base@11.0.3/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176) at java.base@11.0.3/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:170) "Signal Dispatcher" daemon prio=9 Id=4 RUNNABLE "Attach Listener" daemon prio=5 Id=5 RUNNABLE "Common-Cleaner" daemon prio=8 Id=11 TIMED_WAITING on java.lang.ref.ReferenceQueue$Lock@51cb63ff at java.base@11.0.3/java.lang.Object.wait(Native Method) - waiting on java.lang.ref.ReferenceQueue$Lock@51cb63ff at java.base@11.0.3/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155) at java.base@11.0.3/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:148) at java.base@11.0.3/java.lang.Thread.run(Thread.java:834) at java.base@11.0.3/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134) "Java2D Disposer" daemon prio=10 Id=13 WAITING on java.lang.ref.ReferenceQueue$Lock@3b0eb89c at java.base@11.0.3/java.lang.Object.wait(Native Method) - waiting on java.lang.ref.ReferenceQueue$Lock@3b0eb89c at java.base@11.0.3/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155) at java.base@11.0.3/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176) at java.desktop@11.0.3/sun.java2d.Disposer.run(Disposer.java:144) at java.base@11.0.3/java.lang.Thread.run(Thread.java:834) "AWT-Windows" daemon prio=6 Id=15 RUNNABLE at java.desktop@11.0.3/sun.awt.windows.WToolkit.eventLoop(Native Method) at java.desktop@11.0.3/sun.awt.windows.WToolkit.run(WToolkit.java:305) at java.base@11.0.3/java.lang.Thread.run(Thread.java:834) "AWT-Shutdown" prio=6 Id=19 WAITING on java.lang.Object@7da6698f at java.base@11.0.3/java.lang.Object.wait(Native Method) - waiting on java.lang.Object@7da6698f at java.base@11.0.3/java.lang.Object.wait(Object.java:328) at java.desktop@11.0.3/sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:291) at java.base@11.0.3/java.lang.Thread.run(Thread.java:834) "AWT-EventQueue-0" prio=6 Id=20 WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@52d69aa8 at java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@52d69aa8 at java.base@11.0.3/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194) at java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) at java.desktop@11.0.3/java.awt.EventQueue.getNextEvent(EventQueue.java:566) at java.desktop@11.0.3/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:190) at java.desktop@11.0.3/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop@11.0.3/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop@11.0.3/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) ... "DestroyJavaVM" prio=5 Id=22 RUNNABLE "TimerQueue" daemon prio=5 Id=23 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@168c5643 at java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@168c5643 at java.base@11.0.3/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) at java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123) at java.base@11.0.3/java.util.concurrent.DelayQueue.take(DelayQueue.java:229) at java.desktop@11.0.3/javax.swing.TimerQueue.run(TimerQueue.java:171) at java.base@11.0.3/java.lang.Thread.run(Thread.java:834) Number of locked synchronizers = 1 - java.util.concurrent.locks.ReentrantLock$NonfairSync@5888cf96 "Thread-1" prio=6 Id=25 RUNNABLE at java.management@11.0.3/sun.management.ThreadImpl.dumpThreads0(Native Method) at java.management@11.0.3/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:502) at java.management@11.0.3/sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:490) at app//org.codehaus.groovy.runtime.DefaultGroovyStaticMethods.dumpAll(DefaultGroovyStaticMethods.java:115) at java.base@11.0.3/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@11.0.3/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base@11.0.3/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base@11.0.3/java.lang.reflect.Method.invoke(Method.java:566) ... */
Attachments
Issue Links
- links to