[project @ 2002-12-05 14:20:55 by stolz]
[ghc-hetmet.git] / ghc / includes / RtsFlags.h
index 7ecb437..ce21faf 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsFlags.h,v 1.36 2001/08/07 10:11:05 simonmar Exp $
+ * $Id: RtsFlags.h,v 1.43 2002/08/05 10:11:03 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -10,6 +10,8 @@
 #ifndef RTSFLAGS_H
 #define RTSFLAGS_H
 
+#include <stdio.h>
+
 /* For defaults, see the @initRtsFlagsDefaults@ routine. */
 
 struct GC_FLAGS {
@@ -35,44 +37,30 @@ struct GC_FLAGS {
     nat     steps;
     rtsBool squeezeUpdFrames;
 
-    rtsBool compact;
+    rtsBool compact;           /* True <=> "compact all the time" */
     double  compactThreshold;
 
     rtsBool ringBell;
     rtsBool frontpanel;
 };
 
-/* Hack: this struct uses bitfields so that we can use a binary arg
- * with the -D flag.
- * Remember to update the corresponding bit of RtsFlags.c if you
- * change/extend this struct.
- */
 struct DEBUG_FLAGS {  
-  /* flags to control debugging output in various subsystems */
-  rtsBool scheduler   : 1; /*  1 */
-  rtsBool evaluator   : 1; /*  2 */
-  rtsBool codegen     : 1; /*  4 */
-  rtsBool weak        : 1; /*  8 */
-  rtsBool gccafs      : 1; /* 16 */
-  rtsBool gc          : 1; /* 32 */
-  rtsBool block_alloc : 1; /* 64 */
-
-  /* flags to control consistency checking (often very expensive!) */
-  rtsBool sanity      : 1; /* 128 */
-
-  rtsBool stable      : 1; /* 256 */
-  rtsBool prof        : 1; /* 512 */
-  rtsBool gran        : 1; /* 1024 */
-  rtsBool par         : 1; /* 2048 */
-
-  /* The object linker */
-  rtsBool linker      : 1; /* 4096 */
+    // flags to control debugging output & extra checking in various subsystems
+    rtsBool scheduler;      // 's'
+    rtsBool evaluator;     // 'e'
+    rtsBool codegen;        // 'c'
+    rtsBool weak;           // 'w'
+    rtsBool gccafs;         // 'G'
+    rtsBool gc;             // 'g'
+    rtsBool block_alloc;    // 'b'
+    rtsBool sanity;         // 'S'   warning: might be expensive!
+    rtsBool stable;         // 't'
+    rtsBool prof;           // 'p'
+    rtsBool gran;           // 'r'
+    rtsBool par;            // 'P'
+    rtsBool linker;         // 'l'   the object linker
 };
 
-#define MAX_DEBUG_OPTION     12
-#define DEBUG_MASK(n)        ((nat)(ldexp(1,n)))
-#define MAX_DEBUG_MASK       ((nat)(ldexp(1,(MAX_DEBUG_OPTION+1))-1))
-
 struct COST_CENTRE_FLAGS {
     unsigned int           doCostCentres;
 # define COST_CENTRES_SUMMARY  1
@@ -88,8 +76,8 @@ struct COST_CENTRE_FLAGS {
 struct PROFILING_FLAGS {
     unsigned int       doHeapProfile;
 
-    nat                 profileFrequency;  /* how often do you want */
-                                           /* to sample (in ms) */
+    nat                 profileInterval;      /* delta between samples (in ms) */
+    nat                 profileIntervalTicks; /* delta between samples (in 'ticks') */
 
 
 # define NO_HEAP_PROFILING     0       /* N.B. Used as indexes into arrays */
@@ -97,19 +85,20 @@ struct PROFILING_FLAGS {
 # define HEAP_BY_MOD           2
 # define HEAP_BY_DESCR         4
 # define HEAP_BY_TYPE          5
+# define HEAP_BY_RETAINER       6
+# define HEAP_BY_LDV            7
 
     rtsBool            showCCSOnException;
   
-# define CCchar    'C'
-# define MODchar   'M'
-# define DESCRchar 'D'
-# define TYPEchar  'Y'
+    nat                 maxRetainerSetSize;
 
     char*               modSelector;
     char*               descrSelector;
     char*               typeSelector;
     char*               ccSelector;
-
+    char*               ccsSelector;
+    char*               retainerSelector;
+    char*               bioSelector;
 
 };
 #elif defined(DEBUG)
@@ -309,9 +298,11 @@ struct TICKY_FLAGS {
 
 struct RTS_FLAGS {
     struct GC_FLAGS    GcFlags;
-    struct DEBUG_FLAGS DebugFlags;
     struct CONCURRENT_FLAGS ConcFlags;
 
+#ifdef DEBUG
+    struct DEBUG_FLAGS DebugFlags;
+#endif
 #if defined(PROFILING) || defined(PAR)
     struct COST_CENTRE_FLAGS CcFlags;
 #endif