1DPROFPP(1)            User Contributed Perl Documentation           DPROFPP(1)
2
3
4

NAME

6       dprofpp - display perl profile data
7

SYNOPSIS

9       dprofpp [-a|-z|-l|-v|-U] [-d] [-s|-r|-u] [-q] [-F] [-I|-E] [-O cnt]
10       [-A] [-R] [-S] [-g subroutine] [-G <regexp> [-P]] [-f <regexp>]
11       [profile]
12
13       dprofpp -T [-F] [-g subroutine] [profile]
14
15       dprofpp -t [-F] [-g subroutine] [profile]
16
17       dprofpp -G <regexp> [-P] [profile]
18
19       dprofpp -p script [-Q] [other opts]
20
21       dprofpp -V [profile]
22

DESCRIPTION

24       The dprofpp command interprets profile data produced by a profiler,
25       such as the Devel::DProf profiler.  Dprofpp will read the file tmon.out
26       and display the 15 subroutines which are using the most time.  By
27       default the times for each subroutine are given exclusive of the times
28       of their child subroutines.
29
30       To profile a Perl script run the perl interpreter with the -d switch.
31       So to profile script test.pl with Devel::DProf use the following:
32
33               $ perl5 -d:DProf test.pl
34
35       Then run dprofpp to analyze the profile.  The output of dprofpp depends
36       on the flags to the program and the version of Perl you're using.
37
38               $ dprofpp -u
39               Total Elapsed Time =    1.67 Seconds
40                        User Time =    0.61 Seconds
41               Exclusive Times
42               %Time Seconds     #Calls sec/call Name
43                52.4   0.320          2   0.1600 main::foo
44                45.9   0.280        200   0.0014 main::bar
45                0.00   0.000          1   0.0000 DynaLoader::import
46                0.00   0.000          1   0.0000 main::baz
47
48       The dprofpp tool can also run the profiler before analyzing the profile
49       data.  The above two commands can be executed with one dprofpp command.
50
51               $ dprofpp -u -p test.pl
52
53       Consult "PROFILE FORMAT" in Devel::DProf for a description of the raw
54       profile.
55

OUTPUT

57       Columns are:
58
59       %Time
60           Percentage of time spent in this routine.
61
62       #Calls
63           Number of calls to this routine.
64
65       sec/call
66           Average number of seconds per call to this routine.
67
68       Name
69           Name of routine.
70
71       CumulS
72           Time (in seconds) spent in this routine and routines called from
73           it.
74
75       ExclSec
76           Time (in seconds) spent in this routine (not including those called
77           from it).
78
79       Csec/c
80           Average time (in seconds) spent in each call of this routine
81           (including those called from it).
82

OPTIONS

84       -a   Sort alphabetically by subroutine names.
85
86       -d   Reverse whatever sort is used
87
88       -A   Count timing for autoloaded subroutine as timing for *::AUTOLOAD.
89            Otherwise the time to autoload it is counted as time of the
90            subroutine itself (there is no way to separate autoload time from
91            run time).
92
93            This is going to be irrelevant with newer Perls.  They will inform
94            "Devel::DProf" when the "AUTOLOAD" switches to actual subroutine,
95            so a separate statistics for "AUTOLOAD" will be collected no
96            matter whether this option is set.
97
98       -R   Count anonymous subroutines defined in the same package
99            separately.
100
101       -E   (default)  Display all subroutine times exclusive of child
102            subroutine times.
103
104       -F   Force the generation of fake exit timestamps if dprofpp reports
105            that the profile is garbled.  This is only useful if dprofpp
106            determines that the profile is garbled due to missing exit
107            timestamps.  You're on your own if you do this.  Consult the BUGS
108            section.
109
110       -I   Display all subroutine times inclusive of child subroutine times.
111
112       -l   Sort by number of calls to the subroutines.  This may help
113            identify candidates for inlining.
114
115       -O cnt
116            Show only cnt subroutines.  The default is 15.
117
118       -p script
119            Tells dprofpp that it should profile the given script and then
120            interpret its profile data.  See -Q.
121
122       -Q   Used with -p to tell dprofpp to quit after profiling the script,
123            without interpreting the data.
124
125       -q   Do not display column headers.
126
127       -r   Display elapsed real times rather than user+system times.
128
129       -s   Display system times rather than user+system times.
130
131       -T   Display subroutine call tree to stdout.  Subroutine statistics are
132            not displayed.
133
134       -t   Display subroutine call tree to stdout.  Subroutine statistics are
135            not displayed.  When a function is called multiple consecutive
136            times at the same calling level then it is displayed once with a
137            repeat count.
138
139       -S   Display merged subroutine call tree to stdout.  Statistics are
140            displayed for each branch of the tree.
141
142            When a function is called multiple (not necessarily consecutive)
143            times in the same branch then all these calls go into one branch
144            of the next level.  A repeat count is output together with
145            combined inclusive, exclusive and kids time.
146
147            Branches are sorted with regard to inclusive time.
148
149       -U   Do not sort.  Display in the order found in the raw profile.
150
151       -u   Display user times rather than user+system times.
152
153       -V   Print dprofpp's version number and exit.  If a raw profile is
154            found then its XS_VERSION variable will be displayed, too.
155
156       -v   Sort by average time spent in subroutines during each call.  This
157            may help identify candidates for inlining.
158
159       -z   (default) Sort by amount of user+system time used.  The first few
160            lines should show you which subroutines are using the most time.
161
162       -g "subroutine"
163            Ignore subroutines except "subroutine" and whatever is called from
164            it.
165
166       -G <regexp>
167            Aggregate "Group" all calls matching the pattern together.  For
168            example this can be used to group all calls of a set of packages
169
170              -G "(package1::)|(package2::)|(package3::)"
171
172            or to group subroutines by name:
173
174              -G "getNum"
175
176       -P   Used with -G to aggregate "Pull" together all calls that did not
177            match -G.
178
179       -f <regexp>
180            Filter all calls matching the pattern.
181
182       -h   Display brief help and exit.
183
184       -H   Display long help and exit.
185

ENVIRONMENT

187       The environment variable DPROFPP_OPTS can be set to a string containing
188       options for dprofpp.  You might use this if you prefer -I over -E or if
189       you want -F on all the time.
190
191       This was added fairly lazily, so there are some undesirable side
192       effects.  Options on the commandline should override options in
193       DPROFPP_OPTS--but don't count on that in this version.
194

BUGS

196       Applications which call _exit() or exec() from within a subroutine will
197       leave an incomplete profile.  See the -F option.
198
199       Any bugs in Devel::DProf, or any profiler generating the profile data,
200       could be visible here.  See "BUGS" in Devel::DProf.
201
202       Mail bug reports and feature requests to the perl5-porters mailing list
203       at <perl5-porters@perl.org>.  Bug reports should include the output of
204       the -V option.
205

FILES

207               dprofpp         - profile processor
208               tmon.out        - raw profile
209

SEE ALSO

211       perl, Devel::DProf, times(2)
212
213
214
215perl v5.30.0                      2019-07-26                        DPROFPP(1)
Impressum