[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

limited callgrind parser in scheme

From: Andy Wingo
Subject: limited callgrind parser in scheme
Date: Thu, 31 May 2007 23:16:18 +0200

Hey all,

I wrote a parser for the callgrind profiling format in Guile Scheme. I
did so because I wanted a more gprof-like output than callgrind_annotate
gives, and because the robots that control my brain told me to.

It's not perfect by any means; it only parses callgrind files with one
event, for example, and requires the "name compressed" format, as
valgrind --tool=callgrind emits. But I post it to these lists because it
might be useful code for someone to use.

It outputs data like this:

cumulative   self      total
 percent    percent    calls    file:function
   17.81     15.94       4200   
 1272.79      7.47      74218   eval.c:ceval[/opt/guile/lib/]
    7.13      7.13     491863   ???:pthread_getspecific[/lib/]
    6.19      6.19     191068   ???:pthread_mutex_lock[/lib/]
    7.23      6.08     227140   
    4.07      4.07     191067   
   51.90      3.98      71290   
   55.57      3.56     272312   
   28.21      2.92      93130   
    6.25      1.74      82043   

And so on. As you can see it does not detect cycles; that would be an
interesting extension, but I have not yet found a useful way of breaking
cycles in C-based interpreted languages, so I currently have no need to
implement it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]