RtsFlags.DebugFlags.par = rtsFalse;
RtsFlags.DebugFlags.linker = rtsFalse;
RtsFlags.DebugFlags.squeeze = rtsFalse;
+ RtsFlags.DebugFlags.hpc = rtsFalse;
#endif
#if defined(PROFILING) || defined(PAR)
RtsFlags.MiscFlags.tickInterval = 50; /* In milliseconds */
RtsFlags.ConcFlags.ctxtSwitchTime = 50; /* In milliseconds */
+ RtsFlags.MiscFlags.install_signal_handlers = rtsTrue;
+
#ifdef THREADED_RTS
RtsFlags.ParFlags.nNodes = 1;
RtsFlags.ParFlags.migrate = rtsTrue;
RtsFlags.TraceFlags.timestamp = rtsFalse;
RtsFlags.TraceFlags.sched = rtsFalse;
+
+#ifdef USE_PAPI
+ /* By default no special measurements taken */
+ RtsFlags.PapiFlags.eventType = 0;
+#endif
}
static const char *
#endif
"",
#if defined(TICKY_TICKY)
-" -r<file> Produce reduction profiling statistics (with -rstderr for stderr)",
+" -r<file> Produce ticky-ticky statistics (with -rstderr for stderr)",
"",
#endif
#if defined(PAR)
" -Dl DEBUG: linker",
" -Dm DEBUG: stm",
" -Dz DEBUG: stack squezing",
+" -Dc DEBUG: program coverage",
"",
#endif /* DEBUG */
#if defined(THREADED_RTS) && !defined(NOSMP)
" -qm Don't automatically migrate threads between CPUs",
" -qw Migrate a thread to the current CPU when it is woken up",
#endif
+" --install-signal-handlers=<yes|no>",
+" Install signal handlers (default: yes)",
#if defined(THREADED_RTS) || defined(PAR)
" -e<size> Size of spark pools (default 100)",
#endif
#if defined(GRAN) /* ToDo: fill in decent Docu here */
" -b... All GranSim options start with -b; see GranSim User's Guide for details",
#endif
+#if defined(USE_PAPI)
+" -aX CPU performance counter measurements using PAPI",
+" (use with the -s<file> option). X is one of:",
+"",
+/* " y - cycles", */
+" 1 - level 1 cache misses",
+" 2 - level 2 cache misses",
+" b - branch mispredictions",
+" s - stalled cycles",
+" e - cache miss and branch misprediction events",
+#endif
"",
"RTS options may also be specified using the GHCRTS environment variable.",
"",
error = rtsTrue;
break;
+ /* This isn't going to allow us to keep related options
+ together as we add more --* flags. We really need a
+ proper options parser. */
+ case '-':
+ if (strequal("install-signal-handlers=yes",
+ &rts_argv[arg][2])) {
+ RtsFlags.MiscFlags.install_signal_handlers = rtsTrue;
+ }
+ else if (strequal("install-signal-handlers=no",
+ &rts_argv[arg][2])) {
+ RtsFlags.MiscFlags.install_signal_handlers = rtsFalse;
+ }
+ else {
+ errorBelch("unknown RTS option: %s",rts_argv[arg]);
+ error = rtsTrue;
+ }
+ break;
case 'A':
RtsFlags.GcFlags.minAllocAreaSize
= decode(rts_argv[arg]+2) / BLOCK_SIZE;
}
break;
+#ifdef USE_PAPI
+ case 'a':
+ switch(rts_argv[arg][2]) {
+ case '1':
+ RtsFlags.PapiFlags.eventType = PAPI_FLAG_CACHE_L1;
+ break;
+ case '2':
+ RtsFlags.PapiFlags.eventType = PAPI_FLAG_CACHE_L2;
+ break;
+ case 'b':
+ RtsFlags.PapiFlags.eventType = PAPI_FLAG_BRANCH;
+ break;
+ case 's':
+ RtsFlags.PapiFlags.eventType = PAPI_FLAG_STALLS;
+ break;
+ case 'e':
+ RtsFlags.PapiFlags.eventType = PAPI_FLAG_CB_EVENTS;
+ break;
+ default:
+ bad_option( rts_argv[arg] );
+ }
+ break;
+#endif
+
case 'B':
RtsFlags.GcFlags.ringBell = rtsTrue;
break;
case 'z':
RtsFlags.DebugFlags.squeeze = rtsTrue;
break;
+ case 'c':
+ RtsFlags.DebugFlags.hpc = rtsTrue;
+ break;
default:
bad_option( rts_argv[arg] );
}