|
|
## Summary
|
|
|
|
|
|
>
|
|
|
> EventLog is a fast, extensible event logging framework in the GHC run-time system (RTS) to support profiling of GHC run-time events.
|
|
|
|
|
|
EventLog is a fast, extensible event logging framework in the GHC run-time system (RTS) to support profiling of GHC run-time events. The [GHC User's Guide](http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/runtime-control.html#rts-eventlog) describes how to enable event logging, after the program is linked with `eventlog`.
|
|
|
|
|
|
|
|
|
An example:
|
|
|
|
|
|
```wiki
|
|
|
$ ghc -O -eventlog -rtsopts A.hs --make
|
|
|
$ ./A +RTS -l
|
|
|
|
|
|
.. produces A.eventlog ...
|
|
|
|
|
|
$ $ show-ghc-events A.eventlog
|
|
|
Event Types:
|
|
|
0: Create thread (size 4)
|
|
|
1: Run thread (size 4)
|
|
|
2: Stop thread (size 6)
|
|
|
3: Thread runnable (size 4)
|
|
|
4: Migrate thread (size 6)
|
|
|
...
|
|
|
```
|
|
|
|
|
|
|
|
|
Log events in binary format to the file program.eventlog, where flags is a sequence of zero or more characters indicating which kinds of events to log. Currently there is only one type supported: -ls, for scheduler events.
|
|
|
|
|
|
|
|
|
The format of the log file is described by the header EventLogFormat.h that comes with GHC, and it can be parsed in Haskell using the [ ghc-events](http://hackage.haskell.org/package/ghc-events) library. To dump the contents of a .eventlog file as text, use the tool show-ghc-events that comes with the ghc-events package.
|
|
|
|
|
|
## Design
|
|
|
|
... | ... | |