diff options
author | Mitsutoshi Aoe <maoe@foldr.in> | 2018-07-26 14:50:51 +0900 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-07-27 11:40:42 -0400 |
commit | 7a3e1b25ff9a570851a59c4cf3600daa49867b9b (patch) | |
tree | 0980b925eea7102ca8d5562091c479a632531ec5 /rts/Trace.c | |
parent | 890f6468eb3594e75ea8d08424e9eecb7ab48ecb (diff) | |
download | haskell-7a3e1b25ff9a570851a59c4cf3600daa49867b9b.tar.gz |
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
Diffstat (limited to 'rts/Trace.c')
-rw-r--r-- | rts/Trace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/Trace.c b/rts/Trace.c index 71403f8a57..02c177fcd8 100644 --- a/rts/Trace.c +++ b/rts/Trace.c @@ -130,6 +130,13 @@ void resetTracing (void) } } +void flushTrace (void) +{ + if (eventlog_enabled) { + flushEventLog(); + } +} + void tracingAddCapapilities (uint32_t from, uint32_t to) { if (eventlog_enabled) { |