X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTrace.h;h=8820075bea535172c9d9953ea86ce22109a76eb5;hb=c51229b2bfd3b1a61d3966db894210ef848f0a6d;hp=530ed1bc123ce061c08062a8bd08f7a7657818ec;hpb=fb1c3f4d3af3d361454f3e0d02d8ea1cb9fc1228;p=ghc-hetmet.git diff --git a/rts/Trace.h b/rts/Trace.h index 530ed1b..8820075 100644 --- a/rts/Trace.h +++ b/rts/Trace.h @@ -2,26 +2,28 @@ * * (c) The GHC Team 2006 * - * Debug and performance tracing. + * Debug tracing. * * This is a layer over RtsMessages, which provides for generating - * trace messages with timestamps and thread Ids attached + * trace messages with timestamps and task IDs attached * automatically. Also, multiple classes of messages are supported, * which can be enabled separately via RTS flags. * - * All debug trace messages go through here. Additionally, we - * generate timestamped trace messages for consumption by profiling - * tools using this API. + * All debug trace messages go through here. * * ---------------------------------------------------------------------------*/ #ifndef TRACE_H #define TRACE_H +#pragma GCC visibility push(hidden) + // ----------------------------------------------------------------------------- // Tracing functions // ----------------------------------------------------------------------------- +#ifdef DEBUG + void initTracing (void); // The simple way: @@ -42,17 +44,18 @@ void traceBegin (const char *str, ...) void traceEnd (void); -#ifdef DEBUG #define debugTrace(class, str, ...) trace(class,str, ## __VA_ARGS__) // variable arg macros are C99, and supported by gcc. #define debugTraceBegin(str, ...) traceBegin(str, ## __VA_ARGS__) #define debugTraceEnd() traceEnd() -#else + +#else /* !DEBUG */ + #define debugTrace(class, str, ...) /* nothing */ #define debugTraceBegin(str, ...) /* nothing */ #define debugTraceEnd() /* nothing */ -#endif +#endif // ----------------------------------------------------------------------------- // Message classes, these may be OR-ed together @@ -73,14 +76,8 @@ void traceEnd (void); #define DEBUG_par (1<<11) #define DEBUG_linker (1<<12) #define DEBUG_squeeze (1<<13) - - - -// Profiling flags -#define TRACE_sched (1<<29) - -// Coverge flags -#define DEBUG_hpc (1<<30) +#define DEBUG_hpc (1<<14) +#define DEBUG_eventlog (1<<15) // ----------------------------------------------------------------------------- // PRIVATE below here @@ -93,4 +90,6 @@ traceClass (StgWord32 class) { return (classes_enabled & class); } // ----------------------------------------------------------------------------- +#pragma GCC visibility pop + #endif /* TRACE_H */