This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#2458 - simple manual profiling for iriver codec libraries / plugins
Attached to Project:
Rockbox
Opened by Patr3ck (patr3ck) - Saturday, 05 March 2005, 12:54 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 01 August 2007, 15:40 GMT+2
Opened by Patr3ck (patr3ck) - Saturday, 05 March 2005, 12:54 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 01 August 2007, 15:40 GMT+2
|
DetailsIt consists of a 1ms profile_tick for time measurement
and a few simple functions to collect and write the profile information to a file. The profile functions are added to xxx2wav.h / xxx2wav.c so that they are accessible to the codec plugins and the codec libraries. This is not ideal especially for the codec libraries because they need to include xxx2wav.h to use the profiling functions, but I found no cleaner way to do it for now. PROFILE_INIT() initializes the data structure. PROFILING_WRITE(filename) saves the collected data to a file. To measure a function add PROFILING_START(symbol_name) at the beginning and PROFILING_STOP(symbol_name) before returning. The PROFILING definition is used to separate a profiling build from a non profiling build. An example how to use profiling can be seen in mpa2wav.c after applying the patch. The information gathered consists of a call count and a sum of ticks used. A percent value of used time is also calculated and saved to the file. The information is stored tab separated so it can be imported to a spreadsheet to for example sort the entries by the percent value. This is my first contribution to rockbox so don't judge to hard if I did something stupid / wrong. |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Wednesday, 01 August 2007, 15:40 GMT+2
Reason for closing: Out of Date
Wednesday, 01 August 2007, 15:40 GMT+2
Reason for closing: Out of Date