summaryrefslogtreecommitdiff
path: root/rts/ProfHeap.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-05-01 13:10:13 -0400
committerBen Gamari <ben@smart-cactus.org>2018-05-01 14:58:25 -0400
commitb7b6617a90824303daf555c817f538cd9c792671 (patch)
treeeb26a98e3c18f46d1003bc39d45dfb2106f6566d /rts/ProfHeap.c
parent260e23b4033f92c1d7326a60320067922ef06da2 (diff)
downloadhaskell-b7b6617a90824303daf555c817f538cd9c792671.tar.gz
rts: Allow profiling by closure type in prof way
Previously we inexplicably disabled support for `-hT` profiling in the profiled way. Admittedly, there are relatively few cases where one would prefer -hT to `-hd`, but the option should nevertheless be available for the sake of consistency. Note that this does mean that there is a bit of an inconsistency in the behavior of `-h`: in the profiled way `-h` behaves like `-hc` whereas in the non-profiled way it defaults to `-hT`.
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r--rts/ProfHeap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 4a7b6d38a8..55d22ff153 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -127,8 +127,8 @@ closureIdentity( const StgClosure *p )
return retainerSetOf(p);
else
return NULL;
+#endif
-#else
case HEAP_BY_CLOSURE_TYPE:
{
const StgInfoTable *info;
@@ -147,7 +147,6 @@ closureIdentity( const StgClosure *p )
}
}
-#endif
default:
barf("closureIdentity");
}
@@ -815,7 +814,6 @@ dumpCensus( Census *census )
if (count == 0) continue;
-#if !defined(PROFILING)
switch (RtsFlags.ProfFlags.doHeapProfile) {
case HEAP_BY_CLOSURE_TYPE:
fprintf(hp_file, "%s", (char *)ctr->identity);
@@ -823,7 +821,6 @@ dumpCensus( Census *census )
count * sizeof(W_));
break;
}
-#endif
#if defined(PROFILING)
switch (RtsFlags.ProfFlags.doHeapProfile) {