summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-06-22 16:53:02 +0200
committerPetr Mladek <pmladek@suse.cz>2011-06-22 16:53:02 +0200
commit3f344d378e0f962fd82f2cf673b9bc75c224cdb7 (patch)
tree0644bffeaa02f8328be1132767052f21997be10c /desktop
parent519d31df8cc383bd7241722435141010dac4962c (diff)
use --trace-children-skip=*/java with valgrind >= 3.6
thanks Caolan for hint
Diffstat (limited to 'desktop')
-rwxr-xr-xdesktop/scripts/soffice.sh11
1 files changed, 10 insertions, 1 deletions
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