Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Profiling without Devel::DProf

by Ovid (Cardinal)
on Sep 30, 2003 at 15:38 UTC ( #295320=perlquestion: print w/replies, xml ) Need Help??
Ovid has asked for the wisdom of the Perl Monks concerning the following question:

Devel::DProf is a wonderful module. It's also a petulant brat and is given to segfault if it thinks you're looking at it funny. My experience with this love/hate relationship has led me to believe that a quick recompilation of Perl is all that is required to fix the latest segfault I'm facing.

Recompiling Perl is not an option available to me at work. Do you have any recommendations for profiling? Devel::SmallProf seems too fine-grained and the only other thing I can think of is to spider the symbol tables and add pre and post hooks to time all subroutines. That seems just awful to me (not to mention that the timing routines will throw the times off). There has got to be a better way.


New address of my CGI Course.

Replies are listed 'Best First'.
Re: Profiling without Devel::DProf
by jmcnamara (Monsignor) on Sep 30, 2003 at 15:52 UTC

    In the past I found Devel::AutoProfiler to be quite good. From the pod:
    The profiler module is completely automatic in its basic mode. You simply "use" the module at the top of you main script. The module will then automatically instrument all subroutines in the code, profile each subroutine call during the execution of the script, and print out a report of usage.


Re: Profiling without Devel::DProf
by perrin (Chancellor) on Sep 30, 2003 at 16:05 UTC
    Devel::Profiler is similar to DProf, but will not cause those segfaults. It has much more overhead than DProf though.
Re: Profiling without Devel::DProf
by adrianh (Chancellor) on Sep 30, 2003 at 15:45 UTC
      That module (which was new to me, actually) uses the same DB hooks that Devel::DProf uses. As a result it is likely to be just as unstable as Devel::DProf since it's actually the DB hooks that are usually at fault when a Devel::DProf seg-faults.

      I second perrin's recommendation to try my Devel::DProf replacement, Devel::Profiler! ;)


        ++Devel::Profiler (having just unsuccessfully battled with a seg faulting Devel::DProf :-)

Re: Profiling without Devel::DProf
by IlyaM (Parson) on Oct 01, 2003 at 16:02 UTC
    ...quick recompilation of Perl is all that is required to fix the latest segfault I'm facing. Recompiling Perl is not an option available to me at work

    You can take sources of Devel::DProf from blead perl and compile it with your version of Perl. Last time I tried Devel::DProf from blead perl compiled and worked with 5.6.1 just fine.

    Ilya Martynov,
    CTO IPonWEB (UK) Ltd
    Quality Perl Programming and Unix Support UK managed @ offshore prices -
    Personal website -

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://295320]
Approved by dws
Front-paged by vek
[thepkd]: temporary variables
[moritz]: [ { a => [ { b => 1 } ] } ]
[choroba]: dereference ne creation
[choroba]: at least in my lingo
[moritz]: .oO( oh temps, oh moritz )
[GotToBTru]: you are correct, choroba, but of course there is no point in doing one without the other
[GotToBTru]: un less you're working on write-only memory
[1nickt]: my $x = $aohoaoh->[0]->{' foo'}->[0]->{'bar' }; should work
[thepkd]: not indexing
[thepkd]: getting data out of the ds

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2016-12-06 13:21 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (104 votes). Check out past polls.