tools: add a valgrind helper script
authorJean Privat <jean@pryen.org>
Thu, 24 Jun 2010 06:22:37 +0000 (02:22 -0400)
committerJean Privat <jean@pryen.org>
Thu, 24 Jun 2010 06:22:37 +0000 (02:22 -0400)
The script call valgrind with the right options to disable the GC and
avoid loops.

Signed-off-by: Jean Privat <jean@pryen.org>

src/.gitignore [new file with mode: 0644]
src/valgrind.sh [new file with mode: 0755]

diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644 (file)
index 0000000..5612780
--- /dev/null
@@ -0,0 +1 @@
+callgrind.*
diff --git a/src/valgrind.sh b/src/valgrind.sh
new file mode 100755 (executable)
index 0000000..c024763
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Script to call valgrind with the right options
+
+# Disable GC to avoid unpredictable long news (those that trigger the GC)
+NIT_GC_OPTION=large
+export NIT_GC_OPTION
+
+# Skip usual methods with blocks to avoid loops
+exec valgrind --tool=callgrind --fn-skip=array___Array___iterate --fn-skip=abstract_collection___Collection___iterate --fn-skip=parser_prod___Visitor___enter_visit "$@"