replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / doc / using_callgrind.txt
1 Profiling Ardour with Callgrind
2 ===============================
3
4 Prerequisites
5 -------------
6
7 *  valgrind version 3.7.0 or later (current 3.9.0)
8 *  kcachegrind 0.6 or later (current: 0.7.4)
9
10
11 Basic Profiling
12 ---------------
13
14 1.  Compile ardour with debug symbols [1].
15 2.  `cd gtk2_ardour`
16 3.  start ardour using `./arcall`
17
18 Load a session, ideally use the 'Dummy' (non realtime) backend.
19
20 The `arcall` script does not start profiling immediately,
21 to start profiling, in a second terminal run
22
23 4. `callgrind_control -i on`
24
25 [do operations in Ardour that should be profiled]
26
27 5. `callgrind_control -i off`
28
29 6. quit ardour
30
31 7. run  `kcachegrind calgringd.out.<PID>`
32
33 NB. There will be multiple files calgringd.out.<PID>-<Thread-ID> for every run,
34 only load the main file without the dash into
35
36 8. clean-up: `rm calgringd.out.*`
37
38
39 Advanced Usage
40 --------------
41
42 Edit gtk2_ardour/arcall, add/remove options as needed.
43 see http://valgrind.org/docs/manual/cl-manual.html for further information.
44
45 ---
46
47 [1] ideally an optimized built with debug-symbols (-g) is used for profiling,
48 however the ardour wscript does not yet offer that configuration option.
49 However, a default (non optimized build) does contain debug-symbols.