[project @ 1999-03-25 13:13:51 by simonm]
[ghc-hetmet.git] / ghc / rts / RtsFlags.c
index ad2df3a..8f494cd 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.9 1999/02/05 16:02:49 simonm Exp $
+ * $Id: RtsFlags.c,v 1.12 1999/03/25 13:14:07 simonm Exp $
  *
  * (c) The AQUA Project, Glasgow University, 1994-1997
  * (c) The GHC Team, 1998-1999
@@ -216,7 +216,8 @@ usage_text[] = {
 "  -k<size> Sets the initial thread stack size (default 1k)  Egs: -K4k   -K2m",
 "",
 "  -A<size> Sets the minimum allocation area size (default 256k) Egs: -A1m -A10k",
-"  -M<size> Sets the maximum heap size (default 64M)  Egs: -H256k -H1G",
+"  -M<size> Sets the maximum heap size (default 64M)  Egs: -M256k -M1G",
+"  -H<size> Sets the minimum heap size (default 0M)   Egs: -H24m  -H1G",
 "  -m<n>%   Minimum % of heap which must be available (default 3%)",
 "  -G<n>    Number of generations (default: 2)",
 "  -T<n>    Number of steps in younger generations (default: 2)",
@@ -443,7 +444,19 @@ error = rtsTrue;
 #ifdef DEBUG
              case 'D':
                /* hack warning: interpret the flags as a binary number */
-               *(int*)(&RtsFlags.DebugFlags) = decode(rts_argv[arg]+2);
+               { 
+                   I_ n = decode(rts_argv[arg]+2);
+                   if (n     &1) RtsFlags.DebugFlags.scheduler   = rtsTrue;
+                   if ((n>>1)&1) RtsFlags.DebugFlags.evaluator   = rtsTrue;
+                   if ((n>>2)&1) RtsFlags.DebugFlags.codegen     = rtsTrue;
+                   if ((n>>3)&1) RtsFlags.DebugFlags.weak        = rtsTrue;
+                   if ((n>>4)&1) RtsFlags.DebugFlags.gccafs      = rtsTrue;
+                   if ((n>>5)&1) RtsFlags.DebugFlags.gc          = rtsTrue;
+                   if ((n>>6)&1) RtsFlags.DebugFlags.block_alloc = rtsTrue;
+                   if ((n>>7)&1) RtsFlags.DebugFlags.sanity      = rtsTrue;
+                   if ((n>>8)&1) RtsFlags.DebugFlags.stable      = rtsTrue;
+                   if ((n>>9)&1) RtsFlags.DebugFlags.prof        = rtsTrue;
+                }
                break;
 #endif