X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsFlags.c;h=a3d1d83603400352292acda5a8104195632b85d0;hb=cf411c9ae5d61d6e5baa5e5e6b0ad9803b041236;hp=b2bb9e79c0aeac9c1d5c602eddb3d69b76a63c26;hpb=2b522adea22f77a1c03230f5c9865c00bedb5a5b;p=ghc-hetmet.git diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index b2bb9e7..a3d1d83 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -165,6 +165,7 @@ void initRtsFlagsDefaults(void) RtsFlags.DebugFlags.par = rtsFalse; RtsFlags.DebugFlags.linker = rtsFalse; RtsFlags.DebugFlags.squeeze = rtsFalse; + RtsFlags.DebugFlags.hpc = rtsFalse; #endif #if defined(PROFILING) || defined(PAR) @@ -303,7 +304,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 } @@ -426,6 +428,7 @@ usage_text[] = { " -Dl DEBUG: linker", " -Dm DEBUG: stm", " -Dz DEBUG: stack squezing", +" -Dc DEBUG: program coverage", "", #endif /* DEBUG */ #if defined(THREADED_RTS) && !defined(NOSMP) @@ -454,14 +457,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 option.", -" Where X is one of:", +" -aX CPU performance counter measurements using PAPI", +" (use with the -s 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 +680,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] ); } @@ -754,6 +761,9 @@ error = rtsTrue; case 'z': RtsFlags.DebugFlags.squeeze = rtsTrue; break; + case 'c': + RtsFlags.DebugFlags.hpc = rtsTrue; + break; default: bad_option( rts_argv[arg] ); }