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

Darwin: Refactor stack startup logic when creating a controller #32845

Merged

Conversation

ksperling-apple
Copy link
Contributor

@ksperling-apple ksperling-apple commented Apr 4, 2024

Preparatory work for avoiding the stop/start of the stack we currently do.

Copy link

github-actions bot commented Apr 4, 2024

PR #32845: Size comparison from 2ca30ac to a99d69a

Decreases (2 builds for efr32)
platform target config section 2ca30ac a99d69a change % change
efr32 lighting-app BRD4187C (read/write) 1112936 1112928 -8 -0.0
.text 914324 914316 -8 -0.0
lock-app BRD4338a (read/write) 959608 959600 -8 -0.0
.text 699868 699860 -8 -0.0
Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
platform target config section 2ca30ac a99d69a change % change
bl602 lighting-app bl602 (read/write) 1441158 1441158 0 0.0
.bss 85344 85344 0 0.0
.data 9504 9504 0 0.0
.rodata 158872 158872 0 0.0
.text 1106792 1106792 0 0.0
bl602+mfd (read/write) 1455582 1455582 0 0.0
.bss 85504 85504 0 0.0
.data 9480 9480 0 0.0
.rodata 157832 157832 0 0.0
.text 1122108 1122108 0 0.0
bl602+rpc (read/write) 1488806 1488806 0 0.0
.bss 93376 93376 0 0.0
.data 9880 9880 0 0.0
.rodata 166440 166440 0 0.0
.text 1138438 1138438 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1205863 1205863 0 0.0
.bss 11133 11133 0 0.0
.data 3688 3688 0 0.0
.rodata 108232 108232 0 0.0
.text 975952 975952 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1216675 1216675 0 0.0
.bss 11309 11309 0 0.0
.data 3664 3664 0 0.0
.rodata 107172 107172 0 0.0
.text 987704 987704 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1297611 1297611 0 0.0
.bss 19613 19613 0 0.0
.data 4224 4224 0 0.0
.rodata 123604 123604 0 0.0
.text 1050916 1050916 0 0.0
bl706-eth (read/write) 1023297 1023297 0 0.0
.bss 23708 23708 0 0.0
.data 3264 3264 0 0.0
.rodata 101556 101556 0 0.0
.text 766808 766808 0 0.0
bl706-wifi (read/write) 1257814 1257814 0 0.0
.bss 10577 10577 0 0.0
.data 3696 3696 0 0.0
.rodata 122556 122556 0 0.0
.text 998572 998572 0 0.0
bl702l lighting-app bl702l (read/write) 1175708 1175708 0 0.0
.bss 16328 16328 0 0.0
.data 5048 5048 0 0.0
.rodata 102236 102236 0 0.0
.text 968806 968806 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1186600 1186600 0 0.0
.bss 16504 16504 0 0.0
.data 5032 5032 0 0.0
.rodata 101176 101176 0 0.0
.text 981126 981126 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 781700 781700 0 0.0
(read/write) 168728 168728 0 0.0
.bss 90688 90688 0 0.0
.data 3584 3584 0 0.0
.rodata 82500 82500 0 0.0
.text 698932 698932 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 798100 798100 0 0.0
(read/write) 178968 178968 0 0.0
.bss 100944 100944 0 0.0
.data 3576 3576 0 0.0
.rodata 76684 76684 0 0.0
.text 721148 721148 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 786748 786748 0 0.0
(read/write) 173408 173408 0 0.0
.bss 95384 95384 0 0.0
.data 3576 3576 0 0.0
.rodata 103436 103436 0 0.0
.text 683044 683044 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 738804 738804 0 0.0
(read/write) 167696 167696 0 0.0
.bss 89428 89428 0 0.0
.data 3568 3568 0 0.0
.rodata 78172 78172 0 0.0
.text 660364 660364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 724452 724452 0 0.0
(read/write) 167912 167912 0 0.0
.bss 89644 89644 0 0.0
.data 3568 3568 0 0.0
.rodata 73948 73948 0 0.0
.text 650236 650236 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 585498 585498 0 0.0
(read/write) 207984 207984 0 0.0
.bss 201212 201212 0 0.0
.data 1648 1648 0 0.0
.rodata 87314 87314 0 0.0
.text 496064 496064 0 0.0
lock CC3235SF_LAUNCHXL (read only) 630922 630922 0 0.0
(read/write) 208328 208328 0 0.0
.bss 201704 201704 0 0.0
.data 1504 1504 0 0.0
.rodata 107762 107762 0 0.0
.text 521040 521040 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 568875 568875 0 0.0
.app_xip_area 458885 458885 0 0.0
.bss 64816 64816 0 0.0
.data 752 752 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 551467 551467 0 0.0
.app_xip_area 436717 436717 0 0.0
.bss 69568 69568 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 571923 571923 0 0.0
.app_xip_area 463437 463437 0 0.0
.bss 63352 63352 0 0.0
.data 712 712 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 564499 564499 0 0.0
.app_xip_area 452733 452733 0 0.0
.bss 66552 66552 0 0.0
.data 792 792 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4187C (read/write) 1112936 1112928 -8 -0.0
.bss 195168 195168 0 0.0
.data 3424 3424 0 0.0
.text 914324 914316 -8 -0.0
lock-app BRD4338a (read/write) 959608 959600 -8 -0.0
.bss 210180 210180 0 0.0
.data 30192 30192 0 0.0
.text 699868 699860 -8 -0.0
window-app BRD4187C (read/write) 1160424 1160424 0 0.0
.bss 167576 167576 0 0.0
.data 3336 3336 0 0.0
.text 989492 989492 0 0.0
esp32 all-clusters-app c3devkit (read only) 1212884 1212884 0 0.0
(read/write) 1750120 1750120 0 0.0
.dram0.bss 74312 74312 0 0.0
.dram0.data 13628 13628 0 0.0
.flash.rodata 252648 252648 0 0.0
.flash.text 1212884 1212884 0 0.0
.iram0.text 75530 75530 0 0.0
m5stack (read only) 1254851 1254851 0 0.0
(read/write) 536264 536264 0 0.0
.dram0.bss 80992 80992 0 0.0
.dram0.data 35180 35180 0 0.0
.flash.rodata 284172 284172 0 0.0
.flash.text 1248687 1248687 0 0.0
.iram0.text 125403 125403 0 0.0
linux air-purifier-app debug (read only) 2641477 2641477 0 0.0
(read/write) 129656 129656 0 0.0
.bss 46608 46608 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 74872 74872 0 0.0
.dynamic 608 608 0 0.0
.got 4520 4520 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 185008 185008 0 0.0
.text 2277909 2277909 0 0.0
all-clusters-app debug (read only) 5949153 5949153 0 0.0
(read/write) 481160 481160 0 0.0
.bss 134944 134944 0 0.0
.data 4560 4560 0 0.0
.data.rel.ro 334264 334264 0 0.0
.dynamic 624 624 0 0.0
.got 5328 5328 0 0.0
.init 27 27 0 0.0
.init_array 1408 1408 0 0.0
.rodata 349648 349648 0 0.0
.text 5165155 5165155 0 0.0
all-clusters-minimal-app debug (read only) 5229321 5229321 0 0.0
(read/write) 237144 237144 0 0.0
.bss 127776 127776 0 0.0
.data 4464 4464 0 0.0
.data.rel.ro 97848 97848 0 0.0
.dynamic 624 624 0 0.0
.got 5248 5248 0 0.0
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 288618 288618 0 0.0
.text 4705011 4705011 0 0.0
bridge-app debug (read only) 4622689 4622689 0 0.0
(read/write) 217960 217960 0 0.0
.bss 118272 118272 0 0.0
.data 6240 6240 0 0.0
.data.rel.ro 86768 86768 0 0.0
.dynamic 624 624 0 0.0
.got 5216 5216 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 229354 229354 0 0.0
.text 4172067 4172067 0 0.0
chip-tool debug (read only) 12077441 12077441 0 0.0
(read/write) 522656 522656 0 0.0
.bss 94520 94520 0 0.0
.data 5122 5122 0 0.0
.data.rel.ro 415808 415808 0 0.0
.dynamic 624 624 0 0.0
.got 5736 5736 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 450361 450361 0 0.0
.text 10919155 10919155 0 0.0
chip-tool-ipv6only arm64 (read only) 11397908 11397908 0 0.0
(read/write) 589064 589064 0 0.0
.bss 103608 103608 0 0.0
.data 4512 4512 0 0.0
.data.rel.ro 455720 455720 0 0.0
.dynamic 512 512 0 0.0
.got 17032 17032 0 0.0
.init 24 24 0 0.0
.init_array 264 264 0 0.0
.rodata 355796 355796 0 0.0
.text 1016112 1016112 0 0.0
lighting-app debug+rpc+ui (read only) 5546545 5546545 0 0.0
(read/write) 226720 226720 0 0.0
.bss 119208 119208 0 0.0
.data 4864 4864 0 0.0
.data.rel.ro 95152 95152 0 0.0
.dynamic 672 672 0 0.0
.got 5856 5856 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 354164 354164 0 0.0
.text 4944723 4944723 0 0.0
lock-app debug (read only) 4690281 4690281 0 0.0
(read/write) 205544 205544 0 0.0
.bss 113696 113696 0 0.0
.data 4160 4160 0 0.0
.data.rel.ro 81016 81016 0 0.0
.dynamic 624 624 0 0.0
.got 5168 5168 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 255242 255242 0 0.0
.text 4222403 4222403 0 0.0
ota-provider-app debug (read only) 4303921 4303921 0 0.0
(read/write) 193848 193848 0 0.0
.bss 113312 113312 0 0.0
.data 4368 4368 0 0.0
.data.rel.ro 70240 70240 0 0.0
.dynamic 624 624 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 208266 208266 0 0.0
.text 3901603 3901603 0 0.0
ota-requestor-app debug (read only) 4433585 4433585 0 0.0
(read/write) 198216 198216 0 0.0
.bss 114208 114208 0 0.0
.data 4768 4768 0 0.0
.data.rel.ro 73344 73344 0 0.0
.dynamic 624 624 0 0.0
.got 4472 4472 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 214506 214506 0 0.0
.text 4020483 4020483 0 0.0
shell debug (read only) 2914953 2914953 0 0.0
(read/write) 156560 156560 0 0.0
.bss 62416 62416 0 0.0
.data 1424 1424 0 0.0
.data.rel.ro 86944 86944 0 0.0
.dynamic 592 592 0 0.0
.got 4056 4056 0 0.0
.init 27 27 0 0.0
.init_array 1080 1080 0 0.0
.rodata 185376 185376 0 0.0
.text 2555330 2555330 0 0.0
thermostat-no-ble arm64 (read only) 4423676 4423676 0 0.0
(read/write) 243400 243400 0 0.0
.bss 121848 121848 0 0.0
.data 3392 3392 0 0.0
.data.rel.ro 104080 104080 0 0.0
.dynamic 512 512 0 0.0
.got 8632 8632 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 159988 159988 0 0.0
.text 3927848 3927848 0 0.0
tv-app debug (read only) 5758425 5758425 0 0.0
(read/write) 352920 352920 0 0.0
.bss 244112 244112 0 0.0
.data 6560 6560 0 0.0
.data.rel.ro 95000 95000 0 0.0
.dynamic 624 624 0 0.0
.got 5464 5464 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 292330 292330 0 0.0
.text 5223155 5223155 0 0.0
tv-casting-app debug (read only) 9888329 9888329 0 0.0
(read/write) 340472 340472 0 0.0
.bss 155920 155920 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 174688 174688 0 0.0
.dynamic 624 624 0 0.0
.got 5040 5040 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 382712 382712 0 0.0
.text 9039219 9039219 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2534216 2534216 0 0.0
.bss 220464 220464 0 0.0
.data 5216 5216 0 0.0
.text 1496900 1496900 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1064240 1064240 0 0.0
bss 133099 133099 0 0.0
rodata 102960 102960 0 0.0
text 780952 780952 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1225332 1225332 0 0.0
bss 127155 127155 0 0.0
rodata 151304 151304 0 0.0
text 796844 796844 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1011720 1011720 0 0.0
bss 131957 131957 0 0.0
rodata 90224 90224 0 0.0
text 742316 742316 0 0.0
nxp contact k32w0+release (read only) 574300 574300 0 0.0
(read/write) 79968 79968 0 0.0
.bss 67804 67804 0 0.0
.data 2180 2180 0 0.0
.text 573764 573764 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 701244 701244 0 0.0
.bss 71148 71148 0 0.0
.data 2856 2856 0 0.0
.text 587856 587856 0 0.0
light k32w0+release (read only) 608216 608216 0 0.0
(read/write) 79364 79364 0 0.0
.bss 67188 67188 0 0.0
.data 2192 2192 0 0.0
.text 607680 607680 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 792968 792968 0 0.0
.bss 80628 80628 0 0.0
.data 2056 2056 0 0.0
.text 670920 670920 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 834432 834432 0 0.0
(read/write) 1799748 1799748 0 0.0
.bss 196228 196228 0 0.0
.data 2680 2680 0 0.0
.text 1592452 1592452 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837584 837584 0 0.0
(read/write) 1721628 1721628 0 0.0
.bss 193108 193108 0 0.0
.data 2648 2648 0 0.0
.text 1517484 1517484 0 0.0
light cy8ckit_062s2_43012 (read only) 844312 844312 0 0.0
(read/write) 1640380 1640380 0 0.0
.bss 186572 186572 0 0.0
.data 2456 2456 0 0.0
.text 1442964 1442964 0 0.0
lock cy8ckit_062s2_43012 (read only) 817152 817152 0 0.0
(read/write) 1669868 1669868 0 0.0
.bss 213732 213732 0 0.0
.data 2456 2456 0 0.0
.text 1445292 1445292 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1131432 1131432 0 0.0
.bss 102480 102480 0 0.0
.data 836 836 0 0.0
.text 643816 643816 0 0.0
lock-app qpg6105+debug (read/write) 1091488 1091488 0 0.0
.bss 97224 97224 0 0.0
.data 856 856 0 0.0
.text 603868 603868 0 0.0
stm32 light STM32WB5MM-DK (read/write) 602789 602789 0 0.0
.bss 128336 128336 0 0.0
.data 676 676 0 0.0
.rodata 80084 80084 0 0.0
.text 383960 383960 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 825318 825318 0 0.0
bss 49692 49692 0 0.0
text 617716 617716 0 0.0
all-clusters-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 1094364 1094364 0 0.0
bss 101796 101796 0 0.0
text 795044 795044 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 47960 47960 0 0.0
(read/write) 1051900 1051900 0 0.0
bss 110092 110092 0 0.0
text 766434 766434 0 0.0
bridge-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 912340 912340 0 0.0
bss 93132 93132 0 0.0
text 653632 653632 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 826974 826974 0 0.0
bss 49732 49732 0 0.0
text 619438 619438 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 930496 930496 0 0.0
bss 77472 77472 0 0.0
text 698088 698088 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 29122 29122 0 0.0
(read/write) 1075640 1075640 0 0.0
bss 100204 100204 0 0.0
text 779150 779150 0 0.0
lock-app-dfu tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 905156 905156 0 0.0
bss 69204 69204 0 0.0
text 654914 654914 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 931344 931344 0 0.0
bss 92704 92704 0 0.0
text 672752 672752 0 0.0
pump-app tlsr9258a_retention (read only) 51774 51774 0 0.0
(read/write) 829682 829682 0 0.0
bss 49840 49840 0 0.0
text 622478 622478 0 0.0
pump-controller-app tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 793248 793248 0 0.0
bss 56040 56040 0 0.0
text 593152 593152 0 0.0
shell tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 675844 675844 0 0.0
bss 73404 73404 0 0.0
text 461614 461614 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 834526 834526 0 0.0
bss 51372 51372 0 0.0
text 625818 625818 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 32220 32220 0 0.0
(read/write) 853209 853209 0 0.0
bss 59516 59516 0 0.0
text 637862 637862 0 0.0
thermostat tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 818936 818936 0 0.0
bss 56336 56336 0 0.0
text 612868 612868 0 0.0
window-covering tlsr9258a (read only) 51584 51584 0 0.0
(read/write) 837020 837020 0 0.0
bss 68112 68112 0 0.0
text 628116 628116 0 0.0

This was missed in project-chip#32745 when adding -fno-c++-static-destructors, since that
flag does not carry through to lazily initialized chip::Global instances.
@ksperling-apple ksperling-apple changed the title Darwin: Don't stop/start the stack when creating a controller Darwin: Refactor stack startup logic when creating a controller Apr 9, 2024
@ksperling-apple ksperling-apple merged commit 935c793 into project-chip:master Apr 9, 2024
65 of 66 checks passed
@ksperling-apple ksperling-apple deleted the stack-stop-start branch April 9, 2024 23:22
shaoltan-amazon pushed a commit to shaoltan-amazon/connectedhomeip that referenced this pull request Apr 10, 2024
…ect-chip#32845)

* Darwin: Don't stop/start the stack when creating a controller

* Keep refactorings in place but retain current behavior for now

* Darwin: Enable CHIP_CONFIG_GLOBALS_NO_DESTRUCT=1

This was missed in project-chip#32745 when adding -fno-c++-static-destructors, since that
flag does not carry through to lazily initialized chip::Global instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants