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

[QPG] Reduce ram usage #23681

Merged
merged 4 commits into from
Nov 22, 2022
Merged

[QPG] Reduce ram usage #23681

merged 4 commits into from
Nov 22, 2022

Conversation

adamb-q
Copy link
Contributor

@adamb-q adamb-q commented Nov 18, 2022

Reducing RAM usage by shrinking some buffers
Fixed hardfault on dereferencing nullptr

@github-actions
Copy link

github-actions bot commented Nov 21, 2022

PR #23681: Size comparison from 494f5f5 to 5f36b20

Increases (8 builds for bl602, bl702, cyw30739, nrfconnect, psoc6, telink)
platform target config section 494f5f5 5f36b20 change % change
bl602 lighting-app bl602 .text 1061182 1061184 2 0.0
bl702 lighting-app bl702 .debug_info 39158234 39158236 2 0.0
.text 957188 957192 4 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588438 588446 8 0.0
.app_xip_area 464648 464656 8 0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 806932 806936 4 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27020981 27020982 1 0.0
lock cy8ckit_062s2_43012 .debug_info 22446758 22446759 1 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 939068 939076 8 0.0
text 650282 650286 4 0.0
all-clusters-minimal-app tlsr9518adk80d text 614240 614242 2 0.0
Decreases (6 builds for cyw30739, esp32, psoc6, qpg, telink)
platform target config section 494f5f5 5f36b20 change % change
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544810 544802 -8 -0.0
.app_xip_area 426540 426532 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1214664 1214662 -2 -0.0
(read/write) 1786670 1786662 -8 -0.0
.flash.rodata 256496 256488 -8 -0.0
.flash.text 1214664 1214662 -2 -0.0
psoc6 light cy8ckit_062s2_43012 .debug_info 22227200 22227198 -2 -0.0
qpg lighting-app qpg6105+debug (read/write) 1152208 1151048 -1160 -0.1
.bss 111116 97628 -13488 -12.1
.data 848 844 -4 -0.5
.text 599308 598144 -1164 -0.2
lock-app qpg6105+debug (read/write) 1117640 1116724 -916 -0.1
.bss 106564 93100 -13464 -12.6
.text 564736 563820 -916 -0.2
telink light-switch-app tlsr9518adk80d text 555312 555310 -2 -0.0
Full report (40 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 494f5f5 5f36b20 change % change
bl602 lighting-app bl602 (read/write) 1377446 1377446 0 0.0
.bss 90041 90041 0 0.0
.data 9984 9984 0 0.0
.text 1061182 1061184 2 0.0
bl602+rpc (read/write) 1423310 1423310 0 0.0
.bss 98081 98081 0 0.0
.data 10376 10376 0 0.0
.text 1092656 1092656 0 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1196999 1196999 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1524244 1524244 0 0.0
.debug_aranges 132384 132384 0 0.0
.debug_frame 485640 485640 0 0.0
.debug_info 39158234 39158236 2 0.0
.debug_line 5276300 5276300 0 0.0
.debug_loc 3373203 3373203 0 0.0
.debug_ranges 361240 361240 0 0.0
.debug_str 3474842 3474842 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116680 116680 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 568313 568313 0 0.0
.symtab 172032 172032 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
957188 957192 4 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1285539 1285539 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1668414 1668414 0 0.0
.debug_aranges 140480 140480 0 0.0
.debug_frame 512976 512976 0 0.0
.debug_info 43429604 43429604 0 0.0
.debug_line 5673694 5673694 0 0.0
.debug_loc 3567814 3567814 0 0.0
.debug_ranges 384760 384760 0 0.0
.debug_str 3872439 3872439 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130424 130424 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 628463 628463 0 0.0
.symtab 190176 190176 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1031170 1031170 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 679603 679603 0 0.0
(read/write) 171932 171932 0 0.0
.bss 81228 81228 0 0.0
.data 3380 3380 0 0.0
.rodata 89923 89923 0 0.0
.text 589368 589368 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 643859 643859 0 0.0
(read/write) 157996 157996 0 0.0
.bss 80500 80500 0 0.0
.data 3380 3380 0 0.0
.rodata 79059 79059 0 0.0
.text 564480 564480 0 0.0
lock-ftd LP_CC2652R7 (read only) 677295 677295 0 0.0
(read/write) 171808 171808 0 0.0
.bss 78884 78884 0 0.0
.data 3304 3304 0 0.0
.rodata 77351 77351 0 0.0
.text 599464 599464 0 0.0
lock-mtd LP_CC2652R7 (read only) 661995 661995 0 0.0
(read/write) 182364 182364 0 0.0
.bss 74140 74140 0 0.0
.data 3304 3304 0 0.0
.rodata 103435 103435 0 0.0
.text 558080 558080 0 0.0
pump-app LP_CC2652R7 (read only) 690167 690167 0 0.0
(read/write) 159672 159672 0 0.0
.bss 78852 78852 0 0.0
.data 3296 3296 0 0.0
.rodata 90871 90871 0 0.0
.text 598812 598812 0 0.0
pump-controller-app LP_CC2652R7 (read only) 674139 674139 0 0.0
(read/write) 175796 175796 0 0.0
.bss 78948 78948 0 0.0
.data 3292 3292 0 0.0
.rodata 86427 86427 0 0.0
.text 587232 587232 0 0.0
shell LP_CC2652R7 (read only) 670822 670822 0 0.0
(read/write) 183032 183032 0 0.0
.bss 83548 83548 0 0.0
.data 3376 3376 0 0.0
.rodata 86670 86670 0 0.0
.text 583836 583836 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588438 588446 8 0.0
.app_xip_area 464648 464656 8 0.0
.bss 66208 66208 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592210 592210 0 0.0
.app_xip_area 463124 463124 0 0.0
.bss 71496 71496 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544810 544802 -8 -0.0
.app_xip_area 426540 426532 -8 -0.0
.bss 60736 60736 0 0.0
.data 684 684 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 975820 975820 0 0.0
.bss 152260 152260 0 0.0
.data 2168 2168 0 0.0
.text 821372 821372 0 0.0
BRD4161A+rs911x (read/write) 1036720 1036720 0 0.0
.bss 186736 186736 0 0.0
.data 2012 2012 0 0.0
.text 847948 847948 0 0.0
BRD4187C (read/write) 1148544 1148544 0 0.0
.bss 138656 138656 0 0.0
.data 2516 2516 0 0.0
.text 982776 982776 0 0.0
lock-app BRD4161A+wf200 (read/write) 1161360 1161360 0 0.0
.bss 158264 158264 0 0.0
.data 2020 2020 0 0.0
.text 1001052 1001052 0 0.0
window-app BRD4187C (read/write) 1141268 1141268 0 0.0
.bss 140072 140072 0 0.0
.data 2540 2540 0 0.0
.text 974060 974060 0 0.0
esp32 all-clusters-app c3devkit (read only) 1214664 1214662 -2 -0.0
(read/write) 1786670 1786662 -8 -0.0
.dram0.bss 76688 76688 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 256496 256488 -8 -0.0
.flash.text 1214664 1214662 -2 -0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1225427 1225427 0 0.0
(read/write) 562636 562636 0 0.0
.dram0.bss 82064 82064 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 313608 313608 0 0.0
.flash.text 1220043 1220043 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 662724 662724 0 0.0
.bss 77112 77112 0 0.0
.data 2104 2104 0 0.0
.text 564396 564396 0 0.0
light k32w0+release (read/write) 673256 673256 0 0.0
.bss 74912 74912 0 0.0
.data 2060 2060 0 0.0
.text 593556 593556 0 0.0
lock k32w0+release (read/write) 634284 634284 0 0.0
.bss 75672 75672 0 0.0
.data 2080 2080 0 0.0
.text 553804 553804 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10447340 10447340 0 0.0
(read/write) 707697 707697 0 0.0
.bss 33905 33905 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 651984 651984 0 0.0
.dynamic 560 560 0 0.0
.got 13944 13944 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 519292 519292 0 0.0
.text 8269476 8269476 0 0.0
thermostat-no-ble arm64 (read only) 2387012 2387012 0 0.0
(read/write) 143665 143665 0 0.0
.bss 55329 55329 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77256 77256 0 0.0
.dynamic 560 560 0 0.0
.got 5192 5192 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 145068 145068 0 0.0
.text 1998048 1998048 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453656 2453656 0 0.0
.bss 215012 215012 0 0.0
.data 5872 5872 0 0.0
.text 1416300 1416300 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1189583 1189583 0 0.0
bss 145285 145285 0 0.0
rodata 144804 144804 0 0.0
text 818414 818414 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1168963 1168963 0 0.0
bss 144512 144512 0 0.0
rodata 136592 136592 0 0.0
text 806932 806936 4 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1748228 1748228 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1235661 1235661 0 0.0
.debug_aranges 110744 110744 0 0.0
.debug_frame 371588 371588 0 0.0
.debug_info 27020981 27020982 1 0.0
.debug_line 3691677 3691677 0 0.0
.debug_loc 3616499 3616499 0 0.0
.debug_ranges 341008 341008 0 0.0
.debug_str 3444213 3444213 0 0.0
.heap 841968 841968 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 571950 571950 0 0.0
.symtab 421904 421904 0 0.0
.text 1548464 1548464 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842704 842704 0 0.0
(read/write) 1690748 1690748 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1227552 1227552 0 0.0
.debug_aranges 110216 110216 0 0.0
.debug_frame 374668 374668 0 0.0
.debug_info 26758664 26758664 0 0.0
.debug_line 3712661 3712661 0 0.0
.debug_loc 3604105 3604105 0 0.0
.debug_ranges 339624 339624 0 0.0
.debug_str 3433225 3433225 0 0.0
.heap 842704 842704 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 536039 536039 0 0.0
.symtab 408336 408336 0 0.0
.text 1491720 1491720 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850888 850888 0 0.0
(read/write) 1608924 1608924 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180000 180000 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1062079 1062079 0 0.0
.debug_aranges 102416 102416 0 0.0
.debug_frame 344980 344980 0 0.0
.debug_info 22227200 22227198 -2 -0.0
.debug_line 3281782 3281782 0 0.0
.debug_loc 3301540 3301540 0 0.0
.debug_ranges 304904 304904 0 0.0
.debug_str 3238811 3238811 0 0.0
.heap 850888 850888 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 472364 472364 0 0.0
.symtab 376704 376704 0 0.0
.text 1418080 1418080 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1642436 1642436 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1064054 1064054 0 0.0
.debug_aranges 102816 102816 0 0.0
.debug_frame 346832 346832 0 0.0
.debug_info 22446758 22446759 1 0.0
.debug_line 3276610 3276610 0 0.0
.debug_loc 3323117 3323117 0 0.0
.debug_ranges 306288 306288 0 0.0
.debug_str 3255068 3255068 0 0.0
.heap 845896 845896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 474151 474151 0 0.0
.symtab 378368 378368 0 0.0
.text 1446600 1446600 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1152208 1151048 -1160 -0.1
.bss 111116 97628 -13488 -12.1
.data 848 844 -4 -0.5
.text 599308 598144 -1164 -0.2
lock-app qpg6105+debug (read/write) 1117640 1116724 -916 -0.1
.bss 106564 93100 -13464 -12.6
.data 836 836 0 0.0
.text 564736 563820 -916 -0.2
telink all-clusters-app tlsr9518adk80d (read/write) 939068 939076 8 0.0
bss 81620 81620 0 0.0
noinit 43440 43440 0 0.0
text 650282 650286 4 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 877036 877036 0 0.0
bss 80844 80844 0 0.0
noinit 43440 43440 0 0.0
text 614240 614242 2 0.0
light-switch-app tlsr9518adk80d (read/write) 792000 792000 0 0.0
bss 72468 72468 0 0.0
noinit 43520 43520 0 0.0
text 555312 555310 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 876576 876576 0 0.0
bss 82232 82232 0 0.0
noinit 43520 43520 0 0.0
text 625626 625626 0 0.0
ota-requestor-app tlsr9518adk80d (read/write) 806468 806468 0 0.0
bss 74040 74040 0 0.0
noinit 43520 43520 0 0.0
text 566672 566672 0 0.0

@github-actions
Copy link

PR #23681: Size comparison from 4c6b72d to 3e4a5ef

Decreases (1 build for bl702)
platform target config section 4c6b72d 3e4a5ef change % change
bl702 lighting-app bl702+rpc (read/write) 1285539 1285523 -16 -0.0
.debug_info 43429604 43429603 -1 -0.0
.text 1031170 1031168 -2 -0.0
Full report (2 builds for bl702)
platform target config section 4c6b72d 3e4a5ef change % change
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1196999 1196999 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1524244 1524244 0 0.0
.debug_aranges 132384 132384 0 0.0
.debug_frame 485640 485640 0 0.0
.debug_info 39158235 39158235 0 0.0
.debug_line 5276300 5276300 0 0.0
.debug_loc 3373203 3373203 0 0.0
.debug_ranges 361240 361240 0 0.0
.debug_str 3474842 3474842 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116680 116680 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 568313 568313 0 0.0
.symtab 172032 172032 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 957190 957190 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1285539 1285523 -16 -0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1668414 1668414 0 0.0
.debug_aranges 140480 140480 0 0.0
.debug_frame 512976 512976 0 0.0
.debug_info 43429604 43429603 -1 -0.0
.debug_line 5673694 5673694 0 0.0
.debug_loc 3567814 3567814 0 0.0
.debug_ranges 384760 384760 0 0.0
.debug_str 3872439 3872439 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130424 130424 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 628463 628463 0 0.0
.symtab 190176 190176 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 1031170 1031168 -2 -0.0

@andy31415 andy31415 merged commit ba8cb33 into project-chip:master Nov 22, 2022
dvdm-qorvo pushed a commit to Qorvo/connectedhomeip that referenced this pull request Dec 21, 2022
* Applied SDP011-1231 and SDP011-1233 changes

* Changed std::function to plain pointer

* Fixed hardfault on OTA button

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
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.

4 participants