File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/org/truffleruby/language Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -209,10 +209,12 @@ private void driveArrivalAtPhaser() {
209
209
}
210
210
211
211
private void printStacktracesOfBlockedThreads () {
212
+ final Thread drivingThread = Thread .currentThread ();
213
+
212
214
System .err .println ("Dumping stacktraces of all threads:" );
213
215
for (Entry <Thread , StackTraceElement []> entry : Thread .getAllStackTraces ().entrySet ()) {
214
216
final Thread thread = entry .getKey ();
215
- if (thread != Thread . currentThread () && runningThreads .contains (thread )) {
217
+ if (runningThreads .contains (thread )) {
216
218
final StackTraceElement [] stackTrace = entry .getValue ();
217
219
boolean blocked = true ;
218
220
@@ -225,7 +227,8 @@ private void printStacktracesOfBlockedThreads() {
225
227
}
226
228
}
227
229
228
- System .err .println ((blocked ? "BLOCKED: " : "IN SAFEPOINT: " ) + thread );
230
+ String kind = thread == drivingThread ? "DRIVER" : (blocked ? "BLOCKED" : "IN SAFEPOINT" );
231
+ System .err .println (kind + ": " + thread );
229
232
for (StackTraceElement stackTraceElement : stackTrace ) {
230
233
System .err .println (stackTraceElement );
231
234
}
You can’t perform that action at this time.
0 commit comments