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

Remove a bunch of just-about-dead Ember message send code. #14571

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

sendToClient in ias-zone-server is the only place all this machinery
could be reached from in practice. And since at that one callsite the
machinery is not going to do anything useful, there's no point in
pretending like it works and keeping it.

Problem

Lots of pretty-much-dead code.

Change overview

Remove it. Save some codesize and rodata and .bss.

Testing

Should be no behavior changes except in the IAS bits, which don't work right anyway and need fixing.

sendToClient in ias-zone-server is the only place all this machinery
could be reached from in practice.  And since at that one callsite the
machinery is not going to do anything useful, there's no point in
pretending like it works and keeping it.
@github-actions
Copy link

github-actions bot commented Jan 29, 2022

PR #14571: Size comparison from 6ba06b2 to a681bf0

Increases (1 build for qpg)
platform target config section 6ba06b2 a681bf0 change % change
qpg lighting-app qpg6105+debug (read/write) 146936 146940 4 0.0
Decreases (37 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 6ba06b2 a681bf0 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578426 575590 -2836 -0.5
.app_xip_area 484400 481916 -2484 -0.5
.bss 76772 76420 -352 -0.5
lock-app CYW30739 (read/write) 536486 533610 -2876 -0.5
.app_xip_area 444028 441512 -2516 -0.6
.bss 75244 74884 -360 -0.5
efr32 lighting-app BRD4161A (read only) 843256 840432 -2824 -0.3
(read/write) 126320 125952 -368 -0.3
.bss 124416 124056 -360 -0.3
.data 1900 1892 -8 -0.4
.text 843248 840424 -2824 -0.3
BRD4161A+rpc (read only) 830608 827800 -2808 -0.3
(read/write) 142976 142608 -368 -0.3
.bss 140976 140616 -360 -0.3
.data 2000 1992 -8 -0.4
.text 830600 827792 -2808 -0.3
window-app BRD4161A (read only) 815848 813044 -2804 -0.3
(read/write) 124948 124580 -368 -0.3
.bss 123092 122732 -360 -0.3
.data 1856 1848 -8 -0.4
.text 815840 813036 -2804 -0.3
esp32 all-clusters-app c3devkit (read only) 933898 931104 -2794 -0.3
(read/write) 1398402 1397866 -536 -0.0
.dram0.bss 69992 69880 -112 -0.2
.dram0.data 14244 14236 -8 -0.1
.flash.rodata 195256 194848 -408 -0.2
.flash.text 933898 931104 -2794 -0.3
m5stack (read only) 981703 979435 -2268 -0.2
(read/write) 462764 462252 -512 -0.1
.dram0.bss 74744 74632 -112 -0.1
.flash.rodata 221868 221468 -400 -0.2
.flash.text 976319 974051 -2268 -0.2
k32w light k32w061+release (read/write) 663156 660288 -2868 -0.4
.bss 76468 76116 -352 -0.5
.data 1868 1860 -8 -0.4
.text 579020 576512 -2508 -0.4
lock k32w061+release (read/write) 664188 661332 -2856 -0.4
.bss 76780 76428 -352 -0.5
.text 579716 577212 -2504 -0.4
linux all-clusters-app debug (read only) 2291721 2280193 -11528 -0.5
(read/write) 146640 146312 -328 -0.2
.bss 62912 62656 -256 -0.4
.data.rel.ro 76824 76760 -64 -0.1
.init_array 936 928 -8 -0.9
.rodata 204469 202261 -2208 -1.1
.text 1926594 1917442 -9152 -0.5
bridge-app debug+rpc (read only) 1627029 1616813 -10216 -0.6
(read/write) 89288 88704 -584 -0.7
.bss 45248 44736 -512 -1.1
.data.rel.ro 37088 37024 -64 -0.2
.init_array 544 536 -8 -1.5
.rodata 137940 136532 -1408 -1.0
.text 1374309 1365669 -8640 -0.6
chip-tool debug (read only) 6965221 6965085 -136 -0.0
(read/write) 180336 180328 -8 -0.0
.init_array 624 616 -8 -1.3
.text 6198373 6198261 -112 -0.0
door-lock-app debug (read only) 1848225 1837737 -10488 -0.6
(read/write) 119200 118584 -616 -0.5
.bss 51296 50784 -512 -1.0
.data 994 962 -32 -3.2
.data.rel.ro 61504 61440 -64 -0.1
.init_array 664 656 -8 -1.2
.rodata 171292 169852 -1440 -0.8
.text 1529202 1520322 -8880 -0.6
lighting-app debug+rpc (read only) 1948153 1937793 -10360 -0.5
(read/write) 124128 123576 -552 -0.4
.bss 52216 51736 -480 -0.9
.data.rel.ro 65040 64976 -64 -0.1
.init_array 704 696 -8 -1.1
.rodata 161329 159793 -1536 -1.0
.text 1633074 1624418 -8656 -0.5
ota-provider-app debug (read only) 1627369 1617089 -10280 -0.6
(read/write) 88904 88352 -552 -0.6
.bss 50176 49696 -480 -1.0
.data.rel.ro 32168 32104 -64 -0.2
.init_array 608 600 -8 -1.3
.rodata 147814 146566 -1248 -0.8
.text 1362498 1353634 -8864 -0.7
ota-requestor-app debug (read only) 1636113 1625769 -10344 -0.6
(read/write) 91936 91384 -552 -0.6
.bss 51456 50976 -480 -0.9
.data.rel.ro 34088 34024 -64 -0.2
.init_array 632 624 -8 -1.3
.rodata 144247 142935 -1312 -0.9
.text 1375842 1366978 -8864 -0.6
shell debug (read only) 2266313 2254785 -11528 -0.5
(read/write) 148416 148088 -328 -0.2
.bss 70624 70368 -256 -0.4
.data.rel.ro 71344 71280 -64 -0.1
.init_array 920 912 -8 -0.9
.rodata 205202 202994 -2208 -1.1
.text 1906386 1897234 -9152 -0.5
thermostat-no-ble arm64 (read only) 2082348 2072716 -9632 -0.5
(read/write) 149617 149313 -304 -0.2
.bss 67329 67121 -208 -0.3
.data 960 952 -8 -0.8
.data.rel.ro 74216 74152 -64 -0.1
.got 4144 4112 -32 -0.8
.rodata 130172 129564 -608 -0.5
.text 1734896 1726112 -8784 -0.5
tv-app debug (read only) 2344289 2333673 -10616 -0.5
(read/write) 321952 321656 -296 -0.1
.bss 241568 241344 -224 -0.1
.data.rel.ro 71408 71344 -64 -0.1
.init_array 888 880 -8 -0.9
.rodata 199308 197644 -1664 -0.8
.text 1975298 1966514 -8784 -0.4
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2383584 2380872 -2712 -0.1
.bss 188892 188780 -112 -0.1
.text 1346184 1343472 -2712 -0.2
lighting-app CY8CPROTO_062_4343W+release (read/write) 2338040 2335504 -2536 -0.1
.bss 179424 179064 -360 -0.2
.data 5584 5576 -8 -0.1
.text 1300640 1298104 -2536 -0.2
lock-app CY8CPROTO_062_4343W+release (read/write) 2302080 2299608 -2472 -0.1
.bss 179296 178936 -360 -0.2
.data 5552 5544 -8 -0.1
.text 1264680 1262208 -2472 -0.2
shell CY8CPROTO_062_4343W+release (read/write) 2292756 2290212 -2544 -0.1
.bss 176572 176220 -352 -0.2
.data 5384 5376 -8 -0.1
.text 1255328 1252784 -2544 -0.2
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 981695 978891 -2804 -0.3
bss 119780 119428 -352 -0.3
rodata 115684 115328 -356 -0.3
text 668420 666320 -2100 -0.3
nrf52840dk_nrf52840+rpc (read/write) 967243 964419 -2824 -0.3
bss 116824 116472 -352 -0.3
rodata 107160 106800 -360 -0.3
text 664860 662760 -2100 -0.3
nrf52840dongle_nrf52840 (read/write) 997747 994939 -2808 -0.3
bss 120952 120600 -352 -0.3
rodata 114516 114156 -360 -0.3
text 673828 671728 -2100 -0.3
nrf5340dk_nrf5340_cpuapp (read/write) 890866 888058 -2808 -0.3
bss 116568 116216 -352 -0.3
rodata 108964 108604 -360 -0.3
text 584596 582500 -2096 -0.4
lock-app nrf52840dk_nrf52840 (read/write) 914307 911471 -2836 -0.3
bss 118132 117780 -352 -0.3
rodata 104320 103964 -356 -0.3
text 614464 612336 -2128 -0.3
nrf5340dk_nrf5340_cpuapp (read/write) 824358 821518 -2840 -0.3
bss 114948 114596 -352 -0.3
rodata 97528 97168 -360 -0.4
text 531424 529300 -2124 -0.4
pump-app nrf52840dk_nrf52840 (read/write) 917155 914311 -2844 -0.3
bss 117888 117536 -352 -0.3
rodata 104832 104476 -356 -0.3
text 616988 614860 -2128 -0.3
pump-controller-app nrf52840dk_nrf52840 (read/write) 912355 909519 -2836 -0.3
bss 117896 117544 -352 -0.3
rodata 103936 103580 -356 -0.3
text 613040 610908 -2132 -0.3
p6 all-clusters-app default (read/write) 2443344 2440408 -2936 -0.1
.bss 117044 116932 -112 -0.1
.text 1401608 1398672 -2936 -0.2
light-app default (read/write) 2338840 2336016 -2824 -0.1
.bss 104604 104244 -360 -0.3
.data 2408 2400 -8 -0.3
.text 1297104 1294280 -2824 -0.2
lock-app default (read/write) 2304352 2301496 -2856 -0.1
.bss 104324 103964 -360 -0.3
.text 1262616 1259760 -2856 -0.2
qpg lighting-app qpg6105+debug (read only) 571076 568696 -2380 -0.4
.bss 88760 88400 -360 -0.4
.data 1060 1056 -4 -0.4
.text 565756 563376 -2380 -0.4
lock-app qpg6105+debug (read only) 517252 514832 -2420 -0.5
.bss 88200 87840 -360 -0.4
.text 511932 509512 -2420 -0.5
telink lighting-app tlsr9518adk80d (read/write) 846138 842966 -3172 -0.4
bss 86560 86448 -112 -0.1
text 592758 590086 -2672 -0.5
Full report (42 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 6ba06b2 a681bf0 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578426 575590 -2836 -0.5
.app_xip_area 484400 481916 -2484 -0.5
.bss 76772 76420 -352 -0.5
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 536486 533610 -2876 -0.5
.app_xip_area 444028 441512 -2516 -0.6
.bss 75244 74884 -360 -0.5
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 843256 840432 -2824 -0.3
(read/write) 126320 125952 -368 -0.3
.bss 124416 124056 -360 -0.3
.data 1900 1892 -8 -0.4
.text 843248 840424 -2824 -0.3
BRD4161A+rpc (read only) 830608 827800 -2808 -0.3
(read/write) 142976 142608 -368 -0.3
.bss 140976 140616 -360 -0.3
.data 2000 1992 -8 -0.4
.text 830600 827792 -2808 -0.3
window-app BRD4161A (read only) 815848 813044 -2804 -0.3
(read/write) 124948 124580 -368 -0.3
.bss 123092 122732 -360 -0.3
.data 1856 1848 -8 -0.4
.text 815840 813036 -2804 -0.3
esp32 all-clusters-app c3devkit (read only) 933898 931104 -2794 -0.3
(read/write) 1398402 1397866 -536 -0.0
.dram0.bss 69992 69880 -112 -0.2
.dram0.data 14244 14236 -8 -0.1
.flash.rodata 195256 194848 -408 -0.2
.flash.text 933898 931104 -2794 -0.3
.iram0.text 62056 62056 0 0.0
m5stack (read only) 981703 979435 -2268 -0.2
(read/write) 462764 462252 -512 -0.1
.dram0.bss 74744 74632 -112 -0.1
.dram0.data 34024 34024 0 0.0
.flash.rodata 221868 221468 -400 -0.2
.flash.text 976319 974051 -2268 -0.2
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 663156 660288 -2868 -0.4
.bss 76468 76116 -352 -0.5
.data 1868 1860 -8 -0.4
.text 579020 576512 -2508 -0.4
lock k32w061+release (read/write) 664188 661332 -2856 -0.4
.bss 76780 76428 -352 -0.5
.data 1892 1892 0 0.0
.text 579716 577212 -2504 -0.4
linux all-clusters-app debug (read only) 2291721 2280193 -11528 -0.5
(read/write) 146640 146312 -328 -0.2
.bss 62912 62656 -256 -0.4
.data 1200 1200 0 0.0
.data.rel.ro 76824 76760 -64 -0.1
.dynamic 592 592 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 936 928 -8 -0.9
.rodata 204469 202261 -2208 -1.1
.text 1926594 1917442 -9152 -0.5
bridge-app debug+rpc (read only) 1627029 1616813 -10216 -0.6
(read/write) 89288 88704 -584 -0.7
.bss 45248 44736 -512 -1.1
.data 1794 1794 0 0.0
.data.rel.ro 37088 37024 -64 -0.2
.dynamic 592 592 0 0.0
.got 3968 3968 0 0.0
.init 27 27 0 0.0
.init_array 544 536 -8 -1.5
.rodata 137940 136532 -1408 -1.0
.text 1374309 1365669 -8640 -0.6
chip-tool debug (read only) 6965221 6965085 -136 -0.0
(read/write) 180336 180328 -8 -0.0
.bss 37240 37240 0 0.0
.data 1064 1064 0 0.0
.data.rel.ro 136016 136016 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 624 616 -8 -1.3
.rodata 416321 416321 0 0.0
.text 6198373 6198261 -112 -0.0
chip-tool-ipv6only arm64 (read only) 6931844 6931844 0 0.0
(read/write) 283201 283201 0 0.0
.bss 55553 55553 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 178216 178216 0 0.0
.dynamic 560 560 0 0.0
.got 44528 44528 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 396844 396844 0 0.0
.text 5952804 5952804 0 0.0
door-lock-app debug (read only) 1848225 1837737 -10488 -0.6
(read/write) 119200 118584 -616 -0.5
.bss 51296 50784 -512 -1.0
.data 994 962 -32 -3.2
.data.rel.ro 61504 61440 -64 -0.1
.dynamic 592 592 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 664 656 -8 -1.2
.rodata 171292 169852 -1440 -0.8
.text 1529202 1520322 -8880 -0.6
lighting-app debug+rpc (read only) 1948153 1937793 -10360 -0.5
(read/write) 124128 123576 -552 -0.4
.bss 52216 51736 -480 -0.9
.data 1392 1392 0 0.0
.data.rel.ro 65040 64976 -64 -0.1
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 704 696 -8 -1.1
.rodata 161329 159793 -1536 -1.0
.text 1633074 1624418 -8656 -0.5
ota-provider-app debug (read only) 1627369 1617089 -10280 -0.6
(read/write) 88904 88352 -552 -0.6
.bss 50176 49696 -480 -1.0
.data 1064 1064 0 0.0
.data.rel.ro 32168 32104 -64 -0.2
.dynamic 608 608 0 0.0
.got 4240 4240 0 0.0
.init 27 27 0 0.0
.init_array 608 600 -8 -1.3
.rodata 147814 146566 -1248 -0.8
.text 1362498 1353634 -8864 -0.7
ota-requestor-app debug (read only) 1636113 1625769 -10344 -0.6
(read/write) 91936 91384 -552 -0.6
.bss 51456 50976 -480 -0.9
.data 1096 1096 0 0.0
.data.rel.ro 34088 34024 -64 -0.2
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 632 624 -8 -1.3
.rodata 144247 142935 -1312 -0.9
.text 1375842 1366978 -8864 -0.6
shell debug (read only) 2266313 2254785 -11528 -0.5
(read/write) 148416 148088 -328 -0.2
.bss 70624 70368 -256 -0.4
.data 768 768 0 0.0
.data.rel.ro 71344 71280 -64 -0.1
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 920 912 -8 -0.9
.rodata 205202 202994 -2208 -1.1
.text 1906386 1897234 -9152 -0.5
thermostat-no-ble arm64 (read only) 2082348 2072716 -9632 -0.5
(read/write) 149617 149313 -304 -0.2
.bss 67329 67121 -208 -0.3
.data 960 952 -8 -0.8
.data.rel.ro 74216 74152 -64 -0.1
.dynamic 560 560 0 0.0
.got 4144 4112 -32 -0.8
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 130172 129564 -608 -0.5
.text 1734896 1726112 -8784 -0.5
tv-app debug (read only) 2344289 2333673 -10616 -0.5
(read/write) 321952 321656 -296 -0.1
.bss 241568 241344 -224 -0.1
.data 2944 2944 0 0.0
.data.rel.ro 71408 71344 -64 -0.1
.dynamic 592 592 0 0.0
.got 4520 4520 0 0.0
.init 27 27 0 0.0
.init_array 888 880 -8 -0.9
.rodata 199308 197644 -1664 -0.8
.text 1975298 1966514 -8784 -0.4
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2383584 2380872 -2712 -0.1
.bss 188892 188780 -112 -0.1
.data 5288 5288 0 0.0
.text 1346184 1343472 -2712 -0.2
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2338040 2335504 -2536 -0.1
.bss 179424 179064 -360 -0.2
.data 5584 5576 -8 -0.1
.text 1300640 1298104 -2536 -0.2
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302080 2299608 -2472 -0.1
.bss 179296 178936 -360 -0.2
.data 5552 5544 -8 -0.1
.text 1264680 1262208 -2472 -0.2
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2292756 2290212 -2544 -0.1
.bss 176572 176220 -352 -0.2
.data 5384 5376 -8 -0.1
.text 1255328 1252784 -2544 -0.2
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 981695 978891 -2804 -0.3
bss 119780 119428 -352 -0.3
rodata 115684 115328 -356 -0.3
text 668420 666320 -2100 -0.3
nrf52840dk_nrf52840+rpc (read/write) 967243 964419 -2824 -0.3
bss 116824 116472 -352 -0.3
rodata 107160 106800 -360 -0.3
text 664860 662760 -2100 -0.3
nrf52840dongle_nrf52840 (read/write) 997747 994939 -2808 -0.3
bss 120952 120600 -352 -0.3
rodata 114516 114156 -360 -0.3
text 673828 671728 -2100 -0.3
nrf5340dk_nrf5340_cpuapp (read/write) 890866 888058 -2808 -0.3
bss 116568 116216 -352 -0.3
rodata 108964 108604 -360 -0.3
text 584596 582500 -2096 -0.4
lock-app nrf52840dk_nrf52840 (read/write) 914307 911471 -2836 -0.3
bss 118132 117780 -352 -0.3
rodata 104320 103964 -356 -0.3
text 614464 612336 -2128 -0.3
nrf5340dk_nrf5340_cpuapp (read/write) 824358 821518 -2840 -0.3
bss 114948 114596 -352 -0.3
rodata 97528 97168 -360 -0.4
text 531424 529300 -2124 -0.4
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 917155 914311 -2844 -0.3
bss 117888 117536 -352 -0.3
rodata 104832 104476 -356 -0.3
text 616988 614860 -2128 -0.3
pump-controller-app nrf52840dk_nrf52840 (read/write) 912355 909519 -2836 -0.3
bss 117896 117544 -352 -0.3
rodata 103936 103580 -356 -0.3
text 613040 610908 -2132 -0.3
shell nrf52840dk_nrf52840 (read/write) 798203 798203 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533640 533640 0 0.0
p6 all-clusters-app default (read/write) 2443344 2440408 -2936 -0.1
.bss 117044 116932 -112 -0.1
.data 2584 2584 0 0.0
.text 1401608 1398672 -2936 -0.2
light-app default (read/write) 2338840 2336016 -2824 -0.1
.bss 104604 104244 -360 -0.3
.data 2408 2400 -8 -0.3
.text 1297104 1294280 -2824 -0.2
lock-app default (read/write) 2304352 2301496 -2856 -0.1
.bss 104324 103964 -360 -0.3
.data 2360 2360 0 0.0
.text 1262616 1259760 -2856 -0.2
qpg lighting-app qpg6105+debug (read only) 571076 568696 -2380 -0.4
(read/write) 146936 146940 4 0.0
.bss 88760 88400 -360 -0.4
.data 1060 1056 -4 -0.4
.text 565756 563376 -2380 -0.4
lock-app qpg6105+debug (read only) 517252 514832 -2420 -0.5
(read/write) 146940 146940 0 0.0
.bss 88200 87840 -360 -0.4
.data 992 992 0 0.0
.text 511932 509512 -2420 -0.5
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 846138 842966 -3172 -0.4
bss 86560 86448 -112 -0.1
noinit 37160 37160 0 0.0
text 592758 590086 -2672 -0.5

@andy31415 andy31415 merged commit 8b503ad into project-chip:master Jan 30, 2022
@bzbarsky-apple bzbarsky-apple deleted the remove-dead-send-code branch January 30, 2022 16:06
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.

5 participants