Commit 4dcbbd1d authored by Simon Marlow's avatar Simon Marlow

Remove the DEBUG_<blah> variables, use RtsFlags directly

parent d1fe08ec
......@@ -25,26 +25,6 @@
#include <unistd.h>
#endif
#ifdef DEBUG
// debugging flags, set with +RTS -D<something>
int DEBUG_sched;
int DEBUG_interp;
int DEBUG_weak;
int DEBUG_gccafs;
int DEBUG_gc;
int DEBUG_block_alloc;
int DEBUG_sanity;
int DEBUG_stable;
int DEBUG_stm;
int DEBUG_prof;
int DEBUG_gran;
int DEBUG_par;
int DEBUG_linker;
int DEBUG_squeeze;
int DEBUG_hpc;
int DEBUG_sparks;
#endif
// events
int TRACE_sched;
int TRACE_gc;
......@@ -69,27 +49,6 @@ void initTracing (void)
initMutex(&trace_utx);
#endif
#ifdef DEBUG
#define DEBUG_FLAG(name, class) \
class = RtsFlags.DebugFlags.name ? 1 : 0;
DEBUG_FLAG(scheduler, DEBUG_sched);
DEBUG_FLAG(interpreter, DEBUG_interp);
DEBUG_FLAG(weak, DEBUG_weak);
DEBUG_FLAG(gccafs, DEBUG_gccafs);
DEBUG_FLAG(gc, DEBUG_gc);
DEBUG_FLAG(block_alloc, DEBUG_block_alloc);
DEBUG_FLAG(sanity, DEBUG_sanity);
DEBUG_FLAG(stable, DEBUG_stable);
DEBUG_FLAG(stm, DEBUG_stm);
DEBUG_FLAG(prof, DEBUG_prof);
DEBUG_FLAG(linker, DEBUG_linker);
DEBUG_FLAG(squeeze, DEBUG_squeeze);
DEBUG_FLAG(hpc, DEBUG_hpc);
DEBUG_FLAG(sparks, DEBUG_sparks);
#endif
// -Ds turns on scheduler tracing too
TRACE_sched =
RtsFlags.TraceFlags.scheduler ||
......
......@@ -45,23 +45,23 @@ enum CapsetType { CapsetTypeCustom = CAPSET_TYPE_CUSTOM,
// Message classes
// -----------------------------------------------------------------------------
// debugging flags, set with +RTS -D<something>
extern int DEBUG_sched;
extern int DEBUG_interp;
extern int DEBUG_weak;
extern int DEBUG_gccafs;
extern int DEBUG_gc;
extern int DEBUG_block_alloc;
extern int DEBUG_sanity;
extern int DEBUG_stable;
extern int DEBUG_stm;
extern int DEBUG_prof;
extern int DEBUG_gran;
extern int DEBUG_par;
extern int DEBUG_linker;
extern int DEBUG_squeeze;
extern int DEBUG_hpc;
extern int DEBUG_sparks;
// shorthand for RtsFlags.DebugFlags.<blah>, useful with debugTrace()
#define DEBUG_sched RtsFlags.DebugFlags.scheduler
#define DEBUG_interp RtsFlags.DebugFlags.interp
#define DEBUG_weak RtsFlags.DebugFlags.weak
#define DEBUG_gccafs RtsFlags.DebugFlags.gccafs
#define DEBUG_gc RtsFlags.DebugFlags.gc
#define DEBUG_block_alloc RtsFlags.DebugFlags.alloc
#define DEBUG_sanity RtsFlags.DebugFlags.sanity
#define DEBUG_stable RtsFlags.DebugFlags.stable
#define DEBUG_stm RtsFlags.DebugFlags.stm
#define DEBUG_prof RtsFlags.DebugFlags.prof
#define DEBUG_gran RtsFlags.DebugFlags.gran
#define DEBUG_par RtsFlags.DebugFlags.par
#define DEBUG_linker RtsFlags.DebugFlags.linker
#define DEBUG_squeeze RtsFlags.DebugFlags.squeeze
#define DEBUG_hpc RtsFlags.DebugFlags.hpc
#define DEBUG_sparks RtsFlags.DebugFlags.sparks
// events
extern int TRACE_sched;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment