Flush eventlog in hs_init_ghc
Currently GHC RTS traces some basic information about the process in hs_init_ghc
but the information is often flushed to the eventlog at the very end of the process lifetime. Or even worse, it's never written to it if the process terminates abnormally.
This is very inconvenient because the information contains some useful stuff like EVENT_WALL_CLOCK_TIME
, which is quite important if user wants to sync timestamps in the eventlog with clock.
The simplest way to fix the issue is to flush the eventlog buffer in hs_init_ghc
.
This is implemented at https://github.com/maoe/ghc/commit/30e20e4e66adccc28c59c8876331918d30eacef2.