From 05dccc355144dc717b3cb9ef0074a9ab38a520f4 Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Wed, 18 Jan 2006 20:54:13 +0000 Subject: Profiling support, tools and documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657 --- docs/FILES | 1 + docs/LICENSES | 36 ++++++++++++++++++++++++++++++++++++ docs/TECH | 26 ++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 docs/LICENSES (limited to 'docs') diff --git a/docs/FILES b/docs/FILES index f1054eadd9..21f2faf0a8 100644 --- a/docs/FILES +++ b/docs/FILES @@ -8,6 +8,7 @@ CUSTOM_WPS_FORMAT FAQ FILES HISTORY +LICENSES NODO README TECH diff --git a/docs/LICENSES b/docs/LICENSES new file mode 100644 index 0000000000..652a276eed --- /dev/null +++ b/docs/LICENSES @@ -0,0 +1,36 @@ +This file contains license for software imported into Rockbox but governed by +a previous license. Each section begins by identifying the code in Rockbox +and the source from of those code, and is followed by the license text. + +************************************************************************* +In: profile.c, profile_func_enter +From: gcc - gmon.c, mcount +************************************************************************* +Copyright (c) 1991, 1998 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. [rescinded 22 July 1999] +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +@(#)gmon.c 5.3 (Berkeley) 5/22/91 diff --git a/docs/TECH b/docs/TECH index 4532af3c42..b22a8c4c97 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. -- cgit