X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsFlags.c;h=7b8a4d1d68d9cf048b5fcf8cf4fa95af3209818b;hb=fe07f054d7ae5e10b14d5fed730fe4424dabd587;hp=898acac34402ac807c7242dd287e8673b971dbd5;hpb=93db1991b5cacf8357493a2e17fbbfb485f3205b;p=ghc-hetmet.git diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 898acac..7b8a4d1 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -11,7 +11,6 @@ #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" -#include "BlockAlloc.h" #include "Profiling.h" #ifdef HAVE_CTYPE_H @@ -178,6 +177,7 @@ void initRtsFlagsDefaults(void) RtsFlags.ProfFlags.includeTSOs = rtsFalse; RtsFlags.ProfFlags.showCCSOnException = rtsFalse; RtsFlags.ProfFlags.maxRetainerSetSize = 8; + RtsFlags.ProfFlags.ccsLength = 25; RtsFlags.ProfFlags.modSelector = NULL; RtsFlags.ProfFlags.descrSelector = NULL; RtsFlags.ProfFlags.typeSelector = NULL; @@ -370,6 +370,9 @@ usage_text[] = { " -hb... closures with specified biographies (lag,drag,void,use)", "", " -R Set the maximum retainer set size (default: 8)", +"", +" -L Maximum length of a cost-centre stack in a heap profile", +" (default: 25)", "", " -i Time between heap samples (seconds, default: 0.1)", "", @@ -394,9 +397,12 @@ usage_text[] = { " -N Use PVMish processors in parallel (default: 2)", /* NB: the -N is implemented by the driver!! */ #endif -" -C Context-switch interval in seconds", -" (0 or no argument means switch as often as possible)", -" the default is .02 sec; resolution is .02 sec", +" -C Context-switch interval in seconds.", +" 0 or no argument means switch as often as possible.", +" Default: 0.02 sec; resolution is set by -V below.", +" -V Master tick interval in seconds.", +" This sets the resolution for -C and the profile timer -i.", +" Default: 0.02 sec.", "", " -vs Trace scheduler events (see also -Ds with -debug)", " -vt Time-stamp trace messages", @@ -856,7 +862,13 @@ error = rtsTrue; PROFILING_BUILD_ONLY( RtsFlags.ProfFlags.maxRetainerSetSize = atof(rts_argv[arg]+2); ) break; - + case 'L': + PROFILING_BUILD_ONLY( + RtsFlags.ProfFlags.ccsLength = atof(rts_argv[arg]+2); + if(RtsFlags.ProfFlags.ccsLength <= 0) { + bad_option(rts_argv[arg]); + } + ) break; case 'h': /* serial heap profile */ #if !defined(PROFILING) && defined(DEBUG) switch (rts_argv[arg][2]) {