summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Rts.h1
-rw-r--r--includes/rts/Flags.h1
-rw-r--r--includes/rts/prof/Heap.h24
3 files changed, 26 insertions, 0 deletions
diff --git a/includes/Rts.h b/includes/Rts.h
index e093a4bcde..50a3f665de 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -194,6 +194,7 @@ void _assertFail(const char *filename, unsigned int linenum)
/* Profiling information */
#include "rts/prof/CCS.h"
+#include "rts/prof/Heap.h"
#include "rts/prof/LDV.h"
/* Parallel information */
diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h
index 735605b2ba..204ec525ac 100644
--- a/includes/rts/Flags.h
+++ b/includes/rts/Flags.h
@@ -144,6 +144,7 @@ typedef struct _PROFILING_FLAGS {
Time heapProfileInterval; /* time between samples */
uint32_t heapProfileIntervalTicks; /* ticks between samples (derived) */
+ bool startHeapProfileAtStartup; /* true if we start profiling from program startup */
bool showCCSOnException;
diff --git a/includes/rts/prof/Heap.h b/includes/rts/prof/Heap.h
new file mode 100644
index 0000000000..90700c809b
--- /dev/null
+++ b/includes/rts/prof/Heap.h
@@ -0,0 +1,24 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The University of Glasgow, 2009
+ *
+ * Heap Census Profiling
+ *
+ * Do not #include this file directly: #include "Rts.h" instead.
+ *
+ * To understand the structure of the RTS headers, see the wiki:
+ * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes
+ *
+ * ---------------------------------------------------------------------------*/
+
+#pragma once
+
+/* -----------------------------------------------------------------------------
+ * Fine-grained control over heap census profiling which can be called from
+ * Haskell to restrict the profile to portion(s) of the execution.
+ * See the module GHC.Profiling.
+ * ---------------------------------------------------------------------------*/
+
+void requestHeapCensus ( void );
+void startHeapProfTimer ( void );
+void stopHeapProfTimer ( void );