diff options
author | Ravi Nanavati <ravi@bluespec.com> | 2006-09-29 22:51:15 +0000 |
---|---|---|
committer | Ravi Nanavati <ravi@bluespec.com> | 2006-09-29 22:51:15 +0000 |
commit | 16871485a44ba8a6e93e40f30af7ea46839e0c4c (patch) | |
tree | b77f3af31ba856f9639a00083a77e5792bb1ee92 /rts/RtsFlags.c | |
parent | 138de4239c816531feebc8dcc478995d984276a9 (diff) | |
download | haskell-16871485a44ba8a6e93e40f30af7ea46839e0c4c.tar.gz |
rts_ccs_length
Add the -L RTS flag to control the length of the cost-centre stacks reported in
a heap profile.
Please include this change in the 6.6 branch as well as HEAD
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 9aa906f130..7b8a4d1d68 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -177,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; @@ -369,6 +370,9 @@ usage_text[] = { " -hb<bio>... closures with specified biographies (lag,drag,void,use)", "", " -R<size> Set the maximum retainer set size (default: 8)", +"", +" -L<chars> Maximum length of a cost-centre stack in a heap profile", +" (default: 25)", "", " -i<sec> Time between heap samples (seconds, default: 0.1)", "", @@ -858,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]) { |