Commit a7a59741 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-12-19 12:50:37 by simonmar]

new flag: +RTS -t
Prints one-line GC stats, in the style of -Rghc-timing.
parent 026b7e0c
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: RtsFlags.c,v 1.34 2000/12/04 12:31:21 simonmar Exp $ * $Id: RtsFlags.c,v 1.35 2000/12/19 12:50:37 simonmar Exp $
* *
* (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
...@@ -367,8 +367,10 @@ usage_text[] = { ...@@ -367,8 +367,10 @@ usage_text[] = {
" -m<n>% Minimum % of heap which must be available (default 3%)", " -m<n>% Minimum % of heap which must be available (default 3%)",
" -G<n> Number of generations (default: 2)", " -G<n> Number of generations (default: 2)",
" -T<n> Number of steps in younger 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)", " -t<file> One-line GC statistics (default file: <program>.stat)",
" -s<file> Summary GC statistics (with -Sstderr going to stderr)",
" -S<file> Detailed GC statistics",
#ifdef RTS_GTK_FRONTPANEL #ifdef RTS_GTK_FRONTPANEL
" -f Display front panel (requires X11 & GTK+)", " -f Display front panel (requires X11 & GTK+)",
#endif #endif
...@@ -672,6 +674,12 @@ error = rtsTrue; ...@@ -672,6 +674,12 @@ error = rtsTrue;
case 's': case 's':
RtsFlags.GcFlags.giveStats ++; RtsFlags.GcFlags.giveStats ++;
case 't':
RtsFlags.GcFlags.giveStats ++;
/* giveStats == 1 means "stats are being collected only" */
RtsFlags.GcFlags.giveStats ++;
#ifdef PAR #ifdef PAR
/* Opening all those files would almost certainly fail... */ /* Opening all those files would almost certainly fail... */
RtsFlags.ParFlags.ParStats.Full = rtsTrue; RtsFlags.ParFlags.ParStats.Full = rtsTrue;
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: RtsFlags.h,v 1.29 2000/12/04 12:31:21 simonmar Exp $ * $Id: RtsFlags.h,v 1.30 2000/12/19 12:50:37 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -16,8 +16,10 @@ struct GC_FLAGS { ...@@ -16,8 +16,10 @@ struct GC_FLAGS {
FILE *statsFile; FILE *statsFile;
nat giveStats; nat giveStats;
#define NO_GC_STATS 0 #define NO_GC_STATS 0
#define SUMMARY_GC_STATS 1 #define COLLECT_GC_STATS 1
#define VERBOSE_GC_STATS 2 #define ONELINE_GC_STATS 2
#define SUMMARY_GC_STATS 3
#define VERBOSE_GC_STATS 4
nat maxStkSize; /* in *words* */ nat maxStkSize; /* in *words* */
nat initialStkSize; /* in *words* */ nat initialStkSize; /* in *words* */
...@@ -36,9 +38,7 @@ struct GC_FLAGS { ...@@ -36,9 +38,7 @@ struct GC_FLAGS {
rtsBool squeezeUpdFrames; rtsBool squeezeUpdFrames;
#ifdef RTS_GTK_FRONTPANEL
rtsBool frontpanel; rtsBool frontpanel;
#endif
}; };
/* Hack: this struct uses bitfields so that we can use a binary arg /* Hack: this struct uses bitfields so that we can use a binary arg
...@@ -72,10 +72,6 @@ struct DEBUG_FLAGS { ...@@ -72,10 +72,6 @@ struct DEBUG_FLAGS {
#define DEBUG_MASK(n) ((nat)(ldexp(1,n))) #define DEBUG_MASK(n) ((nat)(ldexp(1,n)))
#define MAX_DEBUG_MASK ((nat)(ldexp(1,(MAX_DEBUG_OPTION+1))-1)) #define MAX_DEBUG_MASK ((nat)(ldexp(1,(MAX_DEBUG_OPTION+1))-1))
#if defined(PROFILING) || defined(PAR)
/* with PROFILING, full cost-centre stuff (also PROFILING_FLAGS);
with PAR, just the four fixed cost-centres.
*/
struct COST_CENTRE_FLAGS { struct COST_CENTRE_FLAGS {
unsigned int doCostCentres; unsigned int doCostCentres;
# define COST_CENTRES_SUMMARY 1 # define COST_CENTRES_SUMMARY 1
...@@ -86,7 +82,6 @@ struct COST_CENTRE_FLAGS { ...@@ -86,7 +82,6 @@ struct COST_CENTRE_FLAGS {
int profilerTicks; /* derived */ int profilerTicks; /* derived */
int msecsPerTick; /* derived */ int msecsPerTick; /* derived */
}; };
#endif
#ifdef PROFILING #ifdef PROFILING
struct PROFILING_FLAGS { struct PROFILING_FLAGS {
......
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