Comments and debug output
[ghc-hetmet.git] / rts / RtsFlags.c
index b2bb9e7..d818e77 100644 (file)
@@ -303,7 +303,8 @@ void initRtsFlagsDefaults(void)
     RtsFlags.TraceFlags.sched          = rtsFalse;
 
 #ifdef USE_PAPI
-    RtsFlags.PapiFlags.eventType        = PAPI_FLAG_BRANCH;
+    /* By default no special measurements taken */
+    RtsFlags.PapiFlags.eventType        = 0;
 #endif
 }
 
@@ -454,14 +455,15 @@ usage_text[] = {
 "  -b...     All GranSim options start with -b; see GranSim User's Guide for details",
 #endif
 #if defined(USE_PAPI)
-"  -aX       Perform measurements using PAPI, it should be used with the -s<file> option.",
-"            Where X is one of:",
+"  -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.",
@@ -676,6 +678,9 @@ error = rtsTrue;
                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] );
                }