[cairo] Performance analysis of a Cairo application

Ivan Baldo ibaldo at adinet.com.uy
Fri Oct 19 14:32:19 PDT 2007

El 19/10/07 16:47, Jeff Muizelaar escribió:
> On Fri, Oct 19, 2007 at 02:42:51PM -0400, Jeff Muizelaar wrote:
>> On Fri, Oct 19, 2007 at 04:18:12PM -0200, Ivan Baldo wrote:
>>> El 18/10/07 19:38, Dan Amelang escribió:
>>>> On 10/17/07, Ivan Baldo <ibaldo at adinet.com.uy> wrote:
>>>    To repeat, I would like a call-graph that says something like this:
>>> main
>>>    77% testslow
>>>        77% test
>>>    22% testfast
>>>        22% test
>>> testslow
>>>    100% test
>>> testfast
>>>    100% test
>> Sysprof can do this. The important point here is that you want to record
>> an entire backtrace at each sampling point instead of just the program
>> counter. I'm not sure whether gprof, qprof, or oprofile support
>> capturing an entire backtrace, but sysprof certainly does.
>> However, because you are using X and that is where the majority of the
>> cpu time is being spent. Sysprof will not be able to associate the time
>> spent in X with the calling function (testfast or testslow) because the
>> backtraces stay inside each process.
> It may also be possible to do single process profiling where time
> sleeping gets accounted to the function that caused the sleeping.
> However, I don't know of any tools that do this. (There might be some, I
> haven't really ever looked...)
> One possible way of doing this would be to use setitimer with
> ITIMER_REAL instead of ITIMER_PROF which is what I expect qprof uses.
    Yes, I can run qprof with the QPROF_REAL environment variable set 
and it will use ITIMER_REAL and SIGALRM to wake up to take the samples, 
so that could be a start but I have a problem: it has problems to 
resolve some program counters (eip on my i386) with addr2line, specially 
one that takes 99% of the time, so it becomes useless :-(.
    Can someone test the example program I sent with QProf using the 
QPROF_REAL environment variable and see if it gets some meaningful results?
    I use Debian Testing fairly updated and QProf from Unstable.
    Thanks to all!

Ivan Baldo - ibaldo at adinet.com.uy - http://ibaldo.codigolibre.net/
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.
We believe that we are free, but in reality we are not! Are we?
Alternatives: ibaldo at codigolibre.net - http://go.to/ibaldo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071019/bc2df02a/attachment.html 

More information about the cairo mailing list