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

Make all public FabricInfo getters const #20088

Merged

Conversation

tcarmelveilleux
Copy link
Contributor

Problem

  • Only FabricTable APIs are allowed to mutate FabricInfo entries
    due to the requirements of fail-safe shadow data handling
  • Previous PRs made sure none of the mutators were used outside
    of FabricTable, but FindFabricByIndex remained a non-const
    getter due to how much code was using it.

Fixes #19929

Change overview

  • Renames the mutable FabricInfo * getter as GetMutableFabricByIndex()
    and makes it private to FabricTable.
  • Adds const qualifier to every other usage of FindFabricByIndex in the SDK.

Testing

  • All unit tests pass
  • Cert tests still pass
  • Still compiles

- Only FabricTable APIs are allowed to mutate FabricInfo entries
  due to the requirements of fail-safe shadow data handling
- Previous PRs made sure none of the mutators were used outside
  of FabricTable, but `FindFabricByIndex` remained a non-const
  getter due to how much code was using it.

Fixes project-chip#19929

This PR:

- Renames the mutable `FabricInfo *` getter as `GetMutableFabricByIndex()`
  and makes it private to FabricTable.
- Adds `const` qualifier to every other usage of FindFabricByIndex in the SDK.

Testing done:

- All unit tests pass
- Cert tests still pass
- Still compiles
@github-actions
Copy link

github-actions bot commented Jun 29, 2022

PR #20088: Size comparison from 5d24721 to 8a20fa4

