aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-06-24 15:00:52 +0200
committerMicael Karlberg <[email protected]>2019-06-26 15:00:45 +0200
commit37338e9876e911d5b019a7f5dda3a7ffc34f8d0b (patch)
tree3aebb6efc34f8bb21d9f72eefcec3f24aab62464 /erts
parenta3ba7fe232db7695a70b06023e524772e451494f (diff)
downloadotp-37338e9876e911d5b019a7f5dda3a7ffc34f8d0b.tar.gz
otp-37338e9876e911d5b019a7f5dda3a7ffc34f8d0b.tar.bz2
otp-37338e9876e911d5b019a7f5dda3a7ffc34f8d0b.zip
Fix VALGRIND_MISC_FLAGS defaults to use ERL_TOP
for suppression file.
Diffstat (limited to 'erts')
-rw-r--r--erts/etc/unix/cerl.src21
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