summaryrefslogtreecommitdiff
path: root/docs/TECH
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-18 20:54:13 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-18 20:54:13 +0000
commit05dccc355144dc717b3cb9ef0074a9ab38a520f4 (patch)
tree0a36425cf1321817480a82ed05564a2790e2fca9 /docs/TECH
parent1060e447f83128a78dfaa8d59ba0baa642d15a4d (diff)
downloadrockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.zip
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.gz
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.bz2
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.xz
Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
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 4532af3..b22a8c4 100644
--- a/docs/TECH
+++ b/docs/TECH
@@ -172,3 +172,29 @@ Charging
controlled charging that Rockbox can't affect.)
...
+
+Profiling
+
+ Rockbox contains a profiling system which can be used to monitor call count
+ and time in function for a specific set of functions on a single thread.
+
+ To use this functionality:
+ 1) Configure a developer build with profiling support.
+ 2) Make sure that the functions of interest will be compiled with the
+ PROFILE_OPTS added to their CFLAGS
+ 3) On the same thread as these functions will be run, surround the relevent
+ running time with calls to profile_thread and profstop. (For codecs,
+ this can be done in the codec.c file for example)
+ 4) Compile and run the code on the target, after the section to be profiled
+ exits (when profstop is called) a profile.out file will be written to
+ the player's root.
+ 5) Use the tools/profile_reader/profile_reader.pl script to convert the
+ profile.out into a human readable format. This script requires the
+ relevent map files and object (or library) files created in the build.
+ (ex: ./profile_reader.pl profile.out vorbis.map libTremor.a 0)
+
+ There is also a profile_comparator.pl script which can compare two profile
+ runs as output by the above script to show percent change from optimization
+
+ profile_reader.pl requires a recent binutils that can automatically handle
+ target object files, or objdump in path to be the target-objdump.