-vs Trace scheduler events (see also -Ds with -debug)
-vt Time-stamp trace messages
the intention is that we will pipe the -vs output into a
profile-generating tool. This commit includes the flags only,
functionality to follow.
+struct TRACE_FLAGS {
+ rtsBool sched; /* trace scheduler events for profiling */
+ rtsBool timestamp; /* add timestamps to traces */
+};
struct COST_CENTRE_FLAGS CcFlags;
struct PROFILING_FLAGS ProfFlags;
struct TICKY_FLAGS TickyFlags;
struct COST_CENTRE_FLAGS CcFlags;
struct PROFILING_FLAGS ProfFlags;
struct TICKY_FLAGS TickyFlags;
+ struct TRACE_FLAGS TraceFlags;
#if defined(THREADED_RTS) || defined(PAR)
struct PAR_FLAGS ParFlags;
#if defined(THREADED_RTS) || defined(PAR)
struct PAR_FLAGS ParFlags;
/* -----------------------------------------------------------------------------
*
* (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-2006
*
* Functions for parsing the argument list.
*
*
* Functions for parsing the argument list.
*
RtsFlags.TickyFlags.showTickyStats = rtsFalse;
RtsFlags.TickyFlags.tickyFile = NULL;
#endif
RtsFlags.TickyFlags.showTickyStats = rtsFalse;
RtsFlags.TickyFlags.tickyFile = NULL;
#endif
+
+ RtsFlags.TraceFlags.timestamp = rtsFalse;
+ RtsFlags.TraceFlags.sched = rtsFalse;
" (0 or no argument means switch as often as possible)",
" the default is .02 sec; resolution is .02 sec",
"",
" (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",
#if defined(DEBUG)
" -Ds DEBUG: scheduler",
" -Di DEBUG: interpreter",
switch (rts_argv[arg][2]) {
case '\0':
errorBelch("incomplete RTS option: %s",rts_argv[arg]);
switch (rts_argv[arg][2]) {
case '\0':
errorBelch("incomplete RTS option: %s",rts_argv[arg]);
+ /* =========== 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 */
/* =========== EXTENDED OPTIONS =================== */
case 'x': /* Extend the argument space */