summaryrefslogtreecommitdiff
path: root/rts/Trace.h
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-06-16 15:03:01 +0200
committerBen Gamari <ben@smart-cactus.org>2016-07-16 20:31:47 +0200
commita9bc54766ddd1bdb011f1656ad58fb409055d08f (patch)
tree4d91f1a2c4c0b44b61c910a11b998bc71154f71a /rts/Trace.h
parentb35e01c6c39d9f2d58009722e24d89049aa94287 (diff)
downloadhaskell-a9bc54766ddd1bdb011f1656ad58fb409055d08f.tar.gz
Log heap profiler samples to event log
Test Plan: Try it Reviewers: hvr, simonmar, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1722 GHC Trac Issues: #11094
Diffstat (limited to 'rts/Trace.h')
-rw-r--r--rts/Trace.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/rts/Trace.h b/rts/Trace.h
index cad65b0644..ab79671c4c 100644
--- a/rts/Trace.h
+++ b/rts/Trace.h
@@ -275,6 +275,20 @@ void traceTaskMigrate_ (Task *task,
void traceTaskDelete_ (Task *task);
+void traceHeapProfBegin(StgWord8 profile_id);
+void traceHeapProfSampleBegin(StgInt era);
+void traceHeapProfSampleString(StgWord8 profile_id,
+ const char *label, StgWord residency);
+#ifdef PROFILING
+void traceHeapProfCostCentre(StgWord32 ccID,
+ const char *label,
+ const char *module,
+ const char *srcloc,
+ StgBool is_caf);
+void traceHeapProfSampleCostCentre(StgWord8 profile_id,
+ CostCentreStack *stack, StgWord residency);
+#endif /* PROFILING */
+
#else /* !TRACING */
#define traceSchedEvent(cap, tag, tso, other) /* nothing */
@@ -304,6 +318,11 @@ void traceTaskDelete_ (Task *task);
#define traceTaskCreate_(taskID, cap) /* nothing */
#define traceTaskMigrate_(taskID, cap, new_cap) /* nothing */
#define traceTaskDelete_(taskID) /* nothing */
+#define traceHeapProfBegin(profile_id) /* nothing */
+#define traceHeapProfCostCentre(ccID, label, module, srcloc, is_caf) /* nothing */
+#define traceHeapProfSampleBegin(era) /* nothing */
+#define traceHeapProfSampleCostCentre(profile_id, stack, residency) /* nothing */
+#define traceHeapProfSampleString(profile_id, label, residency) /* nothing */
#endif /* TRACING */