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
11 . $TOP/build/gtk2_ardour/ardev_common_waf.sh
12 LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
13 export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
16 # depending on options, there can be many files (one per thread,
17 # one per process cycle,..) dump them in a dedicated place.
18 mkdir -p /tmp/ardour_profile/
20 ## some options to drop in
21 # --zero-before="ARDOUR::AudioEngine::process_callback*" \
22 # --dump-after="ARDOUR::AudioEngine::process_callback*" \
24 # --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
26 exec valgrind --tool=callgrind \
27 --dump-instr=yes --collect-jumps=yes\
28 --separate-threads=yes \
29 --collect-systime=yes --collect-bus=yes \
30 --callgrind-out-file=/tmp/ardour_profile/ardour-%p.log \
31 --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
32 $TOP/$EXECUTABLE --novst "$@"