summaryrefslogtreecommitdiff
path: root/rts/ProfilerReportJson.h
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/ProfilerReportJson.h
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/ProfilerReportJson.h')
-rw-r--r--rts/ProfilerReportJson.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/rts/ProfilerReportJson.h b/rts/ProfilerReportJson.h
new file mode 100644
index 0000000000..1e115d7265
--- /dev/null
+++ b/rts/ProfilerReportJson.h
@@ -0,0 +1,29 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 1998-2017
+ *
+ * Generating cost-center profiler report
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef PROFILER_REPORT_JSON_H
+#define PROFILER_REPORT_JSON_H
+
+#include <stdio.h>
+
+#include "Rts.h"
+#include "Profiling.h"
+
+#include "BeginPrivate.h"
+
+#ifdef PROFILING
+
+void writeCCSReportJson(FILE *prof_file,
+ CostCentreStack const *ccs,
+ ProfilerTotals totals );
+
+#endif
+
+#include "EndPrivate.h"
+
+#endif /* PROFILER_REPORT_JSON_H */