3 # Ardour profiler using callgrind
4 # intended for use with the 'Dummy' backend engine.
6 # inspect data with kcachegrind
7 # see http://valgrind.org/docs/manual/cl-manual.html and
8 # http://log.fundamental-code.com/2013/09/07/profiling-realtime-code
10 . `dirname "$0"`/../build/gtk2_ardour/ardev_common_waf.sh
11 LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
12 export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
15 # depending on options, there can be many files (one per thread,
16 # one per process cycle,..) dump them in a dedicated place.
17 mkdir -p /tmp/ardour_profile/
19 ## some options to drop in
20 # --zero-before="ARDOUR::AudioEngine::process_callback*" \
21 # --dump-after="ARDOUR::AudioEngine::process_callback*" \
23 # --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
25 exec valgrind --tool=callgrind \
26 --dump-instr=yes --collect-jumps=yes\
27 --separate-threads=yes \
28 --collect-systime=yes --collect-bus=yes \
29 --callgrind-out-file=/tmp/ardour_profile/ardour-%p.log \
30 --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
31 $TOP/$EXECUTABLE --novst "$@"