Increases (4 builds for cc13x2_26x2, cyw30739)
platform target config section 5d24721 8a20fa4 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read/write) 198516 198524 8 0.0
lock-ftd LP_CC2652R7 (read only) 667559 667567 8 0.0
.text 590896 590904 8 0.0
pump-app LP_CC2652R7 (read/write) 166936 166944 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 580254 580262 8 0.0
.app_xip_area 457256 457264 8 0.0
Decreases (9 builds for cc13x2_26x2, k32w, nrfconnect, telink)
platform target config section 5d24721 8a20fa4 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 653779 653771 -8 -0.0
.text 561892 561884 -8 -0.0
lock-ftd LP_CC2652R7 (read/write) 175584 175576 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 616991 616983 -8 -0.0
.text 540432 540424 -8 -0.0
pump-app LP_CC2652R7 (read only) 677055 677047 -8 -0.0
.text 588148 588140 -8 -0.0
k32w light k32w061+release (read/write) 659600 659584 -16 -0.0
.text 580516 580500 -16 -0.0
lock k32w061+release (read/write) 686076 686060 -16 -0.0
.text 606516 606500 -16 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 809632 809628 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1155427 1155411 -16 -0.0
text 799332 799328 -4 -0.0
telink lighting-app tlsr9518adk80d (read/write) 817756 817748 -8 -0.0
text 580996 580992 -4 -0.0
Full report (39 builds for cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 5d24721 8a20fa4 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 665019 665019 0 0.0
(read/write) 187980 187980 0 0.0
.bss 75892 75892 0 0.0
.data 3356 3356 0 0.0
.rodata 88091 88091 0 0.0
.text 576612 576612 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 653779 653771 -8 -0.0
(read/write) 198516 198524 8 0.0
.bss 75188 75188 0 0.0
.data 3356 3356 0 0.0
.rodata 91571 91571 0 0.0
.text 561892 561884 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 667559 667567 8 0.0
(read/write) 175584 175576 -8 -0.0
.bss 72924 72924 0 0.0
.data 3280 3280 0 0.0
.rodata 76183 76183 0 0.0
.text 590896 590904 8 0.0
lock-mtd LP_CC2652R7 (read only) 616991 616983 -8 -0.0
(read/write) 146040 146040 0 0.0
.bss 68644 68644 0 0.0
.data 3280 3280 0 0.0
.rodata 76071 76071 0 0.0
.text 540432 540424 -8 -0.0
pump-app LP_CC2652R7 (read only) 677055 677047 -8 -0.0
(read/write) 166936 166944 8 0.0
.bss 73004 73004 0 0.0
.data 3280 3280 0 0.0
.rodata 88423 88423 0 0.0
.text 588148 588140 -8 -0.0
pump-controller-app LP_CC2652R7 (read only) 662863 662863 0 0.0
(read/write) 181248 181248 0 0.0
.bss 73124 73124 0 0.0
.data 3276 3276 0 0.0
.rodata 84263 84263 0 0.0
.text 578120 578120 0 0.0
shell LP_CC2652R7 (read only) 657454 657454 0 0.0
(read/write) 191048 191048 0 0.0
.bss 78196 78196 0 0.0
.data 3360 3360 0 0.0
.rodata 84830 84830 0 0.0
.text 572308 572308 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 580254 580262 8 0.0
.app_xip_area 457256 457264 8 0.0
.bss 65960 65960 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 581838 581838 0 0.0
.app_xip_area 458648 458648 0 0.0
.bss 66152 66152 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 583326 583326 0 0.0
.app_xip_area 461176 461176 0 0.0
.bss 65168 65168 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1081356 1081356 0 0.0
.bss 134772 134772 0 0.0
.data 2048 2048 0 0.0
.text 944516 944516 0 0.0
BRD4161A+rpc (read/write) 1135596 1135596 0 0.0
.bss 151452 151452 0 0.0
.data 2260 2260 0 0.0
.text 981864 981864 0 0.0
BRD4161A+rs911x (read/write) 943812 943812 0 0.0
.bss 140488 140488 0 0.0
.data 2048 2048 0 0.0
.text 801256 801256 0 0.0
lock-app BRD4161A+wf200 (read/write) 1121112 1121112 0 0.0
.bss 140920 140920 0 0.0
.data 2060 2060 0 0.0
.text 978112 978112 0 0.0
window-app BRD4161A (read/write) 1066636 1066636 0 0.0
.bss 134852 134852 0 0.0
.data 2076 2076 0 0.0
.text 929684 929684 0 0.0
k32w light k32w061+release (read/write) 659600 659584 -16 -0.0
.bss 71292 71292 0 0.0
.data 1992 1992 0 0.0
.text 580516 580500 -16 -0.0
lock k32w061+release (read/write) 686076 686060 -16 -0.0
.bss 71756 71756 0 0.0
.data 2004 2004 0 0.0
.text 606516 606500 -16 -0.0
linux all-clusters-app debug (read only) 2952953 2952953 0 0.0
(read/write) 155320 155320 0 0.0
.bss 62144 62144 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84936 84936 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 263133 263133 0 0.0
.text 2512754 2512754 0 0.0
all-clusters-minimal-app debug (read only) 2807049 2807049 0 0.0
(read/write) 147256 147256 0 0.0
.bss 61472 61472 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77576 77576 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 264797 264797 0 0.0
.text 2367362 2367362 0 0.0
bridge-app debug+rpc (read only) 2310481 2310481 0 0.0
(read/write) 126080 126080 0 0.0
.bss 49536 49536 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 66952 66952 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 197696 197696 0 0.0
.text 1951170 1951170 0 0.0
chip-tool debug (read only) 10175973 10175973 0 0.0
(read/write) 610824 610824 0 0.0
.bss 24384 24384 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 579056 579056 0 0.0
.dynamic 624 624 0 0.0
.got 5016 5016 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509285 509285 0 0.0
.text 8257957 8257957 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9907764 9907764 0 0.0
(read/write) 675633 675633 0 0.0
.bss 42609 42609 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 614616 614616 0 0.0
.dynamic 528 528 0 0.0
.got 13440 13440 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472548 472548 0 0.0
.text 7895636 7895636 0 0.0
lighting-app debug+rpc (read only) 2546313 2546313 0 0.0
(read/write) 130104 130104 0 0.0
.bss 50048 50048 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72088 72088 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 213448 213448 0 0.0
.text 2162658 2162658 0 0.0
lock-app debug (read only) 2508233 2508233 0 0.0
(read/write) 125080 125080 0 0.0
.bss 48448 48448 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69064 69064 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 228200 228200 0 0.0
.text 2115010 2115010 0 0.0
ota-provider-app debug (read only) 2317369 2317369 0 0.0
(read/write) 118888 118888 0 0.0
.bss 48096 48096 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63064 63064 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 203288 203288 0 0.0
.text 1951426 1951426 0 0.0
ota-requestor-app debug (read only) 2434521 2434521 0 0.0
(read/write) 125792 125792 0 0.0
.bss 50464 50464 0 0.0
.data 2232 2232 0 0.0
.data.rel.ro 67240 67240 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 207328 207328 0 0.0
.text 2056162 2056162 0 0.0
shell debug (read only) 2542681 2542681 0 0.0
(read/write) 141640 141640 0 0.0
.bss 58056 58056 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76672 76672 0 0.0
.dynamic 608 608 0 0.0
.got 4096 4096 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 227218 227218 0 0.0
.text 2159170 2159170 0 0.0
thermostat-no-ble arm64 (read only) 2590372 2590372 0 0.0
(read/write) 158865 158865 0 0.0
.bss 65857 65857 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83208 83208 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165236 165236 0 0.0
.text 2185456 2185456 0 0.0
tv-app debug (read only) 3095921 3095921 0 0.0
(read/write) 256424 256424 0 0.0
.bss 165832 165832 0 0.0
.data 4848 4848 0 0.0
.data.rel.ro 79312 79312 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 248832 248832 0 0.0
.text 2659330 2659330 0 0.0
tv-casting-app debug (read only) 5554081 5554081 0 0.0
(read/write) 162288 162288 0 0.0
.bss 50856 50856 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 102776 102776 0 0.0
.dynamic 608 608 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 343113 343113 0 0.0
.text 4934162 4934162 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2446528 2446528 0 0.0
.bss 215716 215716 0 0.0
.data 5872 5872 0 0.0
.text 1409172 1409172 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1174559 1174559 0 0.0
bss 144660 144660 0 0.0
rodata 141344 141344 0 0.0
text 809632 809628 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1155427 1155411 -16 -0.0
bss 143896 143896 0 0.0
rodata 133276 133276 0 0.0
text 799332 799328 -4 -0.0
p6 all-clusters-app default (read/write) 2562192 2562192 0 0.0
.bss 150896 150896 0 0.0
.data 2776 2776 0 0.0
.text 1520456 1520456 0 0.0
all-clusters-minimal-app default (read/write) 2508056 2508056 0 0.0
.bss 150176 150176 0 0.0
.data 2776 2776 0 0.0
.text 1466320 1466320 0 0.0
light-app default (read/write) 2438560 2438560 0 0.0
.bss 142232 142232 0 0.0
.data 2592 2592 0 0.0
.text 1396824 1396824 0 0.0
lock-app default (read/write) 2464864 2464864 0 0.0
.bss 142080 142080 0 0.0
.data 2600 2600 0 0.0
.text 1423128 1423128 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 797888 797888 0 0.0
bss 72336 72336 0 0.0
noinit 40416 40416 0 0.0
text 564634 564634 0 0.0
lighting-app tlsr9518adk80d (read/write) 817756 817748 -8 -0.0
bss 73180 73180 0 0.0
noinit 40416 40416 0 0.0
text 580996 580992 -4 -0.0

@github-actions
Copy link

github-actions bot commented Jun 29, 2022

PR #20088: Size comparison from 81c7f2a to f24edd7

Increases (2 builds for cc13x2_26x2)
platform target config section 81c7f2a f24edd7 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read/write) 198588 198596 8 0.0
pump-app LP_CC2652R7 (read/write) 167024 167032 8 0.0
Decreases (7 builds for cc13x2_26x2, nrfconnect, telink)
platform target config section 81c7f2a f24edd7 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 653707 653699 -8 -0.0
.text 561828 561820 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 616903 616895 -8 -0.0
.text 540352 540344 -8 -0.0
pump-app LP_CC2652R7 (read only) 676967 676959 -8 -0.0
.text 588068 588060 -8 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1174459 1174443 -16 -0.0
text 809524 809520 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 text 799228 799224 -4 -0.0
telink light-switch-app tlsr9518adk80d text 564512 564506 -6 -0.0
lighting-app tlsr9518adk80d text 580872 580868 -4 -0.0
Full report (39 builds for cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 81c7f2a f24edd7 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 664931 664931 0 0.0
(read/write) 188068 188068 0 0.0
.bss 75892 75892 0 0.0
.data 3356 3356 0 0.0
.rodata 88083 88083 0 0.0
.text 576532 576532 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 653707 653699 -8 -0.0
(read/write) 198588 198596 8 0.0
.bss 75188 75188 0 0.0
.data 3356 3356 0 0.0
.rodata 91563 91563 0 0.0
.text 561828 561820 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 667487 667487 0 0.0
(read/write) 175656 175656 0 0.0
.bss 72924 72924 0 0.0
.data 3280 3280 0 0.0
.rodata 76183 76183 0 0.0
.text 590824 590824 0 0.0
lock-mtd LP_CC2652R7 (read only) 616903 616895 -8 -0.0
(read/write) 146040 146040 0 0.0
.bss 68644 68644 0 0.0
.data 3280 3280 0 0.0
.rodata 76063 76063 0 0.0
.text 540352 540344 -8 -0.0
pump-app LP_CC2652R7 (read only) 676967 676959 -8 -0.0
(read/write) 167024 167032 8 0.0
.bss 73004 73004 0 0.0
.data 3280 3280 0 0.0
.rodata 88415 88415 0 0.0
.text 588068 588060 -8 -0.0
pump-controller-app LP_CC2652R7 (read only) 662783 662783 0 0.0
(read/write) 181328 181328 0 0.0
.bss 73124 73124 0 0.0
.data 3276 3276 0 0.0
.rodata 84263 84263 0 0.0
.text 578040 578040 0 0.0
shell LP_CC2652R7 (read only) 657374 657374 0 0.0
(read/write) 191128 191128 0 0.0
.bss 78196 78196 0 0.0
.data 3360 3360 0 0.0
.rodata 84830 84830 0 0.0
.text 572228 572228 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 580174 580174 0 0.0
.app_xip_area 457176 457176 0 0.0
.bss 65960 65960 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 581734 581734 0 0.0
.app_xip_area 458544 458544 0 0.0
.bss 66152 66152 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 583230 583230 0 0.0
.app_xip_area 461080 461080 0 0.0
.bss 65168 65168 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1081420 1081420 0 0.0
.bss 134772 134772 0 0.0
.data 2048 2048 0 0.0
.text 944580 944580 0 0.0
BRD4161A+rpc (read/write) 1135684 1135684 0 0.0
.bss 151452 151452 0 0.0
.data 2260 2260 0 0.0
.text 981952 981952 0 0.0
BRD4161A+rs911x (read/write) 943884 943884 0 0.0
.bss 140488 140488 0 0.0
.data 2048 2048 0 0.0
.text 801328 801328 0 0.0
lock-app BRD4161A+wf200 (read/write) 1121048 1121048 0 0.0
.bss 140920 140920 0 0.0
.data 2060 2060 0 0.0
.text 978048 978048 0 0.0
window-app BRD4161A (read/write) 1066700 1066700 0 0.0
.bss 134852 134852 0 0.0
.data 2076 2076 0 0.0
.text 929748 929748 0 0.0
k32w light k32w061+release (read/write) 659520 659520 0 0.0
.bss 71292 71292 0 0.0
.data 1992 1992 0 0.0
.text 580436 580436 0 0.0
lock k32w061+release (read/write) 685988 685988 0 0.0
.bss 71756 71756 0 0.0
.data 2004 2004 0 0.0
.text 606428 606428 0 0.0
linux all-clusters-app debug (read only) 2952673 2952673 0 0.0
(read/write) 155288 155288 0 0.0
.bss 62144 62144 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84904 84904 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 263133 263133 0 0.0
.text 2512546 2512546 0 0.0
all-clusters-minimal-app debug (read only) 2806769 2806769 0 0.0
(read/write) 147224 147224 0 0.0
.bss 61472 61472 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77544 77544 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 264797 264797 0 0.0
.text 2367154 2367154 0 0.0
bridge-app debug+rpc (read only) 2310201 2310201 0 0.0
(read/write) 126048 126048 0 0.0
.bss 49536 49536 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 66920 66920 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 197696 197696 0 0.0
.text 1950962 1950962 0 0.0
chip-tool debug (read only) 10175741 10175741 0 0.0
(read/write) 610792 610792 0 0.0
.bss 24384 24384 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 579024 579024 0 0.0
.dynamic 624 624 0 0.0
.got 5016 5016 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509285 509285 0 0.0
.text 8257797 8257797 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9907444 9907444 0 0.0
(read/write) 675601 675601 0 0.0
.bss 42609 42609 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 614592 614592 0 0.0
.dynamic 528 528 0 0.0
.got 13440 13440 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472548 472548 0 0.0
.text 7895396 7895396 0 0.0
lighting-app debug+rpc (read only) 2546033 2546033 0 0.0
(read/write) 130072 130072 0 0.0
.bss 50048 50048 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72056 72056 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 213448 213448 0 0.0
.text 2162450 2162450 0 0.0
lock-app debug (read only) 2507953 2507953 0 0.0
(read/write) 125048 125048 0 0.0
.bss 48448 48448 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69032 69032 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 228200 228200 0 0.0
.text 2114802 2114802 0 0.0
ota-provider-app debug (read only) 2317089 2317089 0 0.0
(read/write) 118856 118856 0 0.0
.bss 48096 48096 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63032 63032 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 203288 203288 0 0.0
.text 1951218 1951218 0 0.0
ota-requestor-app debug (read only) 2434241 2434241 0 0.0
(read/write) 125760 125760 0 0.0
.bss 50464 50464 0 0.0
.data 2232 2232 0 0.0
.data.rel.ro 67224 67224 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 207328 207328 0 0.0
.text 2055954 2055954 0 0.0
shell debug (read only) 2542401 2542401 0 0.0
(read/write) 141608 141608 0 0.0
.bss 58056 58056 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76640 76640 0 0.0
.dynamic 608 608 0 0.0
.got 4096 4096 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 227218 227218 0 0.0
.text 2158962 2158962 0 0.0
thermostat-no-ble arm64 (read only) 2589940 2589940 0 0.0
(read/write) 158833 158833 0 0.0
.bss 65857 65857 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83184 83184 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165236 165236 0 0.0
.text 2185104 2185104 0 0.0
tv-app debug (read only) 3095641 3095641 0 0.0
(read/write) 256424 256424 0 0.0
.bss 165832 165832 0 0.0
.data 4848 4848 0 0.0
.data.rel.ro 79312 79312 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 248832 248832 0 0.0
.text 2659122 2659122 0 0.0
tv-casting-app debug (read only) 5553801 5553801 0 0.0
(read/write) 162256 162256 0 0.0
.bss 50856 50856 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 102744 102744 0 0.0
.dynamic 608 608 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 343113 343113 0 0.0
.text 4933954 4933954 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2446592 2446592 0 0.0
.bss 215716 215716 0 0.0
.data 5872 5872 0 0.0
.text 1409236 1409236 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1174459 1174443 -16 -0.0
bss 144660 144660 0 0.0
rodata 141340 141340 0 0.0
text 809524 809520 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1155311 1155311 0 0.0
bss 143896 143896 0 0.0
rodata 133272 133272 0 0.0
text 799228 799224 -4 -0.0
p6 all-clusters-app default (read/write) 2562256 2562256 0 0.0
.bss 150896 150896 0 0.0
.data 2776 2776 0 0.0
.text 1520520 1520520 0 0.0
all-clusters-minimal-app default (read/write) 2508136 2508136 0 0.0
.bss 150176 150176 0 0.0
.data 2776 2776 0 0.0
.text 1466400 1466400 0 0.0
light-app default (read/write) 2438648 2438648 0 0.0
.bss 142232 142232 0 0.0
.data 2592 2592 0 0.0
.text 1396912 1396912 0 0.0
lock-app default (read/write) 2464928 2464928 0 0.0
.bss 142080 142080 0 0.0
.data 2600 2600 0 0.0
.text 1423192 1423192 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 797756 797756 0 0.0
bss 72336 72336 0 0.0
noinit 40416 40416 0 0.0
text 564512 564506 -6 -0.0
lighting-app tlsr9518adk80d (read/write) 817624 817624 0 0.0
bss 73180 73180 0 0.0
noinit 40416 40416 0 0.0
text 580872 580868 -4 -0.0

@github-actions
Copy link

github-actions bot commented Jun 29, 2022

PR #20088: Size comparison from 81c7f2a to 002d7e5

Increases (4 builds for cc13x2_26x2, linux)
platform target config section 81c7f2a 002d7e5 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read/write) 198588 198596 8 0.0
pump-app LP_CC2652R7 (read/write) 167024 167032 8 0.0
linux chip-tool debug .rodata 509285 509317 32 0.0
lighting-app debug+rpc (read only) 2546033 2546105 72 0.0
.rodata 213448 213576 128 0.1
.text 2162450 2162754 304 0.0
Decreases (13 builds for cc13x2_26x2, cyw30739, esp32, linux, nrfconnect, telink)
platform target config section 81c7f2a 002d7e5 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 653707 653699 -8 -0.0
.text 561828 561820 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 616903 616895 -8 -0.0
.text 540352 540344 -8 -0.0
pump-app LP_CC2652R7 (read only) 676967 676959 -8 -0.0
.text 588068 588060 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 580174 580166 -8 -0.0
.app_xip_area 457176 457168 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1018218 1018212 -6 -0.0
.flash.text 1018218 1018212 -6 -0.0
m5stack (read only) 1072315 1072291 -24 -0.0
.flash.text 1066931 1066907 -24 -0.0
linux chip-tool debug (read only) 10175741 10159629 -16112 -0.2
(read/write) 610792 606984 -3808 -0.6
.data.rel.ro 579024 575216 -3808 -0.7
.text 8257797 8250581 -7216 -0.1
chip-tool-no-interactive-ipv6only arm64 (read only) 9907444 9891076 -16368 -0.2
(read/write) 675601 671761 -3840 -0.6
.data.rel.ro 614592 610784 -3808 -0.6
.got 13440 13408 -32 -0.2
.text 7895396 7888052 -7344 -0.1
lighting-app debug+rpc (read/write) 130072 130040 -32 -0.0
.got 4424 4392 -32 -0.7
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1174459 1174443 -16 -0.0
text 809524 809520 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 text 799228 799224 -4 -0.0
telink light-switch-app tlsr9518adk80d text 564512 564508 -4 -0.0
lighting-app tlsr9518adk80d text 580872 580866 -6 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 81c7f2a 002d7e5 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 664931 664931 0 0.0
(read/write) 188068 188068 0 0.0
.bss 75892 75892 0 0.0
.data 3356 3356 0 0.0
.rodata 88083 88083 0 0.0
.text 576532 576532 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 653707 653699 -8 -0.0
(read/write) 198588 198596 8 0.0
.bss 75188 75188 0 0.0
.data 3356 3356 0 0.0
.rodata 91563 91563 0 0.0
.text 561828 561820 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 667487 667487 0 0.0
(read/write) 175656 175656 0 0.0
.bss 72924 72924 0 0.0
.data 3280 3280 0 0.0
.rodata 76183 76183 0 0.0
.text 590824 590824 0 0.0
lock-mtd LP_CC2652R7 (read only) 616903 616895 -8 -0.0
(read/write) 146040 146040 0 0.0
.bss 68644 68644 0 0.0
.data 3280 3280 0 0.0
.rodata 76063 76063 0 0.0
.text 540352 540344 -8 -0.0
pump-app LP_CC2652R7 (read only) 676967 676959 -8 -0.0
(read/write) 167024 167032 8 0.0
.bss 73004 73004 0 0.0
.data 3280 3280 0 0.0
.rodata 88415 88415 0 0.0
.text 588068 588060 -8 -0.0
pump-controller-app LP_CC2652R7 (read only) 662783 662783 0 0.0
(read/write) 181328 181328 0 0.0
.bss 73124 73124 0 0.0
.data 3276 3276 0 0.0
.rodata 84263 84263 0 0.0
.text 578040 578040 0 0.0
shell LP_CC2652R7 (read only) 657374 657374 0 0.0
(read/write) 191128 191128 0 0.0
.bss 78196 78196 0 0.0
.data 3360 3360 0 0.0
.rodata 84830 84830 0 0.0
.text 572228 572228 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 580174 580166 -8 -0.0
.app_xip_area 457176 457168 -8 -0.0
.bss 65960 65960 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 581734 581734 0 0.0
.app_xip_area 458544 458544 0 0.0
.bss 66152 66152 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 583230 583230 0 0.0
.app_xip_area 461080 461080 0 0.0
.bss 65168 65168 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1081420 1081420 0 0.0
.bss 134772 134772 0 0.0
.data 2048 2048 0 0.0
.text 944580 944580 0 0.0
BRD4161A+rpc (read/write) 1135684 1135684 0 0.0
.bss 151452 151452 0 0.0
.data 2260 2260 0 0.0
.text 981952 981952 0 0.0
BRD4161A+rs911x (read/write) 943884 943884 0 0.0
.bss 140488 140488 0 0.0
.data 2048 2048 0 0.0
.text 801328 801328 0 0.0
lock-app BRD4161A+wf200 (read/write) 1121048 1121048 0 0.0
.bss 140920 140920 0 0.0
.data 2060 2060 0 0.0
.text 978048 978048 0 0.0
window-app BRD4161A (read/write) 1066700 1066700 0 0.0
.bss 134852 134852 0 0.0
.data 2076 2076 0 0.0
.text 929748 929748 0 0.0
esp32 all-clusters-app c3devkit (read only) 1018218 1018212 -6 -0.0
(read/write) 1486650 1486650 0 0.0
.dram0.bss 71856 71856 0 0.0
.dram0.data 14592 14592 0 0.0
.flash.rodata 214776 214776 0 0.0
.flash.text 1018218 1018212 -6 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1072315 1072291 -24 -0.0
(read/write) 488752 488752 0 0.0
.dram0.bss 77376 77376 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 245236 245236 0 0.0
.flash.text 1066931 1066907 -24 -0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 659520 659520 0 0.0
.bss 71292 71292 0 0.0
.data 1992 1992 0 0.0
.text 580436 580436 0 0.0
lock k32w061+release (read/write) 685988 685988 0 0.0
.bss 71756 71756 0 0.0
.data 2004 2004 0 0.0
.text 606428 606428 0 0.0
linux all-clusters-app debug (read only) 2952673 2952673 0 0.0
(read/write) 155288 155288 0 0.0
.bss 62144 62144 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84904 84904 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 263133 263133 0 0.0
.text 2512546 2512546 0 0.0
all-clusters-minimal-app debug (read only) 2806769 2806769 0 0.0
(read/write) 147224 147224 0 0.0
.bss 61472 61472 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77544 77544 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 264797 264797 0 0.0
.text 2367154 2367154 0 0.0
bridge-app debug+rpc (read only) 2310201 2310201 0 0.0
(read/write) 126048 126048 0 0.0
.bss 49536 49536 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 66920 66920 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 197696 197696 0 0.0
.text 1950962 1950962 0 0.0
chip-tool debug (read only) 10175741 10159629 -16112 -0.2
(read/write) 610792 606984 -3808 -0.6
.bss 24384 24384 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 579024 575216 -3808 -0.7
.dynamic 624 624 0 0.0
.got 5016 5016 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509285 509317 32 0.0
.text 8257797 8250581 -7216 -0.1
chip-tool-no-interactive-ipv6only arm64 (read only) 9907444 9891076 -16368 -0.2
(read/write) 675601 671761 -3840 -0.6
.bss 42609 42609 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 614592 610784 -3808 -0.6
.dynamic 528 528 0 0.0
.got 13440 13408 -32 -0.2
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472548 472548 0 0.0
.text 7895396 7888052 -7344 -0.1
lighting-app debug+rpc (read only) 2546033 2546105 72 0.0
(read/write) 130072 130040 -32 -0.0
.bss 50048 50048 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72056 72056 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4392 -32 -0.7
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 213448 213576 128 0.1
.text 2162450 2162754 304 0.0
lock-app debug (read only) 2507953 2507953 0 0.0
(read/write) 125048 125048 0 0.0
.bss 48448 48448 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69032 69032 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 228200 228200 0 0.0
.text 2114802 2114802 0 0.0
ota-provider-app debug (read only) 2317089 2317089 0 0.0
(read/write) 118856 118856 0 0.0
.bss 48096 48096 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63032 63032 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 203288 203288 0 0.0
.text 1951218 1951218 0 0.0
ota-requestor-app debug (read only) 2434241 2434241 0 0.0
(read/write) 125760 125760 0 0.0
.bss 50464 50464 0 0.0
.data 2232 2232 0 0.0
.data.rel.ro 67224 67224 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 207328 207328 0 0.0
.text 2055954 2055954 0 0.0
shell debug (read only) 2542401 2542401 0 0.0
(read/write) 141608 141608 0 0.0
.bss 58056 58056 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76640 76640 0 0.0
.dynamic 608 608 0 0.0
.got 4096 4096 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 227218 227218 0 0.0
.text 2158962 2158962 0 0.0
thermostat-no-ble arm64 (read only) 2589940 2589940 0 0.0
(read/write) 158833 158833 0 0.0
.bss 65857 65857 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83184 83184 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165236 165236 0 0.0
.text 2185104 2185104 0 0.0
tv-app debug (read only) 3095641 3095641 0 0.0
(read/write) 256424 256424 0 0.0
.bss 165832 165832 0 0.0
.data 4848 4848 0 0.0
.data.rel.ro 79312 79312 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 248832 248832 0 0.0
.text 2659122 2659122 0 0.0
tv-casting-app debug (read only) 5553801 5553801 0 0.0
(read/write) 162256 162256 0 0.0
.bss 50856 50856 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 102744 102744 0 0.0
.dynamic 608 608 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 343113 343113 0 0.0
.text 4933954 4933954 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2446592 2446592 0 0.0
.bss 215716 215716 0 0.0
.data 5872 5872 0 0.0
.text 1409236 1409236 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1174459 1174443 -16 -0.0
bss 144660 144660 0 0.0
rodata 141340 141340 0 0.0
text 809524 809520 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1155311 1155311 0 0.0
bss 143896 143896 0 0.0
rodata 133272 133272 0 0.0
text 799228 799224 -4 -0.0
p6 all-clusters-app default (read/write) 2562256 2562256 0 0.0
.bss 150896 150896 0 0.0
.data 2776 2776 0 0.0
.text 1520520 1520520 0 0.0
all-clusters-minimal-app default (read/write) 2508136 2508136 0 0.0
.bss 150176 150176 0 0.0
.data 2776 2776 0 0.0
.text 1466400 1466400 0 0.0
light-app default (read/write) 2438648 2438648 0 0.0
.bss 142232 142232 0 0.0
.data 2592 2592 0 0.0
.text 1396912 1396912 0 0.0
lock-app default (read/write) 2464928 2464928 0 0.0
.bss 142080 142080 0 0.0
.data 2600 2600 0 0.0
.text 1423192 1423192 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 797756 797756 0 0.0
bss 72336 72336 0 0.0
noinit 40416 40416 0 0.0
text 564512 564508 -4 -0.0
lighting-app tlsr9518adk80d (read/write) 817624 817624 0 0.0
bss 73180 73180 0 0.0
noinit 40416 40416 0 0.0
text 580872 580866 -6 -0.0

@tcarmelveilleux tcarmelveilleux merged commit f03b9ae into project-chip:master Jun 29, 2022
woody-apple pushed a commit to woody-apple/connectedhomeip that referenced this pull request Jun 29, 2022
* Make all public FabricInfo getters const

- Only FabricTable APIs are allowed to mutate FabricInfo entries
  due to the requirements of fail-safe shadow data handling
- Previous PRs made sure none of the mutators were used outside
  of FabricTable, but `FindFabricByIndex` remained a non-const
  getter due to how much code was using it.

Fixes project-chip#19929

This PR:

- Renames the mutable `FabricInfo *` getter as `GetMutableFabricByIndex()`
  and makes it private to FabricTable.
- Adds `const` qualifier to every other usage of FindFabricByIndex in the SDK.

Testing done:

- All unit tests pass
- Cert tests still pass
- Still compiles

* Fix CI on Shell

* Fix one const in ESP32 ShellCommands.h
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.

Make FindFabricByIndex const to avoid unexpected/invalid mutations of FabricTable
6 participants