summaryrefslogtreecommitdiff
path: root/rts/eventlog/EventLog.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 /rts/eventlog/EventLog.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 'rts/eventlog/EventLog.h')
-rw-r--r--rts/eventlog/EventLog.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.h b/rts/eventlog/EventLog.h
index 462f5f594e..e36c97353e 100644
--- a/rts/eventlog/EventLog.h
+++ b/rts/eventlog/EventLog.h
@@ -10,6 +10,7 @@
#define EVENTLOG_H
#include "rts/EventLogFormat.h"
+#include "rts/EventLogWriter.h"
#include "Capability.h"
#include "BeginPrivate.h"
@@ -21,7 +22,7 @@
*/
extern char *EventTagDesc[];
-void initEventLogging(void);
+void initEventLogging(const EventLogWriter *writer);
void endEventLogging(void);
void freeEventLogging(void);
void abortEventLogging(void); // #4512 - after fork child needs to abort