Do not link ghc stage1 using -threaded, only for stage2 or 3
[ghc-hetmet.git] / rts / Trace.h
index 19e492c..fc19e89 100644 (file)
@@ -2,16 +2,14 @@
  *
  * (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.
  *
  * ---------------------------------------------------------------------------*/
 
@@ -22,6 +20,8 @@
 // Tracing functions
 // -----------------------------------------------------------------------------
 
+#ifdef DEBUG
+
 void initTracing (void);
 
 // The simple way:
@@ -42,17 +42,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(class, str, ...) traceBegin(class,str, ## __VA_ARGS__)
+#define debugTraceBegin(str, ...) traceBegin(str, ## __VA_ARGS__)
 #define debugTraceEnd() traceEnd()
-#else
+
+#else /* !DEBUG */
+
 #define debugTrace(class, str, ...) /* nothing */
-#define debugTraceBegin(class, str, ...) /* nothing */
+#define debugTraceBegin(str, ...) /* nothing */
 #define debugTraceEnd() /* nothing */
-#endif
 
+#endif
 
 // -----------------------------------------------------------------------------
 // Message classes, these may be OR-ed together
@@ -73,41 +74,8 @@ void traceEnd (void);
 #define DEBUG_par                 (1<<11)
 #define DEBUG_linker              (1<<12)
 #define DEBUG_squeeze              (1<<13)
-
-// PAR debugging flags, set with +RTS -qD<something>
-#define PAR_DEBUG_verbose         (1<<14)
-#define PAR_DEBUG_bq              (1<<15)
-#define PAR_DEBUG_schedule         (1<<16)
-#define PAR_DEBUG_free            (1<<17)
-#define PAR_DEBUG_resume          (1<<18)
-#define PAR_DEBUG_weight          (1<<19)
-#define PAR_DEBUG_fetch           (1<<21)
-#define PAR_DEBUG_fish            (1<<22)
-#define PAR_DEBUG_tables          (1<<23)
-#define PAR_DEBUG_packet          (1<<24)
-#define PAR_DEBUG_pack            (1<<25)
-#define PAR_DEBUG_paranoia         (1<<26)
-
-// GRAN and PAR don't coexist, so we re-use the PAR values for GRAN.
-#define GRAN_DEBUG_event_trace     (1<<14)  
-#define GRAN_DEBUG_event_stats     (1<<15)
-#define GRAN_DEBUG_bq              (1<<16)
-#define GRAN_DEBUG_pack            (1<<17)
-#define GRAN_DEBUG_checkSparkQ     (1<<18)
-#define GRAN_DEBUG_thunkStealing   (1<<19)
-#define GRAN_DEBUG_randomSteal     (1<<20)     
-#define GRAN_DEBUG_findWork        (1<<21)     
-#define GRAN_DEBUG_unused         (1<<22)
-#define GRAN_DEBUG_pri            (1<<23)
-#define GRAN_DEBUG_checkLight      (1<<24)     
-#define GRAN_DEBUG_sortedQ         (1<<25)     
-#define GRAN_DEBUG_blockOnFetch    (1<<26)
-#define GRAN_DEBUG_packBuffer      (1<<27)
-#define GRAN_DEBUG_BOF_sanity      (1<<28)
-
-// Profiling flags
-#define TRACE_sched                (1<<29)
-
+#define DEBUG_hpc                  (1<<14)
+#define DEBUG_eventlog            (1<<15)
 
 // -----------------------------------------------------------------------------
 // PRIVATE below here