Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: lostlogic on December 03, 2005, 06:24:33 PM

Title: Profiling progressing, but need help
Post by: lostlogic on December 03, 2005, 06:24:33 PM
Latest profiling patch, including the parser code is here:
http://lostlogicx.com/transfer/rockbox_profile.patch
Take output from the parser and compare two profiling runs with this perl script:
http://lostlogicx.com/transfer/profile_comparator.pl

Double link is deprecated, but available here: http://lostlogicx.com/transfer/profile-double-link.tar.gz

Design:

Things that need help:
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 03, 2005, 06:54:42 PM
EEK, don't use the patch until I post a new version, it freezes.
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 03, 2005, 07:04:54 PM
Ok, so now it doesn't freeze, but the caller data is for the call _site_ not the top of the function... working on it. (same links, just updated)
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 03, 2005, 07:24:02 PM
Link updated again, now it has the right caller address, but it takes some more instructions to get it.  This is somewhat less than stellar, but it works for now.
Title: Re: Profiling progressing, but need help
Post by: LinusN on December 04, 2005, 04:32:02 AM
I like this. Keep up the good work and visit the IRC channel often. :-)
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 04, 2005, 03:39:54 PM
Wahoo, somewhat real results, will post a new patch shortly, I found the bug in my logic that was breaking with context switches.

[edit]New patch uploaded.  This version works a lot better, and I pulled somestuff that was not relevent from the patch.[/edit]
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 05, 2005, 04:26:36 PM
http://lostlogicx.com/transfer/profile.debug.out

Here is some sample output from a long (about 1.5 songs) profiling run, and with the debug section of the output activated (that part inside #if(0) in the patch).
Title: Re: Profiling progressing, but need help
Post by: BiNiaRiS on December 05, 2005, 08:07:02 PM
maybe i'm not reading it right...but what exactly does this do?
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 05, 2005, 10:47:43 PM
Google software profiling or gmon (GCC's profiling program) -- records call counts and time in functions for all functions executed within the profiled area of code.
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 07, 2005, 02:38:08 PM
More updates.
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 07, 2005, 07:00:44 PM
Now in two flavors!
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 07, 2005, 11:40:27 PM
Single link updated with much better parsing code that account for local symbols and exported symbols.
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 09, 2005, 03:42:16 PM
Submitted to patch tracker:

http://sourceforge.net/tracker/index.php?func=detail&atid=439120&group_id=44306&aid=1376651
Title: Re: Profiling progressing, but need help
Post by: ego on December 10, 2005, 11:53:54 AM
can you dumb it down a little more? i don't understand your explanation, sorry :P (the closest they have to a drooling emote)
Title: Re: Profiling progressing, but need help
Post by: lostlogic on December 12, 2005, 08:56:35 PM
Software profiling is creating an execution profile of the software.  Counting the time spent in every function (or those selected for profiling) and how many times it is called.  This is very helpful for optimizing software, obviously, especially when the software's bottleneck is in CPU cycles as it is for decoding music on rockbox.
Title: Re: Profiling progressing, but need help
Post by: ego on December 12, 2005, 09:32:26 PM
alright, cool. good work.

 :P(drooling again) optimization=good