Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46072: Output stats as markdown with collapsible sections. #31228

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Feb 9, 2022

Stats now look like this:

Execution counts

execution counts for all instructions
Name Count Self Cumulative Miss ratio
LOAD_FAST 10015908847 13.9% 13.9%
LOAD_CONST 3527515262 4.9% 18.9%
STORE_FAST__LOAD_FAST 3282963275 4.6% 23.4%
LOAD_FAST__LOAD_FAST 3053500998 4.3% 27.7%
LOAD_ATTR_INSTANCE_VALUE 2619242897 3.6% 31.3% 1.6%
RESUME 2189727369 3.0% 34.4%
PRECALL_FUNCTION 2145301389 3.0% 37.4%
PRECALL_METHOD 2078128416 2.9% 40.3%
STORE_FAST__STORE_FAST 2053133282 2.9% 43.1%
RETURN_VALUE 1978483339 2.8% 45.9%
POP_JUMP_IF_FALSE 1727419292 2.4% 48.3%
FOR_ITER 1637424853 2.3% 50.6%
LOAD_FAST__LOAD_CONST 1563374197 2.2% 52.7%
BINARY_OP_ADD_INT 1503815388 2.1% 54.8% 0.0%
JUMP_ABSOLUTE_QUICK 1412971196 2.0% 56.8%
LOAD_GLOBAL_BUILTIN 1399179490 1.9% 58.7% 0.6%
SWAP 1297004089 1.8% 60.5%
COPY 1254900580 1.7% 62.3%
BINARY_SUBSCR_ADAPTIVE 1252617878 1.7% 64.0%
COMPARE_OP_INT_JUMP 1207955445 1.7% 65.7% 0.0%
LOAD_GLOBAL_MODULE 1207001561 1.7% 67.4% 0.3%
STORE_FAST 1200906582 1.7% 69.1%
POP_TOP 1161459114 1.6% 70.7%
CALL_PY_EXACT_ARGS 1098770282 1.5% 72.2% 4.2%
BINARY_SUBSCR_LIST_INT 1088718270 1.5% 73.7% 1.1%
UNPACK_SEQUENCE 932705567 1.3% 75.0%
BINARY_OP_MULTIPLY_FLOAT 879473594 1.2% 76.3% 1.0%
LOAD_METHOD_NO_DICT 877108561 1.2% 77.5% 0.7%
CALL_ADAPTIVE 875748958 1.2% 78.7%
LOAD_METHOD_CACHED 818676036 1.1% 79.8% 3.0%
BINARY_OP 689223617 1.0% 80.8%
STORE_SUBSCR_ADAPTIVE 668109415 0.9% 81.7%
LOAD_ATTR_ADAPTIVE 631678564 0.9% 82.6%
LOAD_CONST__LOAD_FAST 596799528 0.8% 83.4%
POP_JUMP_IF_TRUE 558869963 0.8% 84.2%
BINARY_OP_ADD_FLOAT 550543032 0.8% 85.0% 1.3%
STORE_ATTR_INSTANCE_VALUE 502909879 0.7% 85.7% 1.3%
CALL_NO_KW_METHOD_DESCRIPTOR_FAST 485748209 0.7% 86.4%
BINARY_OP_SUBTRACT_INT 460030754 0.6% 87.0% 0.6%
BUILD_SLICE 436521266 0.6% 87.6%
LOAD_DEREF 405856260 0.6% 88.2%
CALL_NO_KW_BUILTIN_O 373793491 0.5% 88.7% 0.5%
STORE_SUBSCR_LIST_INT 365835186 0.5% 89.2%
BINARY_OP_SUBTRACT_FLOAT 354202390 0.5% 89.7% 2.9%
JUMP_FORWARD 344646404 0.5% 90.2%
CALL_NO_KW_ISINSTANCE 309611126 0.4% 90.6%
LOAD_METHOD_ADAPTIVE 282533823 0.4% 91.0%
LOAD_ATTR_WITH_HINT 282161080 0.4% 91.4% 4.9%
BINARY_OP_ADAPTIVE 279513150 0.4% 91.8%
CONTAINS_OP 255213989 0.4% 92.1%
BUILD_TUPLE 253914017 0.4% 92.5%
CALL_NO_KW_LEN 248031824 0.3% 92.8%
GET_ITER 244880997 0.3% 93.2%
IS_OP 241918939 0.3% 93.5%
LOAD_ATTR_SLOT 238559188 0.3% 93.8% 11.3%
BINARY_OP_MULTIPLY_INT 232387235 0.3% 94.2% 0.8%
CALL_NO_KW_BUILTIN_FAST 226225668 0.3% 94.5% 0.0%
NOP 215479641 0.3% 94.8%
YIELD_VALUE 207842584 0.3% 95.1%
EXTENDED_ARG 207593435 0.3% 95.4%
POP_JUMP_IF_NONE 180809328 0.3% 95.6%
COMPARE_OP 177263861 0.2% 95.9%
POP_JUMP_IF_NOT_NONE 161641966 0.2% 96.1%
BINARY_SUBSCR_GETITEM 144772769 0.2% 96.3% 0.0%
COMPARE_OP_ADAPTIVE 127146855 0.2% 96.5%
CALL_NO_KW_LIST_APPEND 123929865 0.2% 96.6%
BINARY_SUBSCR_DICT 118628216 0.2% 96.8%
LOAD_ATTR_MODULE 113061315 0.2% 97.0% 2.0%
BINARY_SUBSCR_TUPLE_INT 112749428 0.2% 97.1% 2.0%
STORE_ATTR_SLOT 103841422 0.1% 97.3% 1.7%
CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 102870874 0.1% 97.4% 0.0%
CALL_BUILTIN_CLASS 90751541 0.1% 97.5% 0.0%
COPY_FREE_VARS 75778141 0.1% 97.6%
LIST_APPEND 64297136 0.1% 97.7%
BINARY_OP_ADD_UNICODE 62149097 0.1% 97.8% 0.1%
MAKE_FUNCTION 60885473 0.1% 97.9%
BUILD_LIST 5995400 0.1% 98.0%
BUILD_MAP 59024394 0.1% 98.1%
MAKE_CELL 57709837 0.1% 98.1%
CALL_NO_KW_STR_1 56241963 0.1% 98.2%
KW_NAMES 55617500 0.1% 98.3%
JUMP_IF_FALSE_OR_POP 55028631 0.1% 98.4%
LOAD_METHOD_CLASS 54956687 0.1% 98.5% 0.1%
CALL_BUILTIN_FAST_WITH_KEYWORDS 53194058 0.1% 98.5% 0.6%
CALL 51593800 0.1% 98.6%
CALL_NO_KW_TYPE_1 50692325 0.1% 98.7%
COMPARE_OP_STR_JUMP 50180983 0.1% 98.7% 0.6%
STORE_ATTR_WITH_HINT 47525952 0.1% 98.8% 2.4%
LOAD_GLOBAL 46661201 0.1% 98.9%
COMPARE_OP_FLOAT_JUMP 46517199 0.1% 98.9% 0.1%
SEND 42709608 0.1% 99.0%
RETURN_GENERATOR 42258870 0.1% 99.1%
CALL_FUNCTION_EX 42248179 0.1% 99.1%
CALL_NO_KW_METHOD_DESCRIPTOR_O 40835708 0.1% 99.2% 0.0%
JUMP_NO_INTERRUPT 38615009 0.1% 99.2%
CALL_PY_WITH_DEFAULTS 37537440 0.1% 99.3% 0.1%
STORE_SUBSCR_DICT 37341924 0.1% 99.3%
STORE_ATTR_ADAPTIVE 36311596 0.1% 99.4%
LOAD_METHOD 35213122 0.0% 99.4%
LOAD_CLOSURE 34259993 0.0% 99.5%
JUMP_IF_TRUE_OR_POP 33977545 0.0% 99.5%
DICT_MERGE 33334753 0.0% 99.6%
UNARY_NOT 33046769 0.0% 99.6%
STORE_DEREF 28800293 0.0% 99.7%
STORE_NAME 22067336 0.0% 99.7%
LOAD_ATTR 20485566 0.0% 99.7%
LOAD_METHOD_MODULE 15133935 0.0% 99.7% 0.5%
UNARY_NEGATIVE 14893740 0.0% 99.8%
MAP_ADD 14658087 0.0% 99.8%
CALL_NO_KW_TUPLE_1 14049584 0.0% 99.8% 0.0%
UNARY_INVERT 13718901 0.0% 99.8%
LOAD_NAME 13306517 0.0% 99.8%
IMPORT_FROM 11221807 0.0% 99.8%
IMPORT_NAME 9961297 0.0% 99.9%
STORE_GLOBAL 8786741 0.0% 99.9%
DELETE_SUBSCR 8682250 0.0% 99.9%
LOAD_GLOBAL_ADAPTIVE 7941524 0.0% 99.9%
FORMAT_VALUE 7634971 0.0% 99.9%
PUSH_EXC_INFO 7046170 0.0% 99.9%
POP_EXCEPT 7046170 0.0% 99.9%
JUMP_IF_NOT_EXC_MATCH 6947561 0.0% 99.9%
LIST_EXTEND 6373054 0.0% 99.9%
LIST_TO_TUPLE 5639578 0.0% 100.0%
STORE_ATTR 4987862 0.0% 100.0%
BUILD_STRING 4512471 0.0% 100.0%
BEFORE_WITH 4053053 0.0% 100.0%
GET_YIELD_FROM_ITER 3615799 0.0% 100.0%
BINARY_SUBSCR 3243141 0.0% 100.0%
DELETE_ATTR 2079384 0.0% 100.0%
JUMP_ABSOLUTE 1864910 0.0% 100.0%
DELETE_FAST 1684730 0.0% 100.0%
BUILD_CONST_KEY_MAP 1228479 0.0% 100.0%
LOAD_BUILD_CLASS 1154271 0.0% 100.0%
BUILD_SET 1115570 0.0% 100.0%
STORE_SUBSCR 937780 0.0% 100.0%
RERAISE 767983 0.0% 100.0%
RAISE_VARARGS 582405 0.0% 100.0%
GET_AWAITABLE 478800 0.0% 100.0%
DICT_UPDATE 327195 0.0% 100.0%
BINARY_OP_INPLACE_ADD_UNICODE 326602 0.0% 100.0% 73.8%
DELETE_NAME 183542 0.0% 100.0%
SET_ADD 157780 0.0% 100.0%
IMPORT_STAR 49491 0.0% 100.0%
SET_UPDATE 18277 0.0% 100.0%
WITH_EXCEPT_START 16363 0.0% 100.0%
LOAD_CLASSDEREF 1966 0.0% 100.0%
DELETE_DEREF 1680 0.0% 100.0%
SETUP_ANNOTATIONS 1507 0.0% 100.0%
PRINT_EXPR 3 0.0% 100.0%

