diff options
| author | sof <unknown> | 2004-09-22 16:37:34 +0000 |
|---|---|---|
| committer | sof <unknown> | 2004-09-22 16:37:34 +0000 |
| commit | f7db2c30a659aae5fe59ba2be7ab72f8ca64f712 (patch) | |
| tree | e337f5436266154e0dc2eecd432b72288ff11382 | |
| parent | 907d2e9d423a243cac5bc8ea421442de2a54b41b (diff) | |
| download | haskell-f7db2c30a659aae5fe59ba2be7ab72f8ca64f712.tar.gz | |
[project @ 2004-09-22 16:37:23 by sof]
Limit ThreadLabel API use to DEBUG only.
| -rw-r--r-- | ghc/rts/RtsStartup.c | 2 | ||||
| -rw-r--r-- | ghc/rts/Schedule.c | 2 | ||||
| -rw-r--r-- | ghc/rts/ThreadLabels.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index d605328484..04bad6d661 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -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(); diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index c845c3d51a..fb0b19e037 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -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"); } diff --git a/ghc/rts/ThreadLabels.c b/ghc/rts/ThreadLabels.c index 2856ae7bfd..9b9f1723ff 100644 --- a/ghc/rts/ThreadLabels.c +++ b/ghc/rts/ThreadLabels.c @@ -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 */ |
