summaryrefslogtreecommitdiff
path: root/includes/RtsAPI.h
diff options
context:
space:
mode:
authoralexbiehl <alex.biehl@gmail.com>2017-01-31 16:06:33 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-31 18:50:21 -0500
commit4dfc6d1c40b298d4b8f136e46420227eda60a03d (patch)
treefce2d978323653ff0ff989fdb72f3585be5b4de4 /includes/RtsAPI.h
parent44f079f74869d8cb417e2dcc104517ae7f593e5f (diff)
downloadhaskell-4dfc6d1c40b298d4b8f136e46420227eda60a03d.tar.gz
Abstract over the way eventlogs are flushed
Currently eventlog data is always written to a file `progname.eventlog`. This patch introduces the `flushEventLog` field in `RtsConfig` which allows to customize the writing of eventlog data. One possible scenario is the ongoing live-profile-monitor effort by @NCrashed which slurps all eventlog data through `fluchEventLog`. `flushEventLog` takes a buffer with eventlog data and its size and returns `false` (0) in case eventlog data could not be procesed. Reviewers: simonmar, austin, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: qnikst, thomie, NCrashed Differential Revision: https://phabricator.haskell.org/D2934
Diffstat (limited to 'includes/RtsAPI.h')
-rw-r--r--includes/RtsAPI.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index bf25c011fc..e5326f759b 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -18,6 +18,7 @@ extern "C" {
#include "HsFFI.h"
#include "rts/Time.h"
+#include "rts/EventLogWriter.h"
/*
* Running the scheduler
@@ -79,6 +80,9 @@ typedef struct {
// Whether to retain CAFs (default: false)
HsBool keep_cafs;
+ // Writer a for eventlog.
+ const EventLogWriter *eventlog_writer;
+
// Called before processing command-line flags, so that default
// settings for RtsFlags can be provided.
void (* defaultsHook) (void);