Specialization stats

specialization stats by family

BINARY_SUBSCR

Kind Count Ratio
unquickened 3243141 0.1%
deferred 1232956692 48.2%
deopt 273283 0.0%
hit 1305518971 51.1%
miss 14578268 0.6%

Specialization attempts

Count Ratio
Success 583769 3.0%
Failure 19077417 97.0%
Failure kind Count Ratio
array int 10149228 53.2%
list slice 3527322 18.5%
other 2559637 13.4%
buffer int 1632926 8.6%
buffer slice 522577 2.7%
string int 375523 2.0%
string slice 233203 1.2%
tuple slice 69960 0.4%
sequence int 7041 0.0%

STORE_SUBSCR

Kind Count Ratio
unquickened 937780 0.1%
deferred 657624866 61.9%
hit 403177110 38.0%

Specialization attempts

Count Ratio
Success 195282 1.9%
Failure 10289267 98.1%
Failure kind Count Ratio
array int 4081958 39.7%
list slice 2486943 24.2%
other 2101793 20.4%
bytearray int 996215 9.7%
dict subclass no override 323195 3.1%
py simple 185399 1.8%
out of range 113595 1.1%
array slice 147 0.0%
py other 22 0.0%

UNPACK_SEQUENCE

Kind Count Ratio
unquickened 932705567 100.0%

