diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-04 06:49:15 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-04 21:24:26 -0400 |
commit | ed6629013b91f782953b4aa5db2854647e3eae97 (patch) | |
tree | 350064f9a9af092682d94288eb97db36f0262591 /rts | |
parent | 53aa59f36dc6554c37ead9677c71e91cad3f9f21 (diff) | |
download | haskell-ed6629013b91f782953b4aa5db2854647e3eae97.tar.gz |
rts: Fix -hT option with profiling rts
In dumpCensus we switch/case on doHeapProfile twice. The second switch
tries to barf on unknown doHeapProfile modes but HEAP_BY_CLOSURE_TYPE is
checked by the first switch and not included in the second.
So when trying to pass -hT to the profiling rts it barfs.
This commit simply merges the two switches into one which fixes this
problem.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/ProfHeap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 6a2c23d1e1..b63bc527ef 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -836,10 +836,7 @@ dumpCensus( Census *census ) traceHeapProfSampleString(0, (char *)ctr->identity, count * sizeof(W_)); break; - } - #if defined(PROFILING) - switch (RtsFlags.ProfFlags.doHeapProfile) { case HEAP_BY_CCS: fprint_ccs(hp_file, (CostCentreStack *)ctr->identity, RtsFlags.ProfFlags.ccsLength); @@ -876,10 +873,10 @@ dumpCensus( Census *census ) printRetainerSetShort(hp_file, rs, RtsFlags.ProfFlags.ccsLength); break; } +#endif default: barf("dumpCensus; doHeapProfile"); } -#endif fprintf(hp_file, "\t%" FMT_Word "\n", (W_)count * sizeof(W_)); } |