diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-11 22:13:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-11 22:13:28 +0200 |
commit | b415168a9862023462b7193e83da948cb8d11893 (patch) | |
tree | 704bd09ed0b69b7a30b711c5431ff69eaad1a7f5 /src/os_unix.c | |
parent | 91689ea8ae01acb3daf8ba0ee91acd729af7c84c (diff) | |
download | vim-git-b415168a9862023462b7193e83da948cb8d11893.tar.gz |
patch 8.2.0739: incomplete profiling when exiting because of a dealy signalv8.2.0739
Problem: Incomplete profiling when exiting because of a dealy signal.
Solution: Call __gcov_flush() if available.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index b5ae9f868..aea3d5a9e 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3312,6 +3312,10 @@ exit_scroll(void) } } +#ifdef USE_GCOV_FLUSH +extern void __gcov_flush(); +#endif + void mch_exit(int r) { @@ -3358,6 +3362,12 @@ mch_exit(int r) } out_flush(); ml_close_all(TRUE); // remove all memfiles + +#ifdef USE_GCOV_FLUSH + // Flush coverage info before possibly being killed by a deadly signal. + __gcov_flush(); +#endif + may_core_dump(); #ifdef FEAT_GUI if (gui.in_use) |