-
/* -----------------------------------------------------------------------------
*
* (c) The AQUA Project, Glasgow University, 1994-1997
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2006
*
* Functions for parsing the argument list.
*
* ---------------------------------------------------------------------------*/
-//@menu
-//* Includes::
-//* Constants::
-//* Static function decls::
-//* Command-line option parsing routines::
-//* GranSim specific options::
-//* Aux fcts::
-//@end menu
-//*/
-
-//@node Includes, Constants
-//@subsection Includes
-
#include "PosixSource.h"
#include "Rts.h"
#include "RtsFlags.h"
int rts_argc = 0; /* ditto */
char *rts_argv[MAX_RTS_ARGS];
-//@node Constants, Static function decls, Includes
-//@subsection Constants
-
/*
* constants, used later
*/
#endif /* PAR */
-//@node Static function decls, Command-line option parsing routines, Constants
-//@subsection Static function decls
-
/* -----------------------------------------------------------------------------
Static function decls
-------------------------------------------------------------------------- */
static void help_par_debug_options(nat n);
#endif
-//@node Command-line option parsing routines, GranSim specific options, Static function decls
-//@subsection Command-line option parsing routines
-
/* -----------------------------------------------------------------------------
* Command-line option parsing routines.
* ---------------------------------------------------------------------------*/
#ifdef DEBUG
RtsFlags.DebugFlags.scheduler = rtsFalse;
RtsFlags.DebugFlags.interpreter = rtsFalse;
- RtsFlags.DebugFlags.codegen = rtsFalse;
RtsFlags.DebugFlags.weak = rtsFalse;
RtsFlags.DebugFlags.gccafs = rtsFalse;
RtsFlags.DebugFlags.gc = rtsFalse;
RtsFlags.TickyFlags.showTickyStats = rtsFalse;
RtsFlags.TickyFlags.tickyFile = NULL;
#endif
+
+ RtsFlags.TraceFlags.timestamp = rtsFalse;
+ RtsFlags.TraceFlags.sched = rtsFalse;
}
static const char *
" (0 or no argument means switch as often as possible)",
" the default is .02 sec; resolution is .02 sec",
"",
+" -vs Trace scheduler events (see also -Ds with -debug)",
+" -vt Time-stamp trace messages",
+"",
#if defined(DEBUG)
" -Ds DEBUG: scheduler",
" -Di DEBUG: interpreter",
-" -Dc DEBUG: codegen",
" -Dw DEBUG: weak",
" -DG DEBUG: gccafs",
" -Dg DEBUG: gc",
case 'i':
RtsFlags.DebugFlags.interpreter = rtsTrue;
break;
- case 'c':
- RtsFlags.DebugFlags.codegen = rtsTrue;
- break;
case 'w':
RtsFlags.DebugFlags.weak = rtsTrue;
break;
}
) break;
- case 'q':
+ case 'q':
switch (rts_argv[arg][2]) {
case '\0':
errorBelch("incomplete RTS option: %s",rts_argv[arg]);
}
) break;
+ /* =========== TRACING ---------=================== */
+
+ case 'v':
+ switch(rts_argv[arg][2]) {
+ case '\0':
+ errorBelch("incomplete RTS option: %s",rts_argv[arg]);
+ error = rtsTrue;
+ break;
+ case 't':
+ RtsFlags.TraceFlags.timestamp = rtsTrue;
+ break;
+ case 's':
+ RtsFlags.TraceFlags.sched = rtsTrue;
+ break;
+ default:
+ errorBelch("unknown RTS option: %s",rts_argv[arg]);
+ error = rtsTrue;
+ break;
+ }
+ break;
+
/* =========== EXTENDED OPTIONS =================== */
case 'x': /* Extend the argument space */
#if defined(GRAN)
-//@node GranSim specific options, Aux fcts, Command-line option parsing routines
-//@subsection GranSim specific options
-
static void
enable_GranSimLight(void) {
#endif /* PAR */
-//@node Aux fcts, , GranSim specific options
-//@subsection Aux fcts
-
static void
stats_fprintf(FILE *f, char *s, ...)
{