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 mMessageWriter member of WriteHandler. #15068

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

Fixes #14943

Problem

Member that really has stack lifetime and use.

Change overview

Put it on the stack. Save a few hundred bytes .bss.

Testing

No behavior changes.

@github-actions
Copy link

github-actions bot commented Feb 11, 2022

PR #15068: Size comparison from 70f8af2 to f7ff35c

Increases (2 builds for linux)
platform target config section 70f8af2 f7ff35c change % change
linux chip-tool-ipv6only arm64 (read only) 8064028 8064060 32 0.0
.text 6901044 6901076 32 0.0
thermostat-no-ble arm64 (read only) 2140076 2140092 16 0.0
.text 1789504 1789520 16 0.0
Decreases (30 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 70f8af2 f7ff35c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 607074 606786 -288 -0.0
.app_xip_area 508552 508488 -64 -0.0
.bss 81220 80996 -224 -0.3
lock cyw930739m2evb_01 (read/write) 563778 563490 -288 -0.1
.app_xip_area 466824 466760 -64 -0.0
.bss 79692 79468 -224 -0.3
ota-requestor cyw930739m2evb_01 (read/write) 584586 584290 -296 -0.1
.app_xip_area 478376 478304 -72 -0.0
.bss 88620 88396 -224 -0.3
efr32 lighting-app BRD4161A (read only) 907632 907504 -128 -0.0
(read/write) 128976 128752 -224 -0.2
.bss 126944 126720 -224 -0.2
.text 907624 907496 -128 -0.0
BRD4161A+rpc (read only) 895092 894964 -128 -0.0
(read/write) 145636 145412 -224 -0.2
.bss 143504 143280 -224 -0.2
.text 895084 894956 -128 -0.0
window-app BRD4161A (read only) 842712 842600 -112 -0.0
(read/write) 127040 126816 -224 -0.2
.bss 125136 124912 -224 -0.2
.text 842704 842592 -112 -0.0
esp32 all-clusters-app c3devkit (read only) 943728 943618 -110 -0.0
(read/write) 1399722 1399482 -240 -0.0
.dram0.bss 68000 67760 -240 -0.4
.flash.text 943728 943618 -110 -0.0
m5stack (read only) 993551 993499 -52 -0.0
(read/write) 464992 464752 -240 -0.1
.dram0.bss 73144 72904 -240 -0.3
.flash.text 988167 988115 -52 -0.0
k32w light k32w061+release (read/write) 684248 683960 -288 -0.0
.bss 78248 78024 -224 -0.3
.text 598296 598232 -64 -0.0
lock k32w061+release (read/write) 689088 688800 -288 -0.0
.bss 78640 78416 -224 -0.3
.text 602700 602636 -64 -0.0
linux chip-tool-ipv6only arm64 (read/write) 341185 340801 -384 -0.1
.bss 51681 51297 -384 -0.7
thermostat-no-ble arm64 (read/write) 142209 141825 -384 -0.3
.bss 59105 58721 -384 -0.6
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2396632 2396568 -64 -0.0
.bss 190068 189844 -224 -0.1
.text 1359232 1359168 -64 -0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2358456 2358392 -64 -0.0
.bss 182680 182456 -224 -0.1
.text 1321056 1320992 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2321984 2321920 -64 -0.0
.bss 182568 182344 -224 -0.1
.text 1284584 1284520 -64 -0.0
shell CY8CPROTO_062_4343W+release (read/write) 2308052 2307924 -128 -0.0
.bss 179820 179596 -224 -0.1
.text 1270624 1270496 -128 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1015947 1015755 -192 -0.0
bss 123004 122780 -224 -0.2
text 694520 694452 -68 -0.0
nrf52840dk_nrf52840+rpc (read/write) 984779 984587 -192 -0.0
bss 120192 119968 -224 -0.2
text 674132 674064 -68 -0.0
nrf52840dongle_nrf52840 (read/write) 1031775 1031567 -208 -0.0
bss 124392 124168 -224 -0.2
text 699108 699040 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 922690 922386 -304 -0.0
bss 119568 119344 -224 -0.2
text 609556 609484 -72 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 945775 945455 -320 -0.0
bss 121376 121152 -224 -0.2
text 637520 637456 -64 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 853250 852946 -304 -0.0
bss 117968 117744 -224 -0.2
text 553328 553260 -68 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 945187 944867 -320 -0.0
bss 121096 120872 -224 -0.2
text 637780 637712 -68 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 940535 940215 -320 -0.0
bss 121100 120876 -224 -0.2
text 633816 633752 -64 -0.0
p6 all-clusters-app default (read/write) 2482032 2481904 -128 -0.0
.bss 119688 119464 -224 -0.2
.text 1440296 1440168 -128 -0.0
light-app default (read/write) 2388616 2388504 -112 -0.0
.bss 109336 109112 -224 -0.2
.text 1346880 1346768 -112 -0.0
lock-app default (read/write) 2352072 2351960 -112 -0.0
.bss 109056 108832 -224 -0.2
.text 1310336 1310224 -112 -0.0
qpg lighting-app qpg6105+debug (read only) 593688 593632 -56 -0.0
.bss 90520 90408 -112 -0.1
.text 588368 588312 -56 -0.0
lock-app qpg6105+debug (read only) 559440 559384 -56 -0.0
.bss 90504 90392 -112 -0.1
.text 554120 554064 -56 -0.0
telink lighting-app tlsr9518adk80d (read/write) 874846 874470 -376 -0.0
bss 90328 90088 -240 -0.3
text 613496 613354 -142 -0.0
Full report (34 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 70f8af2 f7ff35c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 607074 606786 -288 -0.0
.app_xip_area 508552 508488 -64 -0.0
.bss 81220 80996 -224 -0.3
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 563778 563490 -288 -0.1
.app_xip_area 466824 466760 -64 -0.0
.bss 79692 79468 -224 -0.3
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 584586 584290 -296 -0.1
.app_xip_area 478376 478304 -72 -0.0
.bss 88620 88396 -224 -0.3
.data 552 552 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 907632 907504 -128 -0.0
(read/write) 128976 128752 -224 -0.2
.bss 126944 126720 -224 -0.2
.data 2032 2032 0 0.0
.text 907624 907496 -128 -0.0
BRD4161A+rpc (read only) 895092 894964 -128 -0.0
(read/write) 145636 145412 -224 -0.2
.bss 143504 143280 -224 -0.2
.data 2132 2132 0 0.0
.text 895084 894956 -128 -0.0
window-app BRD4161A (read only) 842712 842600 -112 -0.0
(read/write) 127040 126816 -224 -0.2
.bss 125136 124912 -224 -0.2
.data 1900 1900 0 0.0
.text 842704 842592 -112 -0.0
esp32 all-clusters-app c3devkit (read only) 943728 943618 -110 -0.0
(read/write) 1399722 1399482 -240 -0.0
.dram0.bss 68000 67760 -240 -0.4
.dram0.data 14268 14268 0 0.0
.flash.rodata 198560 198560 0 0.0
.flash.text 943728 943618 -110 -0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 993551 993499 -52 -0.0
(read/write) 464992 464752 -240 -0.1
.dram0.bss 73144 72904 -240 -0.3
.dram0.data 34064 34064 0 0.0
.flash.rodata 225656 225656 0 0.0
.flash.text 988167 988115 -52 -0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 684248 683960 -288 -0.0
.bss 78248 78024 -224 -0.3
.data 1904 1904 0 0.0
.text 598296 598232 -64 -0.0
lock k32w061+release (read/write) 689088 688800 -288 -0.0
.bss 78640 78416 -224 -0.3
.data 1948 1948 0 0.0
.text 602700 602636 -64 -0.0
linux chip-tool-ipv6only arm64 (read only) 8064028 8064060 32 0.0
(read/write) 341185 340801 -384 -0.1
.bss 51681 51297 -384 -0.7
.data 1216 1216 0 0.0
.data.rel.ro 235544 235544 0 0.0
.dynamic 560 560 0 0.0
.got 48944 48944 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 433684 433684 0 0.0
.text 6901044 6901076 32 0.0
thermostat-no-ble arm64 (read only) 2140076 2140092 16 0.0
(read/write) 142209 141825 -384 -0.3
.bss 59105 58721 -384 -0.6
.data 1032 1032 0 0.0
.data.rel.ro 74960 74960 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 328 328 0 0.0
.rodata 132460 132460 0 0.0
.text 1789504 1789520 16 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2396632 2396568 -64 -0.0
.bss 190068 189844 -224 -0.1
.data 5320 5320 0 0.0
.text 1359232 1359168 -64 -0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2358456 2358392 -64 -0.0
.bss 182680 182456 -224 -0.1
.data 5624 5624 0 0.0
.text 1321056 1320992 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2321984 2321920 -64 -0.0
.bss 182568 182344 -224 -0.1
.data 5600 5600 0 0.0
.text 1284584 1284520 -64 -0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139648 1139648 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103032 103032 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2308052 2307924 -128 -0.0
.bss 179820 179596 -224 -0.1
.data 5424 5424 0 0.0
.text 1270624 1270496 -128 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1015947 1015755 -192 -0.0
bss 123004 122780 -224 -0.2
rodata 119528 119528 0 0.0
text 694520 694452 -68 -0.0
nrf52840dk_nrf52840+rpc (read/write) 984779 984587 -192 -0.0
bss 120192 119968 -224 -0.2
rodata 110896 110896 0 0.0
text 674132 674064 -68 -0.0
nrf52840dongle_nrf52840 (read/write) 1031775 1031567 -208 -0.0
bss 124392 124168 -224 -0.2
rodata 118392 118392 0 0.0
text 699108 699040 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 922690 922386 -304 -0.0
bss 119568 119344 -224 -0.2
rodata 112772 112772 0 0.0
text 609556 609484 -72 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 945775 945455 -320 -0.0
bss 121376 121152 -224 -0.2
rodata 108276 108276 0 0.0
text 637520 637456 -64 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 853250 852946 -304 -0.0
bss 117968 117744 -224 -0.2
rodata 101444 101444 0 0.0
text 553328 553260 -68 -0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 527595 527595 0 0.0
bss 53632 53632 0 0.0
rodata 49976 49976 0 0.0
text 361016 361016 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 945187 944867 -320 -0.0
bss 121096 120872 -224 -0.2
rodata 107632 107632 0 0.0
text 637780 637712 -68 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 940535 940215 -320 -0.0
bss 121100 120876 -224 -0.2
rodata 106924 106924 0 0.0
text 633816 633752 -64 -0.0
shell nrf52840dk_nrf52840 (read/write) 806207 806207 0 0.0
bss 112376 112376 0 0.0
rodata 78948 78948 0 0.0
text 537304 537304 0 0.0
p6 all-clusters-app default (read/write) 2482032 2481904 -128 -0.0
.bss 119688 119464 -224 -0.2
.data 2672 2672 0 0.0
.text 1440296 1440168 -128 -0.0
light-app default (read/write) 2388616 2388504 -112 -0.0
.bss 109336 109112 -224 -0.2
.data 2520 2520 0 0.0
.text 1346880 1346768 -112 -0.0
lock-app default (read/write) 2352072 2351960 -112 -0.0
.bss 109056 108832 -224 -0.2
.data 2480 2480 0 0.0
.text 1310336 1310224 -112 -0.0
qpg lighting-app qpg6105+debug (read only) 593688 593632 -56 -0.0
(read/write) 146936 146936 0 0.0
.bss 90520 90408 -112 -0.1
.data 1108 1108 0 0.0
.text 588368 588312 -56 -0.0
lock-app qpg6105+debug (read only) 559440 559384 -56 -0.0
(read/write) 146936 146936 0 0.0
.bss 90504 90392 -112 -0.1
.data 1060 1060 0 0.0
.text 554120 554064 -56 -0.0
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 874846 874470 -376 -0.0
bss 90328 90088 -240 -0.3
noinit 37160 37160 0 0.0
text 613496 613354 -142 -0.0

@andy31415 andy31415 merged commit 129841e into project-chip:master Feb 14, 2022
@bzbarsky-apple bzbarsky-apple deleted the smaller-write-handler branch February 14, 2022 18:42
jamesluo11 pushed a commit to jamesluo11/connectedhomeip that referenced this pull request Apr 26, 2022
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.

Move mWriteResponseBuilder in WriteHandler to stack
3 participants