Abstract over the way eventlogs are flushed
authoralexbiehl <alex.biehl@gmail.com>
Tue, 31 Jan 2017 21:06:33 +0000 (16:06 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 31 Jan 2017 23:50:21 +0000 (18:50 -0500)
commit4dfc6d1c40b298d4b8f136e46420227eda60a03d
treefce2d978323653ff0ff989fdb72f3585be5b4de4
parent44f079f74869d8cb417e2dcc104517ae7f593e5f
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
docs/users_guide/8.2.1-notes.rst
docs/users_guide/runtime_control.rst
includes/RtsAPI.h
includes/rts/EventLogWriter.h [new file with mode: 0644]
rts/RtsFlags.c
rts/Trace.c
rts/eventlog/EventLog.c
rts/eventlog/EventLog.h
rts/eventlog/EventLogWriter.c [new file with mode: 0644]