-
Enhancement
-
Resolution: Won't Fix
-
P4
-
9
In thread dumps it is very hard to see if a thread is stuck waiting for a lock or not. Even if you take several thread dumps and one thread has the same stack trace between runs, it is hard to see if it is stuck or if it has executed and then returned to the same stack trace.
One great feature would be if we could print how long a thread has waited for a lock in thread dumps. To do this, we would of course have to take a time stamp when we start waiting for a contended lock, but we already do this if JFR is turned on.
Then, when we print a thread dump, for bugs waiting on locks we could also print "has been waiting for 10000ms". This would be a very handy output to show if a thread is stuck or not.
One great feature would be if we could print how long a thread has waited for a lock in thread dumps. To do this, we would of course have to take a time stamp when we start waiting for a contended lock, but we already do this if JFR is turned on.
Then, when we print a thread dump, for bugs waiting on locks we could also print "has been waiting for 10000ms". This would be a very handy output to show if a thread is stuck or not.
- relates to
-
JDK-8200720 Print additional information in thread dump (times, allocated bytes etc.)
-
- Resolved
-