replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / gtk2_ardour / arprof
1 #!/bin/sh
2
3 # Ardour profiler using callgrind
4 # intended for use with the 'Dummy' backend engine.
5 #
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
9
10 TOP=`dirname "$0"`/..
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
14
15
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/
19
20 ## some options to drop in
21 #  --zero-before="ARDOUR::AudioEngine::process_callback*" \
22 #  --dump-after="ARDOUR::AudioEngine::process_callback*" \
23 ## and/or
24 #  --toggle-collect="ARDOUR::AudioEngine::process_callback*" \
25
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 "$@"