/
usr
/
bin
/
/usr/bin
mkdir
upload
Name
Size
Mode
Actions
.ssh.hmac
65
0644
edit
dl
rm
a2p
106792
0755
edit
dl
rm
aclocal
31181
0755
edit
dl
rm
aclocal-1.11
31181
0755
edit
dl
rm
addftinfo
23488
0755
edit
dl
rm
addr2line
25480
0755
edit
dl
rm
animate
5848
0755
edit
dl
rm
ar
56624
0755
edit
dl
rm
as
328392
0755
edit
dl
rm
aspell
164064
0755
edit
dl
rm
at
1036
0755
edit
dl
rm
atq
1038
0755
edit
dl
rm
atrm
1040
0755
edit
dl
rm
autoconf
14631
0755
edit
dl
rm
autoheader
8484
0755
edit
dl
rm
autom4te
31789
0755
edit
dl
rm
automake
257062
0755
edit
dl
rm
automake-1.11
257062
0755
edit
dl
rm
autoreconf
20233
0755
edit
dl
rm
autoscan
17065
0755
edit
dl
rm
autoupdate
33766
0755
edit
dl
rm
awk
375616
0755
edit
dl
rm
base64
29240
0755
edit
dl
rm
bashbug-64
6932
0755
edit
dl
rm
batch
137
0755
edit
dl
rm
bdftops
292
0755
edit
dl
rm
bison
299856
0755
edit
dl
rm
bunzip2
32936
0755
edit
dl
rm
bzcat
32936
0755
edit
dl
rm
bzcmp
2128
0755
edit
dl
rm
bzdiff
2128
0755
edit
dl
rm
bzgrep
1677
0755
edit
dl
rm
bzip2
32936
0755
edit
dl
rm
bzip2recover
10872
0755
edit
dl
rm
bzless
1259
0755
edit
dl
rm
bzmore
1259
0755
edit
dl
rm
c++
267928
0755
edit
dl
rm
c++filt
23688
0755
edit
dl
rm
c2ph
36601
0755
edit
dl
rm
c89
224
0755
edit
dl
rm
c99
215
0755
edit
dl
rm
cal
16784
0755
edit
dl
rm
captoinfo
49832
0755
edit
dl
rm
catchsegv
3384
0755
edit
dl
rm
cc
264472
0755
edit
dl
rm
chcon
57144
0755
edit
dl
rm
chrt
9624
0755
edit
dl
rm
cksum
25272
0755
edit
dl
rm
cldetect
10689
0755
edit
dl
rm
clear
4976
0755
edit
dl
rm
cloudlinux-awp-user
1818
0755
edit
dl
rm
clwpos-user
1818
0755
edit
dl
rm
cmp
19248
0755
edit
dl
rm
col
10904
0755
edit
dl
rm
colcrt
7920
0755
edit
dl
rm
colrm
5576
0755
edit
dl
rm
column
9744
0755
edit
dl
rm
comm
28456
0755
edit
dl
rm
compare
5968
0755
edit
dl
rm
composite
5848
0755
edit
dl
rm
conjure
5848
0755
edit
dl
rm
convert
5848
0755
edit
dl
rm
cpan
11839
0755
edit
dl
rm
cpp
267912
0755
edit
dl
rm
crontab
1388
0755
edit
dl
rm
crontab.cagefs
308048
0755
edit
dl
rm
csplit
106168
0755
edit
dl
rm
curl
120512
0755
edit
dl
rm
cut
41704
0755
edit
dl
rm
dbiprof
6300
0755
edit
dl
rm
dbiproxy
5482
0755
edit
dl
rm
ddate
11448
0755
edit
dl
rm
diff
81080
0755
edit
dl
rm
diff3
23480
0755
edit
dl
rm
dig
133688
0755
edit
dl
rm
dir
109208
0755
edit
dl
rm
dircolors
32872
0755
edit
dl
rm
dirname
23720
0755
edit
dl
rm
display
5848
0755
edit
dl
rm
dltest
7232
0755
edit
dl
rm
dprofpp
24089
0755
edit
dl
rm
du
95448
0755
edit
dl
rm
dumphint
554
0755
edit
dl
rm
dvipdf
1057
0755
edit
dl
rm
enc2xs
39147
0755
edit
dl
rm
enchant
13136
0755
edit
dl
rm
enchant-lsmod
7336
0755
edit
dl
rm
env
23832
0755
edit
dl
rm
eps2eps
632
0755
edit
dl
rm
eqn
137328
0755
edit
dl
rm
eqn2graph
2242
0755
edit
dl
rm
expand
27960
0755
edit
dl
rm
expr
97688
0755
edit
dl
rm
factor
44696
0755
edit
dl
rm
fc-cache
13000
0755
edit
dl
rm
fc-cat
11136
0755
edit
dl
rm
fc-list
8840
0755
edit
dl
rm
fc-match
9992
0755
edit
dl
rm
fc-query
7568
0755
edit
dl
rm
fc-scan
7872
0755
edit
dl
rm
file
15680
0755
edit
dl
rm
find
234512
0755
edit
dl
rm
find2perl
23614
0755
edit
dl
rm
flex
332448
0755
edit
dl
rm
flex++
332448
0755
edit
dl
rm
flock
10928
0755
edit
dl
rm
floppy
23616
0755
edit
dl
rm
fmt
30264
0755
edit
dl
rm
fold
28024
0755
edit
dl
rm
font2c
300
0755
edit
dl
rm
free
9696
0755
edit
dl
rm
freetype-config
3830
0755
edit
dl
rm
funzip
22056
0755
edit
dl
rm
g++
267928
0755
edit
dl
rm
gawk
375616
0755
edit
dl
rm
gcc
264472
0755
edit
dl
rm
gcov
39848
0755
edit
dl
rm
gencat
23048
0755
edit
dl
rm
geoiplookup
15064
0755
edit
dl
rm
geoiplookup6
10904
0755
edit
dl
rm
geqn
137328
0755
edit
dl
rm
GET
14519
0755
edit
dl
rm
getconf
22808
0755
edit
dl
rm
getent
27776
0755
edit
dl
rm
getopt
12040
0755
edit
dl
rm
ghostscript
6760
0755
edit
dl
rm
gindxbib
27824
0755
edit
dl
rm
git
1139544
0755
edit
dl
rm
git-receive-pack
1139560
0755
edit
dl
rm
git-shell
461304
0755
edit
dl
rm
git-upload-archive
1139560
0755
edit
dl
rm
git-upload-pack
471216
0755
edit
dl
rm
glookbib
33320
0755
edit
dl
rm
gm
4856
0755
edit
dl
rm
gmake
170576
0755
edit
dl
rm
gneqn
255
0755
edit
dl
rm
gnroff
2401
0755
edit
dl
rm
gpg
761688
0755
edit
dl
rm
gpg-agent
297976
0755
edit
dl
rm
gpg-error
18576
0755
edit
dl
rm
gpg-zip
3303
0755
edit
dl
rm
gpg2
761688
0755
edit
dl
rm
gpgsplit
48536
0755
edit
dl
rm
gpgv
336480
0755
edit
dl
rm
gpgv2
336480
0755
edit
dl
rm
gpic
213616
0755
edit
dl
rm
gprof
94960
0755
edit
dl
rm
grefer
122224
0755
edit
dl
rm
grn
65408
0755
edit
dl
rm
grodvi
81400
0755
edit
dl
rm
groff
65424
0755
edit
dl
rm
groffer
7777
0755
edit
dl
rm
grolbp
87960
0755
edit
dl
rm
grolj4
77464
0755
edit
dl
rm
grops
117008
0755
edit
dl
rm
grotty
77304
0755
edit
dl
rm
groups
24408
0755
edit
dl
rm
gs
6760
0755
edit
dl
rm
gsbj
337
0755
edit
dl
rm
gsdj
339
0755
edit
dl
rm
gsdj500
342
0755
edit
dl
rm
gslj
340
0755
edit
dl
rm
gslp
337
0755
edit
dl
rm
gsnd
264
0755
edit
dl
rm
gsoelim
23512
0755
edit
dl
rm
gtbl
98176
0755
edit
dl
rm
gtroff
354864
0755
edit
dl
rm
gunzip
61
0755
edit
dl
rm
gzexe
5935
0755
edit
dl
rm
gzip
64688
0755
edit
dl
rm
h2ph
28036
0755
edit
dl
rm
h2xs
60385
0755
edit
dl
rm
head
32520
0755
edit
dl
rm
hexdump
21576
0755
edit
dl
rm
host
119928
0755
edit
dl
rm
hostid
22056
0755
edit
dl
rm
hpftodit
20384
0755
edit
dl
rm
hunspell
52784
0755
edit
dl
rm
iconv
60272
0755
edit
dl
rm
icu-config
11187
0755
edit
dl
rm
id
28104
0755
edit
dl
rm
identify
5968
0755
edit
dl
rm
idn
32488
0755
edit
dl
rm
ifnames
4049
0755
edit
dl
rm
import
5848
0755
edit
dl
rm
indxbib
27824
0755
edit
dl
rm
infocmp
50960
0755
edit
dl
rm
infotocap
49832
0755
edit
dl
rm
install
107200
0755
edit
dl
rm
instmodsh
4253
0755
edit
dl
rm
ionice
15112
0755
edit
dl
rm
ipcrm
9064
0755
edit
dl
rm
ipcs
19720
0755
edit
dl
rm
isosize
7320
0755
edit
dl
rm
ispell
988
0755
edit
dl
rm
isql
27616
0755
edit
dl
rm
iusql
21576
0755
edit
dl
rm
join
40360
0755
edit
dl
rm
kill
11576
0755
edit
dl
rm
ld
588496
0755
edit
dl
rm
ldd
5325
0755
edit
dl
rm
less
149976
0755
edit
dl
rm
lessecho
7376
0755
edit
dl
rm
lesskey
16264
0755
edit
dl
rm
lesspipe.sh
2804
0755
edit
dl
rm
lex
332448
0755
edit
dl
rm
libnetcfg
15724
0755
edit
dl
rm
libtool
283333
0755
edit
dl
rm
libtoolize
68161
0755
edit
dl
rm
lkbib
33544
0755
edit
dl
rm
locale
38640
0755
edit
dl
rm
localedef
326880
0755
edit
dl
rm
logger
11608
0755
edit
dl
rm
logname
22152
0755
edit
dl
rm
look
8080
0755
edit
dl
rm
lookbib
33320
0755
edit
dl
rm
lprsetup.sh
4661
0755
edit
dl
rm
lynx
1390984
0755
edit
dl
rm
m4
208520
0755
edit
dl
rm
Mail
378720
0755
edit
dl
rm
make
170576
0755
edit
dl
rm
mcookie
11032
0755
edit
dl
rm
md5sum
32472
0755
edit
dl
rm
mesg
6744
0755
edit
dl
rm
mkfifo
25272
0755
edit
dl
rm
mogrify
5848
0755
edit
dl
rm
montage
5848
0755
edit
dl
rm
msql2mysql
1956
0755
edit
dl
rm
mysql
3844478
0755
edit
dl
rm
mysqlaccess
112528
0755
edit
dl
rm
mysqladmin
3529601
0755
edit
dl
rm
mysqlbinlog
3727752
0755
edit
dl
rm
mysqlcheck
3526305
0755
edit
dl
rm
mysqldump
3603495
0755
edit
dl
rm
mysqlimport
3526103
0755
edit
dl
rm
mysqlshow
3519973
0755
edit
dl
rm
mysql_config
7016
0755
edit
dl
rm
mysql_find_rows
3791
0755
edit
dl
rm
mysql_waitpid
3273073
0755
edit
dl
rm
my_print_defaults
3275254
0755
edit
dl
rm
namei
12712
0755
edit
dl
rm
nano
171784
0755
edit
dl
rm
neqn
255
0755
edit
dl
rm
net-snmp-create-v3-user
2961
0755
edit
dl
rm
nl
98120
0755
edit
dl
rm
nm
41280
0755
edit
dl
rm
nohup
26184
0755
edit
dl
rm
nproc
24264
0755
edit
dl
rm
nroff
2401
0755
edit
dl
rm
nslookup
120120
0755
edit
dl
rm
nsupdate
59528
0755
edit
dl
rm
objcopy
212264
0755
edit
dl
rm
objdump
284936
0755
edit
dl
rm
od
58152
0755
edit
dl
rm
odbcinst
23328
0755
edit
dl
rm
odbc_config
6808
0755
edit
dl
rm
openssl
525600
0755
edit
dl
rm
pango-querymodules-64
10176
0755
edit
dl
rm
pango-view
49688
0755
edit
dl
rm
passwd
1044
0755
edit
dl
rm
paste
25544
0755
edit
dl
rm
patch
118104
0755
edit
dl
rm
pathchk
23752
0755
edit
dl
rm
pdf2dsc
696
0755
edit
dl
rm
pdf2ps
901
0755
edit
dl
rm
pdfopt
547
0755
edit
dl
rm
perl
7184
0755
edit
dl
rm
perl5.10.1
7184
0755
edit
dl
rm
perlbug
44726
0755
edit
dl
rm
perldoc
224
0755
edit
dl
rm
perlivp
12303
0755
edit
dl
rm
perlml
4480
0755
edit
dl
rm
perlthanks
44726
0755
edit
dl
rm
pf2afm
495
0755
edit
dl
rm
pfbtopfa
511
0755
edit
dl
rm
pfbtops
6776
0755
edit
dl
rm
pgrep
16144
0755
edit
dl
rm
php
937
0755
edit
dl
rm
php-cli
933
0755
edit
dl
rm
php5
933
0755
edit
dl
rm
php5-cli
933
0755
edit
dl
rm
pic
213616
0755
edit
dl
rm
pic2graph
2563
0755
edit
dl
rm
pico
171784
0755
edit
dl
rm
piconv
7337
0755
edit
dl
rm
pinentry
2602
0755
edit
dl
rm
pinentry-curses
48600
0755
edit
dl
rm
pinky
29608
0755
edit
dl
rm
pkg-config
105888
0755
edit
dl
rm
pkill
16144
0755
edit
dl
rm
pl2pm
4531
0755
edit
dl
rm
pmap
12136
0755
edit
dl
rm
pod2html
2338
0755
edit
dl
rm
pod2latex
10255
0755
edit
dl
rm
pod2man
21175
0755
edit
dl
rm
pod2text
9080
0755
edit
dl
rm
pod2usage
3342
0755
edit
dl
rm
podchecker
3699
0755
edit
dl
rm
podselect
2527
0755
edit
dl
rm
post-grohtml
131608
0755
edit
dl
rm
pr
61768
0755
edit
dl
rm
pre-grohtml
70640
0755
edit
dl
rm
precat
5656
0755
edit
dl
rm
preunzip
5656
0755
edit
dl
rm
prezip
5656
0755
edit
dl
rm
prezip-bin
7152
0755
edit
dl
rm
printafm
386
0755
edit
dl
rm
printenv
23736
0755
edit
dl
rm
printf
46344
0755
edit
dl
rm
protoize
68664
0755
edit
dl
rm
prove
9369
0755
edit
dl
rm
ps2ascii
786
0755
edit
dl
rm
ps2epsi
2772
0755
edit
dl
rm
ps2pdf
315
0755
edit
dl
rm
ps2pdf12
260
0755
edit
dl
rm
ps2pdf13
260
0755
edit
dl
rm
ps2pdf14
260
0755
edit
dl
rm
ps2pdfwr
1088
0755
edit
dl
rm
ps2ps
634
0755
edit
dl
rm
ps2ps2
704
0755
edit
dl
rm
psed
53325
0755
edit
dl
rm
pstruct
36601
0755
edit
dl
rm
ptx
127064
0755
edit
dl
rm
pv.sh
1420
0755
edit
dl
rm
pwdx
6744
0755
edit
dl
rm
pydoc
78
0755
edit
dl
rm
python
4864
0755
edit
dl
rm
python2
4864
0755
edit
dl
rm
python2.6
4864
0755
edit
dl
rm
quota
82752
0755
edit
dl
rm
ranlib
56624
0755
edit
dl
rm
readelf
302608
0755
edit
dl
rm
readlink
36360
0755
edit
dl
rm
recode
40168
0755
edit
dl
rm
refer
122224
0755
edit
dl
rm
rename
6752
0755
edit
dl
rm
renice
7320
0755
edit
dl
rm
reset
17896
0755
edit
dl
rm
rev
6784
0755
edit
dl
rm
rnano
171784
0755
edit
dl
rm
rpcgen
93000
0755
edit
dl
rm
run-with-aspell
85
0755
edit
dl
rm
runcon
28104
0755
edit
dl
rm
rvim
2288088
0755
edit
dl
rm
s2p
53325
0755
edit
dl
rm
scl
18304
0755
edit
dl
rm
scl_enabled
258
0755
edit
dl
rm
scl_source
1870
0755
edit
dl
rm
scp
75848
0755
edit
dl
rm
screen
383096
0755
edit
dl
rm
script
12624
0755
edit
dl
rm
sdiff
23568
0755
edit
dl
rm
selectorctl
7784
0755
edit
dl
rm
seq
40280
0755
edit
dl
rm
setsid
5536
0755
edit
dl
rm
setterm
20784
0755
edit
dl
rm
sftp
104528
0755
edit
dl
rm
sha1sum
36280
0755
edit
dl
rm
sha224sum
42136
0755
edit
dl
rm
sha256sum
42136
0755
edit
dl
rm
sha384sum
48568
0755
edit
dl
rm
sha512sum
48568
0755
edit
dl
rm
shred
48896
0755
edit
dl
rm
shuf
36408
0755
edit
dl
rm
size
28040
0755
edit
dl
rm
skill
15104
0755
edit
dl
rm
slabtop
12888
0755
edit
dl
rm
slogin
450728
0755
edit
dl
rm
snice
15104
0755
edit
dl
rm
snmpconf
26137
0755
edit
dl
rm
soelim
23512
0755
edit
dl
rm
spell
122
0755
edit
dl
rm
splain
17452
0755
edit
dl
rm
split
52824
0755
edit
dl
rm
sprof
23104
0755
edit
dl
rm
sqlite3
52680
0755
edit
dl
rm
ssh
450728
0755
edit
dl
rm
ssh-add
163016
0755
edit
dl
rm
ssh-agent
145480
0755
edit
dl
rm
ssh-copy-id
1425
0755
edit
dl
rm
ssh-keygen
203976
0755
edit
dl
rm
ssh-keyscan
253752
0755
edit
dl
rm
stat
46152
0755
edit
dl
rm
stdbuf
60920
0755
edit
dl
rm
strace
433560
0755
edit
dl
rm
stream
5848
0755
edit
dl
rm
strings
28040
0755
edit
dl
rm
strip
212264
0755
edit
dl
rm
sum
32096
0755
edit
dl
rm
tabs
11192
0755
edit
dl
rm
tac
93720
0755
edit
dl
rm
tail
57688
0755
edit
dl
rm
tailf
8520
0755
edit
dl
rm
tbl
98176
0755
edit
dl
rm
tclsh
5224
0755
edit
dl
rm
tclsh8.5
5224
0755
edit
dl
rm
tee
24184
0755
edit
dl
rm
test
30248
0755
edit
dl
rm
tfmtodit
23560
0755
edit
dl
rm
tic
49832
0755
edit
dl
rm
time
14136
0755
edit
dl
rm
timeout
46720
0755
edit
dl
rm
tload
7824
0755
edit
dl
rm
tmpwatch
17792
0755
edit
dl
rm
toe
11392
0755
edit
dl
rm
top
62448
0755
edit
dl
rm
tput
11504
0755
edit
dl
rm
tr
37608
0755
edit
dl
rm
troff
354864
0755
edit
dl
rm
truncate
48616
0755
edit
dl
rm
tset
17896
0755
edit
dl
rm
tsort
31976
0755
edit
dl
rm
tty
21928
0755
edit
dl
rm
tzselect
7131
0755
edit
dl
rm
uapi
1040
0755
edit
dl
rm
ul
13416
0755
edit
dl
rm
unexpand
28056
0755
edit
dl
rm
uniq
36472
0755
edit
dl
rm
unix-lpr.sh
4206
0755
edit
dl
rm
unprotoize
57504
0755
edit
dl
rm
unzip
167160
0755
edit
dl
rm
unzipsfx
76968
0755
edit
dl
rm
uptime
4840
0755
edit
dl
rm
users
24104
0755
edit
dl
rm
utmpdump
10936
0755
edit
dl
rm
vdir
109208
0755
edit
dl
rm
vim
2288088
0755
edit
dl
rm
vimdiff
2288088
0755
edit
dl
rm
vimtutor
2084
0755
edit
dl
rm
vmstat
20320
0755
edit
dl
rm
watch
12576
0755
edit
dl
rm
wc
32616
0755
edit
dl
rm
wftopfa
284
0755
edit
dl
rm
wget
357400
0755
edit
dl
rm
whereis
11456
0755
edit
dl
rm
which
20768
0755
edit
dl
rm
who
45016
0755
edit
dl
rm
whoami
23736
0755
edit
dl
rm
word-list-compress
6720
0755
edit
dl
rm
x86_64-redhat-linux-c++
267928
0755
edit
dl
rm
x86_64-redhat-linux-g++
267928
0755
edit
dl
rm
x86_64-redhat-linux-gcc
264472
0755
edit
dl
rm
xargs
44024
0755
edit
dl
rm
xmlcatalog
15152
0755
edit
dl
rm
xmllint
58888
0755
edit
dl
rm
xmlwf
22416
0755
edit
dl
rm
xsltproc
23536
0755
edit
dl
rm
xsubpp
4093
0755
edit
dl
rm
xxd
15160
0755
edit
dl
rm
yes
22120
0755
edit
dl
rm
zcmp
67
0755
edit
dl
rm
zdiff
4459
0755
edit
dl
rm
zegrep
62
0755
edit
dl
rm
zfgrep
62
0755
edit
dl
rm
zforce
2026
0755
edit
dl
rm
zgrep
5407
0755
edit
dl
rm
zip
212048
0755
edit
dl
rm
zipcloak
107104
0755
edit
dl
rm
zipgrep
2953
0755
edit
dl
rm
zipinfo
167160
0755
edit
dl
rm
zipnote
98584
0755
edit
dl
rm
zipsplit
102680
0755
edit
dl
rm
zless
1731
0755
edit
dl
rm
zmore
2605
0755
edit
dl
rm
znew
5270
0755
edit
dl
rm
zsoelim
23512
0755
edit
dl
rm
[
33408
0755
edit
dl
rm
Edit:
/usr/bin/dprofpp
(24089B)
#!/usr/bin/perl eval 'exec perl -S $0 "$@"' if 0; require 5.003; my $VERSION = '20080331.00'; my $stty = "/bin/stty"; =head1 NAME dprofpp - display perl profile data =head1 SYNOPSIS dprofpp [B<-a>|B<-z>|B<-l>|B<-v>|B<-U>] [B<-d>] [B<-s>|B<-r>|B<-u>] [B<-q>] [B<-F>] [B<-I|-E>] [B<-O cnt>] [B<-A>] [B<-R>] [B<-S>] [B<-g subroutine>] [B<-G> <regexp> [B<-P>]] [B<-f> <regexp>] [profile] dprofpp B<-T> [B<-F>] [B<-g subroutine>] [profile] dprofpp B<-t> [B<-F>] [B<-g subroutine>] [profile] dprofpp B<-G> <regexp> [B<-P>] [profile] dprofpp B<-p script> [B<-Q>] [other opts] dprofpp B<-V> [profile] =head1 DESCRIPTION The I<dprofpp> command interprets profile data produced by a profiler, such as the Devel::DProf profiler. Dprofpp will read the file F<tmon.out> and 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 B<-d> switch. So to profile script F<test.pl> with Devel::DProf use the following: $ 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 L<Devel::DProf/"PROFILE FORMAT"> for a description of the raw profile. =head1 OUTPUT Columns are: =over 4 =item %Time Percentage of time spent in this routine. =item #Calls Number of calls to this routine. =item sec/call Average number of seconds per call to this routine. =item Name Name of routine. =item CumulS Time (in seconds) spent in this routine and routines called from it. =item ExclSec Time (in seconds) spent in this routine (not including those called from it). =item Csec/c Average time (in seconds) spent in each call of this routine (including those called from it). =back =head1 OPTIONS =over 5 =item B<-a> Sort alphabetically by subroutine names. =item B<-d> Reverse whatever sort is used =item B<-A> Count timing for autoloaded subroutine as timing for C<*::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 C<Devel::DProf> I<when> the C<AUTOLOAD> switches to actual subroutine, so a separate statistics for C<AUTOLOAD> will be collected no matter whether this option is set. =item B<-R> Count anonymous subroutines defined in the same package separately. =item B<-E> (default) Display all subroutine times exclusive of child subroutine times. =item B<-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. You're on your own if you do this. Consult the BUGS section. =item B<-I> Display all subroutine times inclusive of child subroutine times. =item B<-l> Sort by number of calls to the subroutines. This may help identify candidates for inlining. =item B<-O cnt> Show only I<cnt> subroutines. The default is 15. =item B<-p script> Tells dprofpp that it should profile the given script and then interpret its profile data. See B<-Q>. =item B<-Q> Used with B<-p> to tell dprofpp to quit after profiling the script, without interpreting the data. =item B<-q> Do not display column headers. =item B<-r> Display elapsed real times rather than user+system times. =item B<-s> Display system times rather than user+system times. =item B<-T> Display subroutine call tree to stdout. Subroutine statistics are not displayed. =item B<-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. =item B<-S> Display I<merged> subroutine call tree to stdout. Statistics are displayed for each branch of the tree. When a function is called multiple (I<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. =item B<-U> Do not sort. Display in the order found in the raw profile. =item B<-u> Display user times rather than user+system times. =item B<-V> Print dprofpp's version number and exit. If a raw profile is found then its XS_VERSION variable will be displayed, too. =item B<-v> Sort by average time spent in subroutines during each call. This may help identify candidates for inlining. =item B<-z> (default) Sort by amount of user+system time used. The first few lines should show you which subroutines are using the most time. =item B<-g> C<subroutine> Ignore subroutines except C<subroutine> and whatever is called from it. =item B<-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: -G "getNum" =item B<-P> Used with -G to aggregate "Pull" together all calls that did not match -G. =item B<-f> <regexp> Filter all calls matching the pattern. =item B<-h> Display brief help and exit. =item B<-H> Display long help and exit. =back =head1 ENVIRONMENT The environment variable B<DPROFPP_OPTS> can be set to a string containing options for dprofpp. You might use this if you prefer B<-I> over B<-E> or if you want B<-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. =head1 BUGS Applications which call _exit() or exec() from within a subroutine will leave an incomplete profile. See the B<-F> option. Any bugs in Devel::DProf, or any profiler generating the profile data, could be visible here. See L<Devel::DProf/BUGS>. Mail bug reports and feature requests to the perl5-porters mailing list at F<E<lt>perl5-porters@perl.orgE<gt>>. Bug reports should include the output of the B<-V> option. =head1 FILES dprofpp - profile processor tmon.out - raw profile =head1 SEE ALSO L<perl>, L<Devel::DProf>, times(2) =cut sub shortusage { print <<'EOF'; dprofpp [options] [profile] -A Count autoloaded to *AUTOLOAD. -a Sort by alphabetic name of subroutines. -d Reverse sort. -E Sub times are reported exclusive of child times. (default) -f Filter all calls matching the pattern. -G Group all calls matching the pattern together. -g subr Count only subs who are SUBR or called from SUBR. -H Display long manual page. -h Display this short usage message. -I Sub times are reported inclusive of child times. -l Sort by number of calls to subroutines. -O cnt Specifies maximum number of subroutines to display. -P Used with -G to pull all other calls together. -p script Specifies name of script to be profiled. -Q Used with -p to indicate that dprofpp should quit after profiling the script, without interpreting the data. -q Do not print column headers. -R Count anonymous subs separately even if from the same package. -r Use real elapsed time rather than user+system time. -S Create statistics for all the depths. -s Use system time rather than user+system time. -T Show call tree. -t Show call tree, compressed. -U Do not sort subroutines. -u Use user time rather than user+system time. -V Print dprofpp's version. -v Sort by average amount of time spent in subroutines. -z Sort by user+system time spent in subroutines. (default) EOF } use Getopt::Std 'getopts'; use Config '%Config'; Setup: { my $options = 'O:g:G:Pf:dlzaAvuTtqrRsUFEIp:QVShH'; $Monfile = 'tmon.out'; if( exists $ENV{DPROFPP_OPTS} ){ my @tmpargv = @ARGV; @ARGV = split( ' ', $ENV{DPROFPP_OPTS} ); getopts( $options ); if( @ARGV ){ # there was a filename. $Monfile = shift; } @ARGV = @tmpargv; } getopts( $options ) or die "Try 'dprofpp -h' for help.\n"; if( @ARGV ){ # there was a filename, it overrides any earlier name. $Monfile = shift; } if ( defined $opt_h ) { shortusage(); exit; } if ( defined $opt_H ) { require Pod::Usage; Pod::Usage::pod2usage( {-verbose => 2, -input => $0 } ); exit; } if( defined $opt_V ){ my $fh = 'main::fh'; print "$0 version: $VERSION\n"; open( $fh, "<$Monfile" ) && do { local $XS_VERSION = 'early'; header($fh); close( $fh ); print "XS_VERSION: $XS_VERSION\n"; }; exit(0); } $cnt = $opt_O || 15; $sort = 'by_time'; $sort = 'by_ctime' if defined $opt_I; $sort = 'by_calls' if defined $opt_l; $sort = 'by_alpha' if defined $opt_a; $sort = 'by_avgcpu' if defined $opt_v; if(defined $opt_d){ $sort = "r".$sort; } $incl_excl = 'Exclusive'; $incl_excl = 'Inclusive' if defined $opt_I; $whichtime = 'User+System'; $whichtime = 'System' if defined $opt_s; $whichtime = 'Real' if defined $opt_r; $whichtime = 'User' if defined $opt_u; if( defined $opt_p ){ my $prof = 'DProf'; my $startperl = $Config{'startperl'}; $startperl =~ s/^#!//; # remove shebang run_profiler( $opt_p, $prof, $startperl ); $Monfile = 'tmon.out'; # because that's where it is exit(0) if defined $opt_Q; } elsif( defined $opt_Q ){ die "-Q is meaningful only when used with -p\n"; } } Main: { my $monout = $Monfile; my $fh = 'main::fh'; local $names = {}; local $times = {}; # times in hz local $ctimes = {}; # Cumulative times in hz local $calls = {}; local $persecs = {}; # times in seconds local $idkeys = []; local $runtime; # runtime in seconds my @a = (); my $a; local $rrun_utime = 0; # user time in hz local $rrun_stime = 0; # system time in hz local $rrun_rtime = 0; # elapsed run time in hz local $rrun_ustime = 0; # user+system time in hz local $hz = 0; local $deep_times = {count => 0 , kids => {}, incl_time => 0}; local $time_precision = 2; local $overhead = 0; open( $fh, "<$monout" ) || die "Unable to open $monout\n"; header($fh); $rrun_ustime = $rrun_utime + $rrun_stime; $~ = 'STAT'; if( ! $opt_q ){ $^ = 'CSTAT_top'; } parsestack( $fh, $names, $calls, $times, $ctimes, $idkeys ); #filter calls if( $opt_f ){ for(my $i = 0;$i < @$idkeys - 2;){ $key = $$idkeys[$i]; if($key =~ /$opt_f/){ splice(@$idkeys, $i, 1); $runtime -= $$times{$key}; next; } $i++; } } if( $opt_G ){ group($names, $calls, $times, $ctimes, $idkeys ); } settime( \$runtime, $hz ) unless $opt_g; exit(0) if $opt_T || $opt_t; if( $opt_v ){ percalc( $calls, ($opt_I ? $ctimes : $times), $persecs, $idkeys ); } if( ! $opt_U ){ @a = sort $sort @$idkeys; $a = \@a; } else { $a = $idkeys; } display( $runtime, $hz, $names, $calls, $times, $ctimes, $cnt, $a, $deep_times); } sub group{ my ($names, $calls, $times, $ctimes, $idkeys ) = @_; print "Option G Grouping: [$opt_G]\n"; # create entries to store grouping $$names{$opt_G} = $opt_G; $$calls{$opt_G} = 0; $$times{$opt_G} = 0; $$ctimes{$opt_G} = 0; $$idkeys[@$idkeys] = $opt_G; # Sum calls for the grouping my $other = "other"; if($opt_P){ $$names{$other} = $other; $$calls{$other} = 0; $$times{$other} = 0; $$ctimes{$other} = 0; $$idkeys[@$idkeys] = $other; } for(my $i = 0;$i < @$idkeys - 2;){ $key = $$idkeys[$i]; if($key =~ /$opt_G/){ $$calls{$opt_G} += $$calls{$key}; $$times{$opt_G} += $$times{$key}; $$ctimes{$opt_G} += $$ctimes{$key}; splice(@$idkeys, $i, 1); next; }else{ if($opt_P){ $$calls{$other} += $$calls{$key}; $$times{$other} += $$times{$key}; $$ctimes{$other} += $$ctimes{$key}; splice(@$idkeys, $i, 1); next; } } $i++; } print "Grouping [$opt_G] Calls: [$$calls{$opt_G}]\n". "Grouping [$opt_G] Times: [$$times{$opt_G}]\n". "Grouping [$opt_G] IncTimes: [$$ctimes{$opt_G}]\n"; } # Sets $runtime to user, system, real, or user+system time. The # result is given in seconds. # sub settime { my( $runtime, $hz ) = @_; $hz ||= 1; if( $opt_r ){ $$runtime = ($rrun_rtime - $overhead)/$hz; } elsif( $opt_s ){ $$runtime = ($rrun_stime - $overhead)/$hz; } elsif( $opt_u ){ $$runtime = ($rrun_utime - $overhead)/$hz; } else{ $$runtime = ($rrun_ustime - $overhead)/$hz; } $$runtime = 0 unless $$runtime > 0; } sub exclusives_in_tree { my( $deep_times ) = @_; my $kids_time = 0; my $kid; # When summing, take into account non-rounded-up kids time. for $kid (keys %{$deep_times->{kids}}) { $kids_time += $deep_times->{kids}{$kid}{incl_time}; } $kids_time = 0 unless $kids_time >= 0; $deep_times->{excl_time} = $deep_times->{incl_time} - $kids_time; $deep_times->{excl_time} = 0 unless $deep_times->{excl_time} >= 0; for $kid (keys %{$deep_times->{kids}}) { exclusives_in_tree($deep_times->{kids}{$kid}); } $deep_times->{incl_time} = 0 unless $deep_times->{incl_time} >= 0; $deep_times->{kids_time} = $kids_time; } sub kids_by_incl { $kids{$b}{incl_time} <=> $kids{$a}{excl_time} or $a cmp $b } sub display_tree { my( $deep_times, $name, $level ) = @_; exclusives_in_tree($deep_times); my $kid; my $time; if (%{$deep_times->{kids}}) { $time = sprintf '%.*fs = (%.*f + %.*f)', $time_precision, $deep_times->{incl_time}/$hz, $time_precision, $deep_times->{excl_time}/$hz, $time_precision, $deep_times->{kids_time}/$hz; } else { $time = sprintf '%.*f', $time_precision, $deep_times->{incl_time}/$hz; } print ' ' x (2*$level), "$name x $deep_times->{count} \t${time}s\n" if $deep_times->{count}; for $kid (sort kids_by_incl %{$deep_times->{kids}}) { display_tree( $deep_times->{kids}{$kid}, $kid, $level + 1 ); } } # Report the times in seconds. sub display { my( $runtime, $hz, $names, $calls, $times, $ctimes, $cnt, $idkeys, $deep_times ) = @_; my( $x, $key, $s, $cs ); #format: $ncalls, $name, $secs, $percall, $pcnt if ($opt_S) { display_tree( $deep_times, 'toplevel', -1 ) } else { for( $x = 0; $x < @$idkeys; ++$x ){ $key = $idkeys->[$x]; $ncalls = $calls->{$key}; $name = $names->{$key}; $s = $times->{$key}/$hz; $secs = sprintf("%.3f", $s ); $cs = $ctimes->{$key}/$hz; $csecs = sprintf("%.3f", $cs ); $percall = sprintf("%.4f", $s/$ncalls ); $cpercall = sprintf("%.4f", $cs/$ncalls ); $pcnt = sprintf("%.2f", $runtime? ((($opt_I ? $csecs : $secs) / $runtime) * 100.0): 0 ); write; $pcnt = $secs = $ncalls = $percall = ""; write while( length $name ); last unless --$cnt; } } } sub move_keys { my ($source, $dest) = @_; for my $kid_name (keys %$source) { my $source_kid = delete $source->{$kid_name}; if (my $dest_kid = $dest->{$kid_name}) { $dest_kid->{count} += $source_kid->{count}; $dest_kid->{incl_time} += $source_kid->{incl_time}; move_keys($source_kid->{kids},$dest_kid->{kids}); } else { $dest->{$kid_name} = $source_kid; } } } sub add_to_tree { my ($curdeep_times, $name, $t) = @_; if ($name ne $curdeep_times->[-1]{name} and $opt_A) { $name = $curdeep_times->[-1]{name}; } die "Shorted?!" unless @$curdeep_times >= 2; my $entry = $curdeep_times->[-2]{kids}{$name} ||= { count => 0, kids => {}, incl_time => 0, }; # Now transfer to the new node (could not do earlier, since name can change) $entry->{count}++; $entry->{incl_time} += $t - $curdeep_times->[-1]{enter_stamp}; # Merge the kids? move_keys($curdeep_times->[-1]->{kids},$entry->{kids}); pop @$curdeep_times; } sub parsestack { my( $fh, $names, $calls, $times, $ctimes, $idkeys ) = @_; my( $dir, $name ); my( $t, $syst, $realt, $usert ); my( $x, $z, $c, $id, $pack ); my @stack = (); my @tstack = (); my %outer; my $tab = 3; my $in = 0; # remember last call depth and function name my $l_in = $in; my $l_name = ''; my $repcnt = 0; my $repstr = ''; my $dprof_stamp; my %cv_hash; my $in_level = not defined $opt_g; # Level deep in report grouping my $curdeep_times = [$deep_times]; my $over_per_call; if ( $opt_u ) { $over_per_call = $over_utime } elsif( $opt_s ) { $over_per_call = $over_stime } elsif( $opt_r ) { $over_per_call = $over_rtime } else { $over_per_call = $over_utime + $over_stime } $over_per_call /= 2*$over_tests; # distribute over entry and exit while(<$fh>){ next if /^#/; last if /^PART/; chop; if (/^&/) { ($dir, $id, $pack, $name) = split; if ($opt_R and ($name =~ /(?:::)?(__ANON__|END)$/)) { $name .= "($id)"; } $cv_hash{$id} = "$pack\::$name"; next; } ($dir, $usert, $syst, $realt, $name) = split; my $ot = $t; if ( $dir eq '/' ) { $syst = $stack[-1][0] if scalar @stack; $usert = '&'; $dir = '-'; #warn("Inserted exit for $stack[-1][0].\n") } if (defined $realt) { # '+ times nam' '- times nam' or '@ incr' if ( $opt_u ) { $t = $usert } elsif( $opt_s ) { $t = $syst } elsif( $opt_r ) { $t = $realt } else { $t = $usert + $syst } $t += $ot, next if $dir eq '@'; # Increments there } else { # "- id" or "- & name" $name = defined $syst ? $syst : $cv_hash{$usert}; } next unless $in_level or $name eq $opt_g; if ( $dir eq '-' or $dir eq '*' ) { my $ename = $dir eq '*' ? $stack[-1][0] : $name; $overhead += $over_per_call; if ($name eq "Devel::DProf::write") { $overhead += $t - $dprof_stamp; next; } elsif (defined $opt_g and $ename eq $opt_g) { $in_level--; } add_to_tree($curdeep_times, $ename, $t - $overhead) if $opt_S; exitstamp( \@stack, \@tstack, $t - $overhead, $times, $ctimes, $name, \$in, $tab, $curdeep_times, \%outer ); } next unless $in_level or $name eq $opt_g; if( $dir eq '+' or $dir eq '*' ){ if ($name eq "Devel::DProf::write") { $dprof_stamp = $t; next; } elsif (defined $opt_g and $name eq $opt_g) { $in_level++; } $overhead += $over_per_call; if( $opt_T ){ print ' ' x $in, "$name\n"; $in += $tab; } elsif( $opt_t ){ # suppress output on same function if the # same calling level is called. if ($l_in == $in and $l_name eq $name) { $repcnt++; } else { $repstr = ' ('.++$repcnt.'x)' if $repcnt; print ' ' x $l_in, "$l_name$repstr\n" if $l_name ne ''; $repstr = ''; $repcnt = 0; $l_in = $in; $l_name = $name; } $in += $tab; } if( ! defined $names->{$name} ){ $names->{$name} = $name; $times->{$name} = 0; $ctimes->{$name} = 0; push( @$idkeys, $name ); } $calls->{$name}++; $outer{$name}++; push @$curdeep_times, { kids => {}, name => $name, enter_stamp => $t - $overhead, } if $opt_S; $x = [ $name, $t - $overhead ]; push( @stack, $x ); # my children will put their time here push( @tstack, 0 ); } elsif ($dir ne '-'){ die "Bad profile: $_"; } } if( $opt_t ){ $repstr = ' ('.++$repcnt.'x)' if $repcnt; print ' ' x $l_in, "$l_name$repstr\n"; } while (my ($key, $count) = each %outer) { next unless $count; warn "$key has $count unstacked calls in outer\n"; } if( @stack ){ if( ! $opt_F ){ warn "Garbled profile is missing some exit time stamps:\n"; foreach $x (@stack) { print $x->[0],"\n"; } die "Try rerunning dprofpp with -F.\n"; # I don't want -F to be default behavior--yet # 9/18/95 dmr } else{ warn( "Faking " . scalar( @stack ) . " exit timestamp(s).\n"); foreach $x ( reverse @stack ){ $name = $x->[0]; exitstamp( \@stack, \@tstack, $t - $overhead, $times, $ctimes, $name, \$in, $tab, $curdeep_times, \%outer ); add_to_tree($curdeep_times, $name, $t - $overhead) if $opt_S; } } } if (defined $opt_g) { $runtime = $ctimes->{$opt_g}/$hz; $runtime = 0 unless $runtime > 0; } } sub exitstamp { my($stack, $tstack, $t, $times, $ctimes, $name, $in, $tab, $deep, $outer) = @_; my( $x, $c, $z ); $x = pop( @$stack ); if( ! defined $x ){ die "Garbled profile, missing an enter time stamp"; } if( $x->[0] ne $name and $opt_G and ($name =~ /$opt_G/)){ if ($x->[0] =~ /(?:::)?AUTOLOAD$/) { if ($opt_A) { $name = $x->[0]; } } elsif ( $opt_F ) { warn( "Garbled profile, faking exit timestamp:\n\t$name => $x->[0].\n"); $name = $x->[0]; } else { foreach $z (@stack, $x) { print $z->[0],"\n"; } die "Garbled profile, unexpected exit time stamp"; } } if( $opt_T || $opt_t ){ $$in -= $tab; } # collect childtime $c = pop( @$tstack ); # total time this func has been active $z = $t - $x->[1]; $ctimes->{$name} += $z unless --$outer->{$name}; $times->{$name} += $z - $c; # pass my time to my parent if( @$tstack ){ $c = pop( @$tstack ); push( @$tstack, $c + $z ); } } sub header { my $fh = shift; chop($_ = <$fh>); if( ! /^#fOrTyTwO$/ ){ die "Not a perl profile"; } while(<$fh>){ next if /^#/; last if /^PART/; eval; } $over_tests = 1 unless $over_tests; $time_precision = length int ($hz - 1); # log ;-) } # Report avg time-per-function in seconds sub percalc { my( $calls, $times, $persecs, $idkeys ) = @_; my( $x, $t, $n, $key ); for( $x = 0; $x < @$idkeys; ++$x ){ $key = $idkeys->[$x]; $n = $calls->{$key}; $t = $times->{$key} / $hz; $persecs->{$key} = $t ? $t / $n : 0; } } # Runs the given script with the given profiler and the given perl. sub run_profiler { my $script = shift; my $profiler = shift; my $startperl = shift; my @script_parts = split /\s+/, $script; system $startperl, "-d:$profiler", @script_parts; if( $? / 256 > 0 ){ my $cmd = join ' ', @script_parts; die "Failed: $startperl -d:$profiler $cmd: $!"; } } sub by_time { $times->{$b} <=> $times->{$a} } sub by_ctime { $ctimes->{$b} <=> $ctimes->{$a} } sub by_calls { $calls->{$b} <=> $calls->{$a} } sub by_alpha { $names->{$a} cmp $names->{$b} } sub by_avgcpu { $persecs->{$b} <=> $persecs->{$a} } # Reversed sub rby_time { $times->{$a} <=> $times->{$b} } sub rby_ctime { $ctimes->{$a} <=> $ctimes->{$b} } sub rby_calls { $calls->{$a} <=> $calls->{$b} } sub rby_alpha { $names->{$b} cmp $names->{$a} } sub rby_avgcpu { $persecs->{$a} <=> $persecs->{$b} } format CSTAT_top = Total Elapsed Time = @>>>>>>> Seconds (($rrun_rtime - $overhead) / $hz) @>>>>>>>>>> Time = @>>>>>>> Seconds $whichtime, $runtime @<<<<<<<< Times $incl_excl %Time ExclSec CumulS #Calls sec/call Csec/c Name . BEGIN { my $fmt = ' ^>>> ^>>>> ^>>>>> ^>>>>> ^>>>>> ^>>>>> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'; if (-t STDOUT and defined $stty and my ($cols) = `$stty -a` =~ /\bcolumns\s+(\d+)/) { $fmt .= '<' x ($cols - length $fmt) if $cols > 80; } eval "format STAT = \n$fmt" . ' $pcnt, $secs, $csecs, $ncalls, $percall, $cpercall, $name .'; }
Save
cmd:
run