[project @ 1999-02-01 18:05:30 by simonm]
[ghc-hetmet.git] / ghc / rts / RtsFlags.c
index 3d0d866..60a1f9e 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.5 1999/01/19 17:06:04 simonm Exp $
+ * $Id: RtsFlags.c,v 1.8 1999/01/27 16:41:16 simonm Exp $
  *
  * Functions for parsing the argument list.
  *
@@ -64,9 +64,11 @@ void initRtsFlagsDefaults(void)
     RtsFlags.GcFlags.minAllocAreaSize   = (256 * 1024)        / BLOCK_SIZE;
     RtsFlags.GcFlags.minOldGenSize      = (1024 * 1024)       / BLOCK_SIZE;
     RtsFlags.GcFlags.maxHeapSize       = (64  * 1024 * 1024) / BLOCK_SIZE;
+    RtsFlags.GcFlags.heapSizeSuggestion        = 0;    /* none */
     RtsFlags.GcFlags.pcFreeHeap                = 3;    /* 3% */
     RtsFlags.GcFlags.oldGenFactor       = 2;
     RtsFlags.GcFlags.generations        = 2;
+    RtsFlags.GcFlags.steps              = 2;
 
     RtsFlags.GcFlags.forceGC           = rtsFalse;
     RtsFlags.GcFlags.forcingInterval   = 5000000; /* 5MB (or words?) */
@@ -190,8 +192,6 @@ void initRtsFlagsDefaults(void)
 #ifdef TICKY_TICKY
     RtsFlags.TickyFlags.showTickyStats = rtsFalse;
     RtsFlags.TickyFlags.tickyFile      = NULL;
-
-    AllFlags.doUpdEntryCounts          = rtsTrue; /*ToDo:move? */
 #endif
 }
 
@@ -216,6 +216,7 @@ usage_text[] = {
 "  -M<size> Sets the maximum heap size (default 64M)  Egs: -H256k -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)",
 "  -s<file> Summary GC statistics   (default file: <program>.stat)",
 "  -S<file> Detailed GC statistics  (with -Sstderr going to stderr)",
 "",
@@ -267,8 +268,6 @@ usage_text[] = {
 "  -r<file>  Produce reduction profiling statistics (with -rstderr for stderr)",
 "",
 #endif
-"  -T<level> Trace garbage collection execution (debugging)",
-"",
 # ifdef PAR
 "  -N<n>     Use <n> PVMish processors in parallel (default: 2)",
 /* NB: the -N<n> is implemented by the driver!! */
@@ -486,8 +485,20 @@ error = rtsTrue;
                }
                break;
 
+             case 'T':
+               RtsFlags.GcFlags.steps = decode(rts_argv[arg]+2);
+               if (RtsFlags.GcFlags.steps < 1) {
+                 bad_option(rts_argv[arg]);
+               }
+               break;
+
              case 'H':
-               /* ignore for compatibility with older versions */
+               RtsFlags.GcFlags.heapSizeSuggestion = 
+                 decode(rts_argv[arg]+2) / BLOCK_SIZE;
+
+               if (RtsFlags.GcFlags.heapSizeSuggestion <= 0) {
+                 bad_option(rts_argv[arg]);
+               }
                break;
 
              case 'j': /* force GC option */