Restarting event log results in invalid output
Currently if one calls
endEventLogging(), followed by
beginEventLogging(), the eventlog that results has block markers before the header, rendering the output unreadable to
ghc-events. The problem is that
printAndClearEventsBuf(&eventBuf), which posts a marker after flushing the buffer.
postHeaderEvents() then fails to clear this marker before posting the header.
The solution seems clear: call
resetEventsBuf() in either