summaryrefslogtreecommitdiff
path: root/rts/Threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Threads.c')
-rw-r--r--rts/Threads.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index 6b478d046f..07d0d0a180 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -112,6 +112,7 @@ createThread(Capability *cap, W_ size)
ASSIGN_Int64((W_*)&(tso->alloc_limit), 0);
tso->trec = NO_TREC;
+ tso->label = NULL;
#if defined(PROFILING)
tso->prof.cccs = CCS_MAIN;
@@ -957,10 +958,9 @@ printThreadBlockage(StgTSO *tso)
void
printThreadStatus(StgTSO *t)
{
- debugBelch("\tthread %4lu @ %p ", (unsigned long)t->id, (void *)t);
- {
- void *label = lookupThreadLabel(t->id);
- if (label) debugBelch("[\"%s\"] ",(char *)label);
+ debugBelch("\tthread %4lu @ %p ", (unsigned long)t->id, (void *)t);
+ if (t->label) {
+ debugBelch("[\"%.*s\"] ", (int)t->label->bytes, (char *)t->label->payload);
}
switch (t->what_next) {
case ThreadKilled: