Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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.

Cheers,
Ovid

New address of my CGI Course.

Comment on Profiling without Devel::DProf
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! ;)

      -sam

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

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.

    --
    John.

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 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, ilya@iponweb.net
    CTO IPonWEB (UK) Ltd
    Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
    Personal website - http://martynov.org

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://295320]
Approved by dws
Front-paged by vek
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-07-31 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (255 votes), past polls