From 3f344d378e0f962fd82f2cf673b9bc75c224cdb7 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Wed, 22 Jun 2011 16:53:02 +0200 Subject: use --trace-children-skip=*/java with valgrind >= 3.6 thanks Caolan for hint --- desktop/scripts/soffice.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'desktop') diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index bea6cabf5fbe..eec7366e30a8 100755 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -107,7 +107,16 @@ for arg in $@ $VALGRINDOPT ; do if which valgrind >/dev/null 2>&1 ; then # another valgrind tool might be forced via the environment variable test -z "$VALGRIND" && VALGRIND="memcheck" - VALGRINDCHECK="valgrind --tool=$VALGRIND --log-file=valgrind.log --trace-children=yes --num-callers=50 --error-exitcode=101" + # --trace-children-skip is pretty useful but supported only with valgrind >= 3.6.0 + valgrind_ver=`valgrind --version | sed -e "s/valgrind-//"` + valgrind_ver_maj=`echo $valgrind_ver | awk -F. '{ print \$1 }'` + valgrind_ver_min=`echo $valgrind_ver | awk -F. '{ print \$2 }'` + valgrind_skip= + if [ "$valgrind_ver_maj" -gt 3 -o \( "$valgrind_ver_maj" -eq 3 -a "$valgrind_ver_min" -ge 6 \) ] ; then + valgrind_skip='--trace-children-skip=*/java' + fi + # finally set the valgrind check + VALGRINDCHECK="valgrind --tool=$VALGRIND --log-file=valgrind.log --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101" checks="c$checks" if [ "$VALGRIND" = "memcheck" ] ; then export G_SLICE=always-malloc -- cgit