[project @ 2001-01-24 15:41:30 by simonmar]
authorsimonmar <unknown>
Wed, 24 Jan 2001 15:41:30 +0000 (15:41 +0000)
committersimonmar <unknown>
Wed, 24 Jan 2001 15:41:30 +0000 (15:41 +0000)
make +RTS -Sstderr work in the interpreter

ghc/rts/RtsFlags.c

index 737ea41..f8b8e99 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
 /* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.35 2000/12/19 12:50:37 simonmar Exp $
+ * $Id: RtsFlags.c,v 1.36 2001/01/24 15:41:30 simonmar Exp $
  *
  * (c) The AQUA Project, Glasgow University, 1994-1997
  * (c) The GHC Team, 1998-1999
  *
  * (c) The AQUA Project, Glasgow University, 1994-1997
  * (c) The GHC Team, 1998-1999
@@ -670,28 +670,30 @@ error = rtsTrue;
 #endif
 
              case 'S':
 #endif
 
              case 'S':
-               RtsFlags.GcFlags.giveStats ++;
+                 RtsFlags.GcFlags.giveStats = VERBOSE_GC_STATS;
+                 goto stats;
 
              case 's':
 
              case 's':
-               RtsFlags.GcFlags.giveStats ++;
+                 RtsFlags.GcFlags.giveStats = SUMMARY_GC_STATS;
+                 goto stats;
 
              case 't':
 
              case 't':
-               RtsFlags.GcFlags.giveStats ++;
+                 RtsFlags.GcFlags.giveStats = ONELINE_GC_STATS;
+                 goto stats;
 
 
-               /* giveStats == 1 means "stats are being collected only" */
-               RtsFlags.GcFlags.giveStats ++;
+           stats:
 #ifdef PAR
 #ifdef PAR
-               /* Opening all those files would almost certainly fail... */
-               RtsFlags.ParFlags.ParStats.Full = rtsTrue;
-               RtsFlags.GcFlags.statsFile = stderr; /* temporary; ToDo: rm */
+                 /* Opening all those files would almost certainly fail... */
+                 RtsFlags.ParFlags.ParStats.Full = rtsTrue;
+                 RtsFlags.GcFlags.statsFile = stderr; /* temporary; ToDo: rm */
 #else
 #else
-               RtsFlags.GcFlags.statsFile
-                 = open_stats_file(arg, *argc, argv,
-                       *rts_argc, rts_argv, STAT_FILENAME_FMT);
-
-               if (RtsFlags.GcFlags.statsFile == NULL) error = rtsTrue;
+                 RtsFlags.GcFlags.statsFile
+                     = open_stats_file(arg, *argc, argv,
+                                       *rts_argc, rts_argv, STAT_FILENAME_FMT);
+                 
+                 if (RtsFlags.GcFlags.statsFile == NULL) error = rtsTrue;
 #endif
 #endif
-               break;
+                 break;
 
              case 'Z':
                RtsFlags.GcFlags.squeezeUpdFrames = rtsFalse;
 
              case 'Z':
                RtsFlags.GcFlags.squeezeUpdFrames = rtsFalse;