summaryrefslogtreecommitdiff
path: root/docs/TECH
diff options
context:
space:
mode:
Diffstat (limited to 'docs/TECH')
-rw-r--r--docs/TECH26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/TECH b/docs/TECH
index 4532af3c42..b22a8c4c97 100644
--- a/docs/TECH
+++ b/docs/TECH
@@ -172,3 +172,29 @@ Charging
172 controlled charging that Rockbox can't affect.) 172 controlled charging that Rockbox can't affect.)
173 173
174 ... 174 ...
175
176Profiling
177
178 Rockbox contains a profiling system which can be used to monitor call count
179 and time in function for a specific set of functions on a single thread.
180
181 To use this functionality:
182 1) Configure a developer build with profiling support.
183 2) Make sure that the functions of interest will be compiled with the
184 PROFILE_OPTS added to their CFLAGS
185 3) On the same thread as these functions will be run, surround the relevent
186 running time with calls to profile_thread and profstop. (For codecs,
187 this can be done in the codec.c file for example)
188 4) Compile and run the code on the target, after the section to be profiled
189 exits (when profstop is called) a profile.out file will be written to
190 the player's root.
191 5) Use the tools/profile_reader/profile_reader.pl script to convert the
192 profile.out into a human readable format. This script requires the
193 relevent map files and object (or library) files created in the build.
194 (ex: ./profile_reader.pl profile.out vorbis.map libTremor.a 0)
195
196 There is also a profile_comparator.pl script which can compare two profile
197 runs as output by the above script to show percent change from optimization
198
199 profile_reader.pl requires a recent binutils that can automatically handle
200 target object files, or objdump in path to be the target-objdump.