Skip to content
Snippets Groups Projects
Commit 37fb61d8 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

rts: Introduce printGlobalThreads

parent 73b1e87c
No related branches found
No related tags found
No related merge requests found
......@@ -1007,6 +1007,20 @@ printAllThreads(void)
}
}
void
printGlobalThreads(void)
{
for (uint32_t g = 0; g < RtsFlags.GcFlags.generations; g++) {
debugBelch("\ngen %d\n", g);
for (StgTSO *t = generations[g].threads; t != END_TSO_QUEUE; t = t->global_link) {
debugBelch("thread %p (id=%lu)\n", t, t->id);
}
for (StgTSO *t = generations[g].old_threads; t != END_TSO_QUEUE; t = t->global_link) {
debugBelch("thread %p (id=%lu) (old)\n", t, t->id);
}
}
}
// useful from gdb
void
printThreadQueue(StgTSO *t)
......
......@@ -46,6 +46,7 @@ bool performTryPutMVar(Capability *cap, StgMVar *mvar, StgClosure *value);
void printThreadBlockage (StgTSO *tso);
void printThreadStatus (StgTSO *t);
void printAllThreads (void);
void printGlobalThreads(void);
void printThreadQueue (StgTSO *t);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment