dprofpp -T [-F] [-g subroutine] [profile]
dprofpp -t [-F] [-g subroutine] [profile]
dprofpp -p script [-Q] [other opts]
dprofpp -V [profile]
To profile a Perl script run the perl interpreter with the -d switch. So to profile script test.pl with Devel::DProf the following command should be used.
$ perl5 -d:DProf test.pl
Then run dprofpp to analyze the profile.
$ dprofpp -u
Total Elapsed Time = 1.67 Seconds
User Time = 0.61 Seconds
Exclusive Times
%Time Seconds #Calls sec/call Name
52.4 0.320 2 0.1600 main::foo
45.9 0.280 200 0.0014 main::bar
0.00 0.000 1 0.0000 DynaLoader::import
0.00 0.000 1 0.0000 main::baz
The dprofpp tool can also run the profiler before analyzing the profile data. The above two commands can be executed with one dprofpp command.
$ dprofpp -u -p test.pl
Consult Devel for a description of the raw profile.
*::AUTOLOAD. Otherwise the time to autoload it is counted as time of the subroutine
itself (there is no way to separate autoload time from run time).
This is going to be irrelevant with newer Perls. They will inform
Devel::DProf when the AUTOLOAD switches to actual subroutine, so a separate statistics for AUTOLOAD will be collected no matter whether this option is set.
When a function is called multiple (not necessarily consecutive) times in the same branch then all these calls go into one branch of the next level. A repeat count is output together with combined inclusive, exclusive and kids time.
Branches are sorted w.r.t. inclusive time.
subroutine and whatever is called from it.
This was added fairly lazily, so there are some undesirable side effects. Options on the commandline should override options in DPROFPP_OPTS--but don't count on that in this version.
die from within an eval for exception handling (catch/throw) or for
setjmp/longjmp may not generate a readable profile. See the -F option.
Applications which call exit from within a subroutine will leave an incomplete profile. See the -F option.
Any bugs in Devel::DProf, or any profiler generating the profile data, could be visible here. See Devel.
Mail bug reports and feature requests to the perl5-porters mailing list at <perl5-porters@africa.nicoh.com>. Bug reports should include the output of the -V option.
dprofpp - profile processor
tmon.out - raw profile
times(2)