• Simon Marlow's avatar
    Add fast event logging · 8b18faef
    Simon Marlow authored
    Generate binary log files from the RTS containing a log of runtime
    events with timestamps.  The log file can be visualised in various
    ways, for investigating runtime behaviour and debugging performance
    problems.  See for example the forthcoming ThreadScope viewer.
    New GHC option:
      -eventlog   (link-time option) Enables event logging.
      +RTS -l     (runtime option) Generates <prog>.eventlog with
                  the binary event information.
    This replaces some of the tracing machinery we already had in the RTS:
    e.g. +RTS -vg  for GC tracing (we should do this using the new event
    logging instead).
    Event logging has almost no runtime cost when it isn't enabled, though
    in the future we might add more fine-grained events and this might
    change; hence having a link-time option and compiling a separate
    version of the RTS for event logging.  There's a small runtime cost
    for enabling event-logging, for most programs it shouldn't make much
    (Todo: docs)
EventLog.h 1.17 KB