Commit f7db2c30 authored by sof's avatar sof
Browse files

[project @ 2004-09-22 16:37:23 by sof]

Limit ThreadLabel API use to DEBUG only.
parent 907d2e9d
......@@ -193,8 +193,10 @@ hs_init(int *argc, char **argv[])
/* initialise the stable pointer table */
initStablePtrTable();
#if defined(DEBUG)
/* initialise thread label table (tso->char*) */
initThreadLabelTable();
#endif
#if defined(PROFILING) || defined(DEBUG)
initProfiling1();
......
......@@ -3441,8 +3441,10 @@ printAllThreads(void)
for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) {
debugBelch("\tthread %d @ %p ", t->id, (void *)t);
#if defined(DEBUG)
label = lookupThreadLabel(t->id);
if (label) debugBelch("[\"%s\"] ",(char *)label);
#endif
printThreadStatus(t);
debugBelch("\n");
}
......
......@@ -13,6 +13,8 @@
#include <stdlib.h>
#if defined(DEBUG)
/* to the end */
static HashTable * threadLabels = NULL;
void
......@@ -45,3 +47,4 @@ removeThreadLabel(StgWord key)
stgFree(old);
}
}
#endif /* DEBUG */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment