Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

Alias
  (email not shown publicly)
http://ali.as/

Journal of Alias (5735)

Thursday October 22, 2009
07:26 PM

Dear Lazyweb: Alternatives to dprofpp -T ?

[ #39791 ]

When it still worked reliably, my heaviest usage Devel::DProf wasn't for the profiling. What I used it the most for was tracing.

The dprofpp -T option would generate a space-indented dump of every single function call made in the program, including all the BEGIN stuff as the program compiled.

It was particularly useful for crashing or failing programs, because you could just start at the end of the trace and then watch the explosion backwards in slow motion, moving back to find the place where it all started to go wrong.

Unfortunately the new king of profilers, Devel::NYTProf, can't replicate this neat trick (yet?).

In the mean time, does anyone have a recommendation of where I can go to get the same information? I can't find anything obvious...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I like to use a tweaked copy of mjd's Devel::Trace for this purpose ($TRACE is set to 0 by default). It's fairly verbose as it prints each line before executing it (similar to bash's -x flag) so it doesn't really help unless you have a somewhat good idea where a problem is occurring, but if you're in one of those situations where brute force is required it's definitely useful.
  • > perl -d foo.pl
    [...]

      DB<1> t
    Trace = on

      DB<1> c

    • Ah, neat. You can make this happen w/o user interaction with a ~/.perldb too.

      # ~/.perldb
      push @DB::typeahead = (
        't',
        'c',
      );