[Libreoffice-commits] .: desktop/scripts
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Jun 22 07:54:22 PDT 2011
desktop/scripts/soffice.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit dc0f285e0628403f63e2d50e451076b098fd8a91
Author: Petr Mladek <pmladek at suse.cz>
Date: Wed Jun 22 16:53:02 2011 +0200
use --trace-children-skip=*/java with valgrind >= 3.6
thanks Caolan for hint
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 33ae8fe..c7d4da1 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
More information about the Libreoffice-commits
mailing list