1
0
Fork
You've already forked ghc-eventlog-loopback
0
No description
  • Haskell 54%
  • C 46%
Teo Camarasu 4e32669bdc
All checks were successful
ci/woodpecker/tag/woodpecker/5 Pipeline was successful
ci/woodpecker/tag/woodpecker/2 Pipeline was successful
ci/woodpecker/tag/woodpecker/1 Pipeline was successful
ci/woodpecker/tag/woodpecker/6 Pipeline was successful
ci/woodpecker/tag/woodpecker/4 Pipeline was successful
ci/woodpecker/tag/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/5 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/6 Pipeline was successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
Link with -eventlog for the benefit of old versions of GHC
2025年12月21日 20:37:16 +00:00
cbits Add stopLoopbackWriter 2025年12月21日 19:50:33 +00:00
src/GHC/RTS/Events Resolve warning 2025年12月21日 20:04:22 +00:00
test Split out readEventLogChunk 2025年12月21日 19:38:41 +00:00
.gitignore Add .eventlog to gitignore 2025年12月21日 19:47:41 +00:00
.woodpecker.yml Add test suite 2025年12月21日 19:31:18 +00:00
CHANGELOG.md Initial commit 2025年03月16日 23:30:08 +00:00
ghc-eventlog-loopback-test.eventlog Initial commit 2025年03月16日 23:30:08 +00:00
ghc-eventlog-loopback.cabal Link with -eventlog for the benefit of old versions of GHC 2025年12月21日 20:37:16 +00:00
LICENSE Initial commit 2025年03月16日 23:30:08 +00:00
README.md Add usage example 2025年12月21日 20:03:31 +00:00

ghc-eventlog-loopback

This library provides a low overhead way to consume GHC's eventlog from inside the application that is emitting it.

Normally an eventlog is written to a file (controlled by the -ol RTS flag). This file must be stored and the processed.

eventlog-socket provides an alternative workflow where a user can create a persistent socket. Processing applications can then connect to this socket and see a valid stream of the eventlog.

Both of these options require managing either a file or a socket. This requires an extra operation overhead.

ghc-eventlog-loopback provides different trade-offs. It allows you to stream an application's eventlog into the application itself, so no extra external resource needs to be managed. It comes with the risk that eventlog processing can overwhelm an application. Users of the library should be careful to ensure that they can process the eventlog faster than it is output.

Example

To instrument your application you should do something like the following:

import Control.Monad
import GHC.RTS.Events.Loopback
import Control.Concurrent
process :: ByteString -> IO ()
...
main = do
 void . forkIO . forever $ readEventLogChunk >>= process
 start
 ...