Then run dprofpp to analyze the profile. The output of dprofpp depends
on the flags to the program and the version of Perl youre using.
The dprofpp tool can also run the profiler before analyzing the profile
data. The above two commands can be executed with one dprofpp command.
Tag | Description |
-a
|
Sort alphabetically by subroutine names.
|
-d
|
Reverse whatever sort is used
|
-A
|
Count timing for autoloaded subroutine as timing for *::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.
|
-R
|
Count anonymous subroutines defined in the same package separately.
|
-E
|
(default) Display all subroutine times exclusive of child subroutine times.
|
-F
|
Force the generation of fake exit timestamps if dprofpp reports that the
profile is garbled. This is only useful if dprofpp determines that the
profile is garbled due to missing exit timestamps. Youre on your own if
you do this. Consult the BUGS section.
|
-I
|
Display all subroutine times inclusive of child subroutine times.
|
-l
|
Sort by number of calls to the subroutines. This may help identify
candidates for inlining.
|
-O cnt
|
Show only cnt subroutines. The default is 15.
|
-p script
|
Tells dprofpp that it should profile the given script and then interpret its
profile data. See -Q.
|
-Q
|
Used with -p to tell dprofpp to quit after profiling the script, without
interpreting the data.
|
-q
|
Do not display column headers.
|
-r
|
Display elapsed real times rather than user+system times.
|
-s
|
Display system times rather than user+system times.
|
-T
|
Display subroutine call tree to stdout. Subroutine statistics are
not displayed.
|
-t
|
Display subroutine call tree to stdout. Subroutine statistics are not
displayed. When a function is called multiple consecutive times at the same
calling level then it is displayed once with a repeat count.
|
-S
|
Display merged subroutine call tree to stdout. Statistics are
displayed for each branch of the tree.
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 with regard to inclusive time.
|
-U
|
Do not sort. Display in the order found in the raw profile.
|
-u
|
Display user times rather than user+system times.
|
-V
|
Print dprofpps version number and exit. If a raw profile is found then its
XS_VERSION variable will be displayed, too.
|
-v
|
Sort by average time spent in subroutines during each call. This may help
identify candidates for inlining.
|
-z
|
(default) Sort by amount of user+system time used. The first few lines
should show you which subroutines are using the most time.
|
-g subroutine
|
Ignore subroutines except subroutine and whatever is called from it.
|
-G <regexp>
|
Aggregate Group all calls matching the pattern together.
For example this can be used to group all calls of a set of packages
-G "(package1::)|(package2::)|(package3::)"
|
or to group subroutines by name:
|
-P
|
Used with -G to aggregate Pull together all calls that did not match -G.
|
-f <regexp>
|
Filter all calls matching the pattern.
|
-h
|
Display brief help and exit.
|
-H
|
Display long help and exit.
|
This was added fairly lazily, so there are some undesirable side effects.
Options on the commandline should override options in DPROFPP_OPTS--but
dont count on that in this version.
Any bugs in Devel::DProf, or any profiler generating the profile data, could
be visible here. See BUGS in Devel::DProf.