rts: Flush eventlog in hs_init_ghc (fixes #15440)
authorMitsutoshi Aoe <maoe@foldr.in>
Thu, 26 Jul 2018 05:50:51 +0000 (14:50 +0900)
committerBen Gamari <ben@smart-cactus.org>
Fri, 27 Jul 2018 15:40:42 +0000 (11:40 -0400)
commit7a3e1b25ff9a570851a59c4cf3600daa49867b9b
tree0980b925eea7102ca8d5562091c479a632531ec5
parent890f6468eb3594e75ea8d08424e9eecb7ab48ecb
rts: Flush eventlog in hs_init_ghc (fixes #15440)

Without this change RTS typically doesn't flush some important
events until the process terminates or it doesn't write them at
all in case it terminates abnormally.

Here is a list of such events:

* EVENT_WALL_CLOCK_TIME
* EVENT_OS_PROCESS_PID
* EVENT_OS_PROCESS_PPID
* EVENT_RTS_IDENTIFIER
* EVENT_PROGRAM_ARGS
* EVENT_PROGRAM_ENV
rts/RtsStartup.c
rts/Trace.c
rts/Trace.h