diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-06-08 14:42:10 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-06-08 14:42:10 +0000 |
commit | 5a2769f0273dd389977e8283375e7920d183bdd4 (patch) | |
tree | cc5ffb1521eca3fb4f8c59ba649c8c16b852f125 /rts/STM.c | |
parent | 3f10646cfe2c3409056a49d1ef1c4507af522573 (diff) | |
download | haskell-5a2769f0273dd389977e8283375e7920d183bdd4.tar.gz |
New tracing interface
A simple interface for generating trace messages with timestamps and
thread IDs attached to them. Most debugging output goes through this
interface now, so it is straightforward to get timestamped debugging
traces with +RTS -vt. Also, we plan to use this to generate
parallelism profiles from the trace output.
Diffstat (limited to 'rts/STM.c')
-rw-r--r-- | rts/STM.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -90,6 +90,7 @@ #include "SMP.h" #include "STM.h" #include "Storage.h" +#include "Trace.h" #include <stdlib.h> #include <stdio.h> @@ -113,16 +114,7 @@ // If SHAKE is defined then validation will sometime spuriously fail. They helps test // unusualy code paths if genuine contention is rare -#if defined(DEBUG) -#define SHAKE -#if defined(THREADED_RTS) -#define TRACE(_x...) IF_DEBUG(stm, debugBelch("STM (task %p): ", (void *)(unsigned long)(unsigned int)osThreadId()); debugBelch ( _x )) -#else -#define TRACE(_x...) IF_DEBUG(stm, debugBelch ( _x )) -#endif -#else -#define TRACE(_x...) /*Nothing*/ -#endif +#define TRACE(_x...) debugTrace(DEBUG_stm, "STM: " _x) #ifdef SHAKE static const int do_shake = TRUE; |