summaryrefslogtreecommitdiff
path: root/gtk2_ardour/arprof
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-04-30 16:15:10 +0200
committerRobin Gareus <robin@gareus.org>2014-04-30 19:06:32 +0200
commit1ac88152967101c2fb1a264456e51211e14dcea6 (patch)
tree6a5a6ec3cc4b82f8ab6f309c26af69f656b49ba6 /gtk2_ardour/arprof
parentd604852f6785890efa033eff442f19b1419b79be (diff)
script to run ardour under callgrind
Diffstat (limited to 'gtk2_ardour/arprof')
-rwxr-xr-xgtk2_ardour/arprof31
1 files changed, 31 insertions, 0 deletions
diff --git a/gtk2_ardour/arprof b/gtk2_ardour/arprof
new file mode 100755
index 0000000000..0d0f5f2fdc
--- /dev/null
+++ b/gtk2_ardour/arprof
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Ardour profiler using callgrind
+# intended for use with the 'Dummy' backend engine.
+#
+# inspect data with kcachegrind
+# see http://valgrind.org/docs/manual/cl-manual.html and
+# http://log.fundamental-code.com/2013/09/07/profiling-realtime-code
+
+. `dirname "$0"`/../build/gtk2_ardour/ardev_common_waf.sh
+LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
+export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
+
+
+# depending on options, there can be many files (one per thread,
+# one per process cycle,..) dump them in a dedicated place.
+mkdir -p /tmp/ardour_profile/
+
+## some options to drop in
+# --zero-before="ARDOUR::AudioEngine::process_callback*" \
+# --dump-after="ARDOUR::AudioEngine::process_callback*" \
+## and/or
+# --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
+
+exec valgrind --tool=callgrind \
+ --dump-instr=yes --collect-jumps=yes\
+ --separate-threads=yes \
+ --collect-systime=yes --collect-bus=yes \
+ --callgrind-out-file=/tmp/ardour_profile/ardour-%p.log \
+ --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
+ $TOP/$EXECUTABLE --novst "$@"