summaryrefslogtreecommitdiff
path: root/rts/ProfilerReport.c
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-02-23 13:22:48 -0500
committerBen Gamari <ben@smart-cactus.org>2017-02-23 17:26:44 -0500
commita20433326eabd759502d9c170c3cc44ce6128a04 (patch)
tree72ba807d45f05460dcfad02d437d9b79c0518481 /rts/ProfilerReport.c
parent0a77cedb914a67b8bd7c4af1f87714dc497fec3e (diff)
downloadhaskell-a20433326eabd759502d9c170c3cc44ce6128a04.tar.gz
JSON profiler reports
This introduces a JSON output format for cost-centre profiler reports. It's not clear whether this is really something we want to introduce given that we may also move to a more Haskell-driven output pipeline in the future, but I nevertheless found this helpful, so I thought I would put it up. Test Plan: Compile a program with `-prof -fprof-auto`; run with `+RTS -pj` Reviewers: austin, erikd, simonmar Reviewed By: simonmar Subscribers: duncan, maoe, thomie, simonmar Differential Revision: https://phabricator.haskell.org/D3132
Diffstat (limited to 'rts/ProfilerReport.c')
-rw-r--r--rts/ProfilerReport.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/rts/ProfilerReport.c b/rts/ProfilerReport.c
index 83e2fba1bf..81f7fa046a 100644
--- a/rts/ProfilerReport.c
+++ b/rts/ProfilerReport.c
@@ -90,21 +90,6 @@ fprintHeader( FILE *prof_file, uint32_t max_label_len, uint32_t max_module_len,
static CostCentre *sorted_cc_list;
static void
-aggregateCCCosts( CostCentreStack *ccs )
-{
- IndexTable *i;
-
- ccs->cc->mem_alloc += ccs->mem_alloc;
- ccs->cc->time_ticks += ccs->time_ticks;
-
- for (i = ccs->indexTable; i != 0; i = i->next) {
- if (!i->back_edge) {
- aggregateCCCosts(i->ccs);
- }
- }
-}
-
-static void
insertCCInSortedList( CostCentre *new_cc )
{
CostCentre **prev, *cc;
@@ -130,7 +115,6 @@ reportPerCCCosts( FILE *prof_file, ProfilerTotals totals )
CostCentre *cc, *next;
uint32_t max_label_len, max_module_len, max_src_len;
- aggregateCCCosts(CCS_MAIN);
sorted_cc_list = NULL;
max_label_len = 11; // no shorter than the "COST CENTRE" header