Library and tool for parsing .eventlog files from GHC

Version on this page:0.7.3
LTS Haskell 22.26:
Stackage Nightly 2024-06-22:
Latest on Hackage:

See all snapshots ghc-events appears in

Maintained by Simon Marlow
This version can be pinned in stack with:ghc-events-0.7.3@sha256:fab587adeaf1ceac4c19b02478d4a941eac0af38f95275d731eca027e4280049,4556


Build Status Hackage Hackage-Deps

A Haskell library for parsing .eventlog files emitted by the GHC runtime system. The package also includes an executable, ghc-events that can be used to display the contents of .eventlog files


  • Add example usage/tutorial of the new API to this readme

Known Issues

  • Writing event logs back to file does not work. It is hard to say how long has this been broken or how difficult will it be to fix (#14)


Change Log

0.7.3 - 2018-07-10

  • Fixed memory-leak in incremental readEvents (#37)
  • Relax upper version bound for containers (#38)

0.7.2 - 2018-03-13

  • Add Semigroup instance for MaxVars to build with ghc-8.4

0.7.1 - 2018-02-17

  • Export HeapProfBreakdown, HeapProfFlags, and PID types (#35)

0.7.0 - 2017-10-04

  • Add support for heap profiling events (#29)

0.6.0 - 2017-05-31

This contains breaking changes.

  • The deprecation notice on readEventLogFromFile has been retracted
  • The incremental API has been refactored

The details are as follows:

  • Update bug tracker URL (#10)
  • New test for Eden events (#11)
  • Relax version bound for binary (#15)
  • Enable Travis CI (#19)
  • Refactor the incremental API which was introduced in (#22)
  • Some speed/memory usage improvements (#18, #22) - unreleased

  • Readme added :)
  • Old parser replaced with an incremental implementation
  • General overhaul of the codebase
  • Partial Haddock coverage

The 0.5.* releases should be able to handle large event logs and logs that have been cut off abruptly, e.g. from executable runs that resulted in crashes.

This release should be mostly backwards compatible, however the “old” way of reading event logs, namely the readEventLogFromFile function is now deprecated.

NOTE: Users parsing large logs may notice that this version of the library is noticably slower than the older versions. The incremental parser is at fault here - previous versions of the libray used a “trick” that would let them essentially skip the first step of the mergesort algorithm since EventBlocks were already sorted in time order. The new parser reads the file incrementally and cannot take the advantage of this. Apologies for any inconvenience this may have caused.