Specialization attempts

Count Ratio
Success 0 0.0%
Failure 932705567 100.0%
Failure kind Count Ratio
tuple 616011096 66.0%
list 316485295 33.9%
other 209176 0.0%

FOR_ITER

Kind Count Ratio
unquickened 1637424853 100.0%

Specialization attempts

Count Ratio
Success 0 0.0%
Failure 1637424853 100.0%
Failure kind Count Ratio
list 557604884 34.1%
range 516065065 31.5%
other 244770440 14.9%
enumerate 90132930 5.5%
set 6636285 4.1%
dict items 61249597 3.7%
tuple 59661653 3.6%
generator 30907053 1.9%
itertools 7138121 0.4%
bytes 1190341 0.1%
string 1079261 0.1%
dict keys 1037556 0.1%
dict values 225098 0.0%

STORE_ATTR

Kind Count Ratio
unquickened 4987862 0.7%
deferred 35168335 5.1%
deopt 171158 0.0%
hit 644684550 92.8%
miss 9592703 1.4%

Specialization attempts

Count Ratio
Success 639324 55.9%
Failure 503937 44.1%
Failure kind Count Ratio
overriding descriptor 159794 31.7%
overridden 151314 30.0%
out of range 97800 19.4%
not managed dict 38104 7.6%
method 27246 5.4%
mutable class 18691 3.7%
non object slot 9873 2.0%
property 1115 0.2%

LOAD_ATTR

Kind Count Ratio
unquickened 20485566 0.5%
deferred 620320925 15.9%
deopt 1559790 0.0%
hit 3168215975 81.4%
miss 84808505 2.2%

