[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
profiling of btf_dump
From: |
Jose E. Marchesi |
Subject: |
profiling of btf_dump |
Date: |
Fri, 23 Apr 2021 10:10:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
btf_dump is slow. Below is a PVM profiling of the execution of
`btf_dump (btf)' using your data.
I think mktyi (which is an instruction that creates an integer type) can
be optimized for the common case: we can pre-allocate and use type
values for all the signed and unsigned integer types in the range
1..64. This actually covers now not just the common case, but all the
cases, until we support bigger integers with the GMP integration.
(poke) btf_dump (btf)
[1] int 'unsigned char'(0x00000001U#B) size=0x00000001U#B offset=0x00UB#b
bits=0x08UB#b CHAR
[2] int 'short unsigned int'(0x0000000fU#B) size=0x00000002U#B offset=0x00UB#b
bits=0x10UB#b
...
(poke) .vm profile show
mktyi 3719424 1.153us 19.9%
mko 2772695 1.435us 18.4%
mktysct 1351892 2.633us 16.5%
duc 360193 4.803us 8.0%
mktyo 963971 995.881ns 4.4%
mka 94305 9.862us 4.3%
mksct 530583 1.696us 4.2%
sublu 6973625 114.718ns 3.7%
regvar 6300039 119.047ns 3.5%
siz 2167311 332.209ns 3.3%
ains 223119 2.555us 2.6%
addlu 4475571 82.671ns 1.7%
peekdiu 591954 557.476ns 1.5%
mktya 325509 890.912ns 1.3%
pushvar 16233086 10.472ns 0.8%
pushe 1769727 90.409ns 0.7%
pushf 605697 198.119ns 0.6%
peeks 38049 2.891us 0.5%
swap 15731048 6.357ns 0.5%
push 35534470 2.533ns 0.4%
fromr 6897003 8.699ns 0.3%
sref 260212 230.581ns 0.3%
nip2 11584320 2.590ns 0.1%
tor 6897003 4.350ns 0.1%
nip 6716735 4.466ns 0.1%
pope 1633264 18.368ns 0.1%
lutoiu 1619600 18.523ns 0.1%
bsriu 1619458 18.525ns 0.1%
pec 1003116 29.907ns 0.1%
msets 936860 32.022ns 0.1%
raise 136058 220.494ns 0.1%
drop 6931908 2.885ns 0.1%
quake 5833066 3.429ns 0.1%
rot 2809243 7.119ns 0.1%
iutoiu 1774552 11.270ns 0.1%
ba 1150812 17.379ns 0.1%
prolog 670763 29.817ns 0.1%
msetw 624888 32.006ns 0.1%
dup 5092498 1.964ns 0.0%
popvar 4332460 2.308ns 0.0%
nrot 4004467 2.497ns 0.0%
over 3422410 2.922ns 0.0%
call 670763 14.908ns 0.0%
popf 601132 16.635ns 0.0%
map 598909 16.697ns 0.0%
msetm 598909 16.697ns 0.0%
mgets 260958 38.320ns 0.0%
mgetw 260958 38.320ns 0.0%
eqiu 155165 64.448ns 0.0%
peekdi 23023 434.348ns 0.0%
bzi 2541676
msetios 936860
return 670731
drop2 649786
mgetm 521916
bnn 402480
atr 337951
gtlu 292044
bnzi 283382
mm 261588
mgeto 261087
mgetios 260958
mgetsel 260958
mgetsiz 260958
bn 251273
itoiu 148772
sync 119336
drop3 94325
sel 93625
eqi 87668
aref 87476
or 87272
iutolu 69482
bnzlu 68326
mseto 68326
msetsel 68326
msetsiz 68326
not 64727
iutoi 39675
ogetm 6126
note 3699
popend 3159
ogetu 2087
divlu 1955
mullu 1955
prints 1509
mktys 831
eqlu 792
addiu 702
printiu 321
begsc 264
endsc 264
popod 264
popom 264
pushtopvar 264
bzlu 132
pushob 132
pushod 132
pushom 132
pushios 129
bziu 32
printi 13
revn 11
asettb 8
canary 1
exit 1
popr 1