unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* limited callgrind parser in scheme
@ 2007-05-31 21:16 Andy Wingo
  2007-05-31 21:33 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Wingo @ 2007-05-31 21:16 UTC (permalink / raw)
  To: guile-user, valgrind-users

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   gc-card.c:scm_i_sweep_card[/opt/guile/lib/libguile.so.17.0.1]
 1272.79      7.47      74218   eval.c:ceval[/opt/guile/lib/libguile.so.17.0.1]
    7.13      7.13     491863   ???:pthread_getspecific[/lib/libpthread-2.5.so]
    6.19      6.19     191068   ???:pthread_mutex_lock[/lib/libpthread-2.5.so]
    7.23      6.08     227140   ports.c:scm_getc[/opt/guile/lib/libguile.so.17.0.1]
    4.07      4.07     191067   ???:__pthread_mutex_unlock_usercnt[/lib/libpthread-2.5.so]
   51.90      3.98      71290   gc-mark.c:scm_gc_mark_dependencies[/opt/guile/lib/libguile.so.17.0.1]
   55.57      3.56     272312   gc-mark.c:scm_gc_mark[/opt/guile/lib/libguile.so.17.0.1]
   28.21      2.92      93130   strings.c:scm_i_string_writable_chars[/opt/guile/lib/libguile.so.17.0.1]
    6.25      1.74      82043   pairs.c:scm_cons[/opt/guile/lib/libguile.so.17.0.1]

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.

Enjoy,

Andy.
-- 
http://wingolog.org/


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: limited callgrind parser in scheme
  2007-05-31 21:16 limited callgrind parser in scheme Andy Wingo
@ 2007-05-31 21:33 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2007-05-31 21:33 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Thu, 2007-05-31 at 23:16 +0200, Andy Wingo wrote:
> Hey all,
> 
> I wrote a parser for the callgrind profiling format in Guile Scheme.

And, er, here it is!
-- 
http://wingolog.org/

[-- Attachment #2: callgrind-output-gprof --]
[-- Type: application/x-shellscript, Size: 9134 bytes --]

[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-31 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 21:16 limited callgrind parser in scheme Andy Wingo
2007-05-31 21:33 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).