Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: profiling an XS module

by rg0now (Chaplain)
on May 31, 2007 at 11:52 UTC ( #618465=note: print w/ replies, xml ) Need Help??


in reply to profiling an XS module

Well, if I were you, I would stop thinking in the good old GNU gprof-style profiling model, and I would start to look into modern and less tedious profiling frameworks. Unfortunately, with gprof you do not have really good chances of getting anything useful on a modern CPU unless you run your code for minutes, because it samples your code only every 10 millisconds or so, which is a bit too rare nowadays.

In particular, I am thinking about you could try Valgrind or OProfile (if you are lucky enough to be using Linux). Both allow you to profile code without specially compiling it for profiling, and they also provide much better granularity than gprof. With the latter I don't have too much experience, but with the former (and, especially, callgrind) I have already had the chance to make myself acquainted to my greatest programming and profiling pleasure.


Comment on Re: profiling an XS module
Re^2: profiling an XS module
by salva (Monsignor) on Jun 04, 2007 at 17:28 UTC
    Today, I have been able to try Valgrind profiler, callgrind, and it is amazing, specially when combined with KCacheGrind.

    Thank you for the pointer!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://618465]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-11-27 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (188 votes), past polls