diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/8.10.1-notes.rst | 4 | ||||
-rw-r--r-- | docs/users_guide/runtime_control.rst | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/docs/users_guide/8.10.1-notes.rst b/docs/users_guide/8.10.1-notes.rst index d9b48d95e0..e5ed23ca3e 100644 --- a/docs/users_guide/8.10.1-notes.rst +++ b/docs/users_guide/8.10.1-notes.rst @@ -222,6 +222,10 @@ Runtime system out-of-the-box compatibility with OpenBSD and macOS Catalina (see :ghc-ticket:`17353`) +- The RTS API now exposes :ref:`an interface <event_log_output_api>` to + configure ``EventLogWriters``, allowing eventlog data to fed to sinks other + than ``.eventlog`` files. + Template Haskell ~~~~~~~~~~~~~~~~ diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 7ebb9eb207..1f4b766400 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -174,6 +174,8 @@ e.g., on stack overflow. The hooks for these are as follows: The message printed if ``malloc`` fails. +.. _event_log_output_api: + Event log output ################ @@ -190,7 +192,7 @@ Furthermore GHC lets you specify the way event log data (see :rts-flag:`-l .. c:member:: bool writeEventLog(void *eventlog, size_t eventlog_size) - Hands buffered event log data to your event log writer. + Hands buffered event log data to your event log writer. Return true on success. Required for a custom :c:type:`EventLogWriter`. .. c:member:: void flushEventLog(void) @@ -202,6 +204,24 @@ Furthermore GHC lets you specify the way event log data (see :rts-flag:`-l Called when event logging is about to stop. This can be ``NULL``. +To use an :c:type:`EventLogWriter` the RTS API provides the following functions: + +.. c:func:: enum EventLogStatus eventLogStatus(void) + + Query whether the current runtime system supports the eventlog (e.g. whether + the current executable was linked with :ghc-flag:`-eventlog`) and, if it + is supported, whether it is currently logging. + +.. c:func:: bool startEventLogging(const EventLogWriter *writer) + + Start logging events to the given :c:type:`EventLogWriter`. Returns true on + success or false is another writer has already been configured. + +.. c:func:: void endEventLogging() + + Tear down the active :c:type:`EventLogWriter`. + + .. _rts-options-misc: Miscellaneous RTS options |