Next: Dumpvalue | Previous: DirHandle | [Table of Contents] | [Index] |
dprofpp [-a|-z|-l|-v|-U] [-s|-r|-u] [-q] [-F] [-I|-E] [-O cnt] [-A] [-R] [-S] [-g subroutine] [profile]
dprofpp -T [-F] [-g subroutine] [profile]
dprofpp -t [-F] [-g subroutine] [profile]
dprofpp -p script [-Q] [other opts]
dprofpp -V [profile]
The dprofpp command interprets profile data produced by a profiler, such
as the Devel::DProf profiler. Dprofpp will read the file tmon.out
and
will display the 15 subroutines which are using the most time. By default
the times for each subroutine are given exclusive of the times of their
child subroutines.
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. The output of dprofpp depends on the flags to the program and the version of Perl you're using. $ 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 the section on PROFILE FORMAT in the Devel::DProf manpage for a description of the raw profile.
Columns are:
*::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
subroutine
and whatever is called from it.
The environment variable DPROFPP_OPTS can be set to a string containing options for dprofpp. You might use this if you prefer -I over -E or if you want -F on all the time.
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.
Applications which call _exit() or exec() 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 the BUGS entry in the Devel::DProf manpage.
Mail bug reports and feature requests to the perl5-porters mailing list at
<perl5-porters@perl.org>
. Bug reports should include the
output of the -V option.
dprofpp - profile processor tmon.out - raw profile
the perl manpage, the Devel::DProf manpage, times(2)