0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0739: incomplete profiling when exiting because of a dealy signal

Problem:    Incomplete profiling when exiting because of a dealy signal.
Solution:   Call __gcov_flush() if available.
This commit is contained in:
Bram Moolenaar
2020-05-11 22:13:28 +02:00
parent 91689ea8ae
commit b415168a98
4 changed files with 17 additions and 3 deletions

View File

@@ -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)