summaryrefslogtreecommitdiff
path: root/rts/ProfHeap.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r--rts/ProfHeap.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 43bce78b76..fdb7bae44c 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -238,6 +238,20 @@ closureIdentity( const StgClosure *p )
return closure_type_names[info->type];
}
}
+ case HEAP_BY_INFO_TABLE: {
+ const StgInfoTable *info;
+ info = get_itbl(p);
+ switch (info->type) {
+ case THUNK:
+ case THUNK_1_1:
+ case THUNK_0_2:
+ case THUNK_2_0:
+ case THUNK_1_0:
+ case THUNK_0_1:
+ case THUNK_SELECTOR:
+ return get_itbl(p);
+ default: return NULL;
+ }}
default:
barf("closureIdentity");
@@ -939,6 +953,14 @@ dumpCensus( Census *census )
traceHeapProfSampleString(0, (char *)ctr->identity,
count * sizeof(W_));
break;
+ case HEAP_BY_INFO_TABLE:
+ fprintf(hp_file, "%p", ctr->identity);
+ // TODO now all the types in this mode are just THUNK closures so
+ // don't really need to add any more info
+ char str[100];
+ sprintf(str, "%p", ctr->identity);
+ traceHeapProfSampleString(0, str, count * sizeof(W_));
+ break;
#if defined(PROFILING)
case HEAP_BY_CCS:
fprint_ccs(hp_file, (CostCentreStack *)ctr->identity,