Eventlog should include delimiters showing when the process writes to the .eventlog file
Quoting a comment I just added at https://ghc.haskell.org/trac/ghc/wiki/EventLog#Limitations :
Event logging can produce "observer effects". In particular, programs can pause while writing to the
.eventlog
file. These display in Threadscope as periods of 100% CPU use with no obvious cause. This effect is exacerbated by heavy use of debug tools which expand the eventlog file, such asTrace.traceMarkerIO
. (This effect was at least seen on OS X. In an extreme case, a program doing nothing but writing 200,000 trace markers, which took 120 ms to run, showed a single 10ms pause in the middle to write them to the.eventlog
file. These periods were shown to be due to writing the.eventlog
file by usingdtruss -a
, which shows long periods ofwrite_nocancel
syscalls, writing to the.eventlog
file opened earlier withopen_nocancel
.)
This behavior caused a few hours of investigation for us. It would make it much more obvious what is happening if this behavior were logged in the eventlog. Specifically, I would like for the eventlog to include a "starting writing eventlog file" event at the start of each of these periods, and a "stopped" event at the end of each period.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |