Patch 8.2.0739
Problem: Incomplete profiling when exiting because of a dealy signal.
Solution: Call __gcov_flush() if available.
Files: src/os_unix.c, src/Makefile, .travis.yml
*** ../vim-8.2.0738/src/os_unix.c 2020-05-11 20:54:37.626875113 +0200
--- src/os_unix.c 2020-05-11 22:09:31.810651039 +0200
***************
*** 3312,3317 ****
--- 3312,3321 ----
}
}
+ #ifdef USE_GCOV_FLUSH
+ extern void __gcov_flush();
+ #endif
+
void
mch_exit(int r)
{
***************
*** 3358,3363 ****
--- 3362,3373 ----
}
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)
*** ../vim-8.2.0738/src/Makefile 2020-05-01 14:26:17.128949276 +0200
--- src/Makefile 2020-05-11 22:12:20.005562153 +0200
***************
*** 686,693 ****
# 7. Open the objects/index.html file in a web browser to view the coverage
# information.
#
- # PROFILE_CFLAGS=-g -O0 -fprofile-arcs -ftest-coverage
# LDFLAGS=--coverage
# Uncomment one of the next two lines to compile Vim with the
--- 686,695 ----
# 7. Open the objects/index.html file in a web browser to view the coverage
# information.
#
# LDFLAGS=--coverage
+ # PROFILE_CFLAGS=-g -O0 -fprofile-arcs -ftest-coverage -DWE_ARE_PROFILING
-DUSE_GCOV_FLUSH
+ # Alternate flags
+ # PROFILE_CFLAGS=-g -O0 --coverage -DWE_ARE_PROFILING -DUSE_GCOV_FLUSH
# Uncomment one of the next two lines to compile Vim with the
*** ../vim-8.2.0738/.travis.yml 2020-04-12 17:52:49.421492420 +0200
--- .travis.yml 2020-05-11 22:08:26.791107176 +0200
***************
*** 11,23 ****
- &normal
BUILD=yes TEST=test FEATURES=normal CONFOPT= SHADOWOPT= SRCDIR=./src
CHECK_AUTOCONF=no
- &linux-huge
! BUILD=yes TEST="scripttests test_libvterm" CFLAGS=--coverage
LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
CONFOPT="--enable-perlinterp --enable-pythoninterp
--enable-python3interp --enable-rubyinterp --enable-luainterp
--enable-tclinterp"
- &osx-huge # macOS build
BUILD=yes TEST=test FEATURES=huge SHADOWOPT= SRCDIR=./src
CHECK_AUTOCONF=no
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-rubyinterp
--enable-luainterp --enable-tclinterp"
- &unittests
! BUILD=no TEST=unittests CFLAGS=--coverage LDFLAGS=--coverage
FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- &asan # ASAN build
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE
-fsanitize=address -fno-omit-frame-pointer"
ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
--- 11,23 ----
- &normal
BUILD=yes TEST=test FEATURES=normal CONFOPT= SHADOWOPT= SRCDIR=./src
CHECK_AUTOCONF=no
- &linux-huge
! BUILD=yes TEST="scripttests test_libvterm" CFLAGS="--coverage
-DUSE_GCOV_FLUSH" LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src
CHECK_AUTOCONF=no
CONFOPT="--enable-perlinterp --enable-pythoninterp
--enable-python3interp --enable-rubyinterp --enable-luainterp
--enable-tclinterp"
- &osx-huge # macOS build
BUILD=yes TEST=test FEATURES=huge SHADOWOPT= SRCDIR=./src
CHECK_AUTOCONF=no
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-rubyinterp
--enable-luainterp --enable-tclinterp"
- &unittests
! BUILD=no TEST=unittests CFLAGS="--coverage -DUSE_GCOV_FLUSH"
LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- &asan # ASAN build
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE
-fsanitize=address -fno-omit-frame-pointer"
ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
*** ../vim-8.2.0738/src/version.c 2020-05-11 22:04:46.928845435 +0200
--- src/version.c 2020-05-11 22:09:55.706488795 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 739,
/**/
--
% cat /usr/include/long_life.h
long life(double fun);
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202005112013.04BKDxnZ023078%40masaka.moolenaar.net.