diff options
author | Sverker Eriksson <[email protected]> | 2019-06-24 16:56:43 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-06-24 16:56:43 +0200 |
commit | 5d5706abe7a85ab4e54455c0b1061fd351236e16 (patch) | |
tree | bec5bf4a98c76ecbae336cc719c192cf33cd051b | |
parent | 0a40814be651d6a57fba8cc696e1375ee1df540f (diff) | |
parent | 220d813fb6e62516d363c73ba5ce63928a2c50e4 (diff) | |
download | otp-5d5706abe7a85ab4e54455c0b1061fd351236e16.tar.gz otp-5d5706abe7a85ab4e54455c0b1061fd351236e16.tar.bz2 otp-5d5706abe7a85ab4e54455c0b1061fd351236e16.zip |
Merge branch 'maint'
-rw-r--r-- | erts/etc/unix/cerl.src | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src index 7a5d31b9eb..710a7a9ef6 100644 --- a/erts/etc/unix/cerl.src +++ b/erts/etc/unix/cerl.src @@ -292,11 +292,20 @@ if [ "x$GDB" = "x" ]; then valgrind_log="$log_file_prefix$VALGRIND_LOG_DIR/$VALGRIND_LOGFILE_PREFIX$VALGRIND_LOGFILE_INFIX$EMU_NAME.log" fi fi - if [ "x$VALGRIND_MISC_FLAGS" = "x" ]; then - valgrind_misc_flags="--show-possibly-lost=no --child-silent-after-fork=yes\ - --suppressions=$ROOTDIR/erts/emulator/valgrind/suppress.standard" - else - valgrind_misc_flags="$VALGRIND_MISC_FLAGS" + # Add default flags + vgflags=$VALGRIND_MISC_FLAGS + if [ "x${vgflags#*--show-possibly-lost}" = "x$vgflags" ]; then + vgflags="$vgflags --show-possibly-lost=no" + fi + if [ "x${vgflags#*--child-silent-after-fork}" = "x$vgflags" ]; then + vgflags="$vgflags --child-silent-after-fork=yes" + fi + if [ "x${vgflags#*--suppressions}" = "x$vgflags" ]; then + if [ "x$ERL_TOP" != "x" ]; then + vgflags="$vgflags --suppressions=$ERL_TOP/erts/emulator/valgrind/suppress.standard" + else + echo "No valgrind suppression file found in \$VALGRIND_MISC_FLAGS and \$ERL_TOP not set." + fi fi if which taskset > /dev/null && test -e /proc/cpuinfo; then # We only let valgrind utilize one core with "taskset 1" as it can be very slow @@ -311,7 +320,7 @@ if [ "x$GDB" = "x" ]; then sched_arg= fi - exec $taskset1 valgrind $valgrind_xml $valgrind_log $valgrind_misc_flags $BINDIR/$EMU_NAME $sched_arg $emu_xargs "$@" + exec $taskset1 valgrind $valgrind_xml $valgrind_log $vgflags $BINDIR/$EMU_NAME $sched_arg $emu_xargs "$@" elif [ $run_rr = yes ]; then if [ $1 = replay ]; then |