Limit ThreadLabel API use to DEBUG only.
/* initialise the stable pointer table */
initStablePtrTable();
+#if defined(DEBUG)
/* initialise thread label table (tso->char*) */
initThreadLabelTable();
+#endif
#if defined(PROFILING) || defined(DEBUG)
initProfiling1();
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");
}
#include <stdlib.h>
+#if defined(DEBUG)
+/* to the end */
static HashTable * threadLabels = NULL;
void
stgFree(old);
}
}
+#endif /* DEBUG */