Specialization attempts

Count Ratio
Success 2798998 24.6%
Failure 8558641 75.4%
Failure kind Count Ratio
overridden 2772518 32.4%
overriding descriptor 1685495 19.7%
out of range 1594375 18.6%
not managed dict 998211 11.7%
property 632078 7.4%
method 544046 6.4%
non object slot 199135 2.3%
mutable class 125167 1.5%
kind 7 7616 0.1%

COMPARE_OP

Kind Count Ratio
unquickened 177263861 11.0%
deferred 124773910 7.8%
deopt 15712 0.0%
hit 1303738908 81.1%
miss 914719 0.1%

Specialization attempts

Count Ratio
Success 266527 11.2%
Failure 2106418 88.8%
Failure kind Count Ratio
float long 665583 31.6%
set 579290 27.5%
different types 201766 9.6%
other 125478 6.0%
not followed by cond jump 121444 5.8%
bool 112173 5.3%
tuple 100667 4.8%
big int 96036 4.6%
bytes 44845 2.1%
baseobject 34480 1.6%
list 20760 1.0%
long float 3766 0.2%
string 130 0.0%

LOAD_GLOBAL

Kind Count Ratio
unquickened 46661201 1.8%
deferred 5065600 0.2%
deopt 100400 0.0%
hit 2594874699 97.6%
miss 11306352 0.4%

Specialization attempts

Count Ratio
Success 2875923 100.0%
Failure 1 0.0%
Failure kind Count Ratio

BINARY_OP

Kind Count Ratio
unquickened 689223617 13.8%
deferred 274799065 5.5%
deopt 594194 0.0%
hit 4011268425 80.1%
miss 31659667 0.6%

Specialization attempts

Count Ratio
Success 847469 18.0%
Failure 3866616 82.0%
Failure kind Count Ratio
other 2210966 57.2%
different types 1655650 42.8%

LOAD_METHOD

Kind Count Ratio
unquickened 35213122 1.7%
deferred 277175598 13.3%
deopt 568915 0.0%
hit 1735425163 83.5%
miss 30450056 1.5%

Specialization attempts

Count Ratio
Success 1478012 27.6%
Failure 3880213 72.4%
Failure kind Count Ratio
has managed dict 1266183 32.6%
has dict 1095383 28.2%
instance attribute 696057 17.9%
overridden 253287 6.5%
class method obj 216436 5.6%
metaclass attribute 210110 5.4%
non overriding descriptor 51693 1.3%
not descriptor 32850 0.8%
builtin class method 23533 0.6%
mutable class 13843 0.4%
other 8448 0.2%
property 7182 0.2%
is attr 2944 0.1%
overriding descriptor 1634 0.0%
kind 7 420 0.0%
object slot 147 0.0%
non object slot 63 0.0%

CALL

Kind Count Ratio
unquickened 51593800 1.7%
deferred 859552047 27.9%
deopt 884454 0.0%
hit 2123117580 68.9%
miss 48025730 1.6%

Specialization attempts

Count Ratio
Success 2922328 18.0%
Failure 13274583 82.0%
Failure kind Count Ratio
class no vectorcall 2815506 21.2%
instance method 2284178 17.2%
pycfunction fast with keywords 2254602 17.0%
python class 1247479 9.4%
kind 8 1242332 9.4%
pycfunction with keywords 887033 6.7%
kwnames 665610 5.0%
pycfunction 607841 4.6%
pycfunction noargs 409182 3.1%
class mutable 326822 2.5%
other 222473 1.7%
bad call flags 179723 1.4%
str 79833 0.6%
method wrapper 32586 0.2%
complex parameters 12278 0.1%
operator wrapper 4767 0.0%
bound method 2333 0.0%
cmethod 4 0.0%
wrong number arguments 1 0.0%

Specialization effectiveness

specialization effectiveness
Instructions Count Ratio
Basic 43841140325 61.0%
Not specialized 7992678133 11.1%
Specialized 19988904669 27.8%

Call stats

Inlined calls and frame stats
Count Ratio
Calls to PyEval_EvalDefault 628153193 28.0%
Calls to Python functions inlined 1612430405 72.0%
Frames pushed 1990482168 88.8%
Frame objects created 21863593 1.0%

Object stats

allocations, frees and dict materializatons
Count Ratio
Allocations 4888497405
Frees 4805554593
New values 71221115
Materialize dict (on request) 3022151 4.2%
Materialize dict (new key) 1949271 2.7%
Materialize dict (too big) 0 0.0%

Stats gathered on: 2022-02-09

https://bugs.python.org/issue46072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants