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

Update ZAP to version that generates min/max information. #12325

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

bzbarsky-apple
Copy link
Contributor

The XML updates are based on examining the all-clusters app codegen
and removing spurious min-max constraints that just restate the value
range of the type (e.g. setting max to 0xFFFF for an int16u). A few
attributes were made nullable in the process to remove an unnecessary
constraint like max="0xFFFE" when the spec says range is all but the
attribute is nullable.

Problem

min/max in XML are ignored in our codegen.

Change overview

Output min/max information in the generated endpoint_config.

Testing

Code inspection. yaml tests are forthcoming, in followup PRs.

The XML updates are based on examining the all-clusters app codegen
and removing spurious min-max constraints that just restate the value
range of the type (e.g. setting max to 0xFFFF for an int16u).  A few
attributes were made nullable in the process to remove an unnecessary
constraint like max="0xFFFE" when the spec says range is all but the
attribute is nullable.
@github-actions
Copy link

github-actions bot commented Nov 29, 2021

PR #12325: Size comparison from 2bd6bd6 to 16db7cd

Increases above 0.2%:

platform target config section 2bd6bd6 16db7cd change % change
efr32 lighting-app BRD4161A (read/write) 119836 123084 3248 2.7
.data 1820 5072 3252 178.7
BRD4161A+rpc (read/write) 138132 141388 3256 2.4
.data 1920 5172 3252 169.4
window-app BRD4161A (read/write) 117972 121164 3192 2.7
.data 1784 4972 3188 178.7
esp32 all-clusters-app c3devkit .dram0.data 14100 22548 8448 59.9
m5stack .dram0.data 34072 42520 8448 24.8
k32w lighting-app k32w061+se05x+release .data 1956 5208 3252 166.3
linux all-clusters-app debug .data 1170 13842 12672 1083.1
.init_array 576 584 8 1.4
.rodata 138965 139765 800 0.6
bridge-app debug+rpc .data 1680 5616 3936 234.3
.init_array 424 432 8 1.9
lighting-app debug+rpc .data 1362 6226 4864 357.1
.init_array 552 560 8 1.4
tv-app debug .data 1632 7904 6272 384.3
.init_array 640 648 8 1.2
mbed all-clusters-app CY8CPROTO_062_4343W+release .data 5240 13688 8448 161.2
lighting-app CY8CPROTO_062_4343W+release .data 5600 8848 3248 58.0
p6 all-clusters-app default .data 2544 10992 8448 332.1
qpg lighting-app qpg6100+debug .data 1024 4276 3252 317.6
Increases (20 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2bd6bd6 16db7cd change % change
efr32 lighting-app BRD4161A (read/write) 119836 123084 3248 2.7
.data 1820 5072 3252 178.7
BRD4161A+rpc (read/write) 138132 141388 3256 2.4
.data 1920 5172 3252 169.4
window-app BRD4161A (read/write) 117972 121164 3192 2.7
.data 1784 4972 3188 178.7
esp32 all-clusters-app c3devkit (read only) 836536 837796 1260 0.2
(read/write) 1224474 1225818 1344 0.1
.dram0.data 14100 22548 8448 59.9
.flash.text 836536 837796 1260 0.2
.iram0.text 61394 61426 32 0.1
m5stack (read only) 907919 908667 748 0.1
(read/write) 423692 424024 332 0.1
.dram0.data 34072 42520 8448 24.8
.flash.text 902535 903283 748 0.1
k32w lighting-app k32w061+se05x+release (read/write) 723320 723516 196 0.0
.data 1956 5208 3252 166.3
linux all-clusters-app debug (read only) 1775081 1778801 3720 0.2
(read/write) 131544 131552 8 0.0
.data 1170 13842 12672 1083.1
.init_array 576 584 8 1.4
.rodata 138965 139765 800 0.6
.text 1497746 1500642 2896 0.2
bridge-app debug+rpc (read only) 1349405 1350773 1368 0.1
(read/write) 77856 77864 8 0.0
.data 1680 5616 3936 234.3
.init_array 424 432 8 1.9
.rodata 113596 113756 160 0.1
.text 1135717 1136901 1184 0.1
chip-tool debug (read only) 6088437 6088533 96 0.0
.text 5406325 5406421 96 0.0
lighting-app debug+rpc (read only) 1629065 1630849 1784 0.1
.data 1362 6226 4864 357.1
.init_array 552 560 8 1.4
.rodata 131889 132113 224 0.2
.text 1359458 1360994 1536 0.1
tv-app debug (read only) 1921185 1922745 1560 0.1
(read/write) 319072 319080 8 0.0
.data 1632 7904 6272 384.3
.init_array 640 648 8 1.2
.rodata 160872 161032 160 0.1
.text 1611970 1613346 1376 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release .data 5240 13688 8448 161.2
lighting-app CY8CPROTO_062_4343W+release .data 5600 8848 3248 58.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875611 875819 208 0.0
text 590116 590268 152 0.0
nrf52840dk_nrf52840+rpc (read/write) 838187 838395 208 0.0
text 564432 564580 148 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800650 800842 192 0.0
text 519580 519728 148 0.0
pump-app nrf52840dk_nrf52840 (read/write) 852511 852615 104 0.0
text 572432 572520 88 0.0
p6 all-clusters-app default .data 2544 10992 8448 332.1
qpg lighting-app qpg6100+debug .data 1024 4276 3252 317.6
telink lighting-app tlsr9518adk80d (read/write) 777398 777606 208 0.0
text 540724 540884 160 0.0
Decreases (19 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg)
platform target config section 2bd6bd6 16db7cd change % change
efr32 lighting-app BRD4161A (read only) 762200 759192 -3008 -0.4
.text 762192 759184 -3008 -0.4
BRD4161A+rpc (read only) 790632 787624 -3008 -0.4
.text 790624 787616 -3008 -0.4
window-app BRD4161A (read only) 739208 736176 -3032 -0.4
.text 739200 736168 -3032 -0.4
esp32 all-clusters-app c3devkit .flash.rodata 165968 157840 -8128 -4.9
m5stack .flash.rodata 193804 185688 -8116 -4.2
k32w lighting-app k32w061+se05x+release .text 637272 634216 -3056 -0.5
shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.text 590128 590112 -16 -0.0
linux all-clusters-app debug .data.rel.ro 64928 52256 -12672 -19.5
bridge-app debug+rpc .data.rel.ro 29384 25448 -3936 -13.4
lighting-app debug+rpc (read/write) 111104 111080 -24 -0.0
.data.rel.ro 56976 52080 -4896 -8.6
tv-app debug .data.rel.ro 61480 55208 -6272 -10.2
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2294976 2287624 -7352 -0.3
.heap 849320 840872 -8448 -1.0
.text 1257576 1250224 -7352 -0.6
lighting-app CY8CPROTO_062_4343W+release (read/write) 2280256 2277184 -3072 -0.1
.heap 858352 855104 -3248 -0.4
.text 1242856 1239784 -3072 -0.2
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 97188 93988 -3200 -3.3
nrf52840dk_nrf52840+rpc rodata 88436 85236 -3200 -3.6
nrf5340dk_nrf5340_cpuapp rodata 92444 89244 -3200 -3.5
pump-app nrf52840dk_nrf52840 rodata 94680 91744 -2936 -3.1
p6 all-clusters-app default (read/write) 2311304 2303968 -7336 -0.3
.heap 916112 907664 -8448 -0.9
.text 1269568 1262232 -7336 -0.6
qpg lighting-app qpg6100+debug (read only) 503096 500040 -3056 -0.6
(read/write) 114144 114140 -4 -0.0
.text 497776 494720 -3056 -0.6
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2bd6bd6 16db7cd change % change
efr32 lighting-app BRD4161A (read only) 762200 759192 -3008 -0.4
(read/write) 119836 123084 3248 2.7
.bss 118012 118012 0 0.0
.data 1820 5072 3252 178.7
.text 762192 759184 -3008 -0.4
BRD4161A+rpc (read only) 790632 787624 -3008 -0.4
(read/write) 138132 141388 3256 2.4
.bss 136212 136212 0 0.0
.data 1920 5172 3252 169.4
.text 790624 787616 -3008 -0.4
lock-app BRD4161A (read only) 736144 736144 0 0.0
(read/write) 117540 117540 0 0.0
.bss 115764 115764 0 0.0
.data 1776 1776 0 0.0
.text 736136 736136 0 0.0
window-app BRD4161A (read only) 739208 736176 -3032 -0.4
(read/write) 117972 121164 3192 2.7
.bss 116188 116188 0 0.0
.data 1784 4972 3188 178.7
.text 739200 736168 -3032 -0.4
esp32 all-clusters-app c3devkit (read only) 836536 837796 1260 0.2
(read/write) 1224474 1225818 1344 0.1
.dram0.bss 59144 59144 0 0.0
.dram0.data 14100 22548 8448 59.9
.flash.rodata 165968 157840 -8128 -4.9
.flash.text 836536 837796 1260 0.2
.iram0.text 61394 61426 32 0.1
m5stack (read only) 907919 908667 748 0.1
(read/write) 423692 424024 332 0.1
.dram0.bss 64536 64536 0 0.0
.dram0.data 34072 42520 8448 24.8
.flash.rodata 193804 185688 -8116 -4.2
.flash.text 902535 903283 748 0.1
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723320 723516 196 0.0
.bss 78292 78292 0 0.0
.data 1956 5208 3252 166.3
.text 637272 634216 -3056 -0.5
lock-app k32w061+debug (read/write) 612392 612392 0 0.0
.bss 68740 68740 0 0.0
.data 1920 1920 0 0.0
.text 535932 535932 0 0.0
shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.bss 79892 79892 0 0.0
.data 1892 1892 0 0.0
.text 590128 590112 -16 -0.0
linux all-clusters-app debug (read only) 1775081 1778801 3720 0.2
(read/write) 131544 131552 8 0.0
.bss 60144 60144 0 0.0
.data 1170 13842 12672 1083.1
.data.rel.ro 64928 52256 -12672 -19.5
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 584 8 1.4
.rodata 138965 139765 800 0.6
.text 1497746 1500642 2896 0.2
bridge-app debug+rpc (read only) 1349405 1350773 1368 0.1
(read/write) 77856 77864 8 0.0
.bss 41744 41744 0 0.0
.data 1680 5616 3936 234.3
.data.rel.ro 29384 25448 -3936 -13.4
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 432 8 1.9
.rodata 113596 113756 160 0.1
.text 1135717 1136901 1184 0.1
chip-tool debug (read only) 6088437 6088533 96 0.0
(read/write) 198808 198808 0 0.0
.bss 40096 40096 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 152000 152000 0 0.0
.dynamic 592 592 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 496 496 0 0.0
.rodata 292840 292840 0 0.0
.text 5406325 5406421 96 0.0
lighting-app debug+rpc (read only) 1629065 1630849 1784 0.1
(read/write) 111104 111080 -24 -0.0
.bss 47440 47440 0 0.0
.data 1362 6226 4864 357.1
.data.rel.ro 56976 52080 -4896 -8.6
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 560 8 1.4
.rodata 131889 132113 224 0.2
.text 1359458 1360994 1536 0.1
ota-provider-app debug (read only) 1310401 1310401 0 0.0
(read/write) 76312 76312 0 0.0
.bss 44320 44320 0 0.0
.data 912 912 0 0.0
.data.rel.ro 25944 25944 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 464 0 0.0
.rodata 114896 114896 0 0.0
.text 1095154 1095154 0 0.0
ota-requestor-app debug (read only) 1406873 1406873 0 0.0
(read/write) 80144 80144 0 0.0
.bss 46752 46752 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27272 27272 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 126400 126400 0 0.0
.text 1177330 1177330 0 0.0
shell debug (read only) 820321 820321 0 0.0
(read/write) 66936 66936 0 0.0
.bss 23496 23496 0 0.0
.data 338 338 0 0.0
.data.rel.ro 38560 38560 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 360 360 0 0.0
.rodata 79023 79023 0 0.0
.text 634610 634610 0 0.0
tv-app debug (read only) 1921185 1922745 1560 0.1
(read/write) 319072 319080 8 0.0
.bss 250264 250264 0 0.0
.data 1632 7904 6272 384.3
.data.rel.ro 61480 55208 -6272 -10.2
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 640 648 8 1.2
.rodata 160872 161032 160 0.1
.text 1611970 1613346 1376 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294976 2287624 -7352 -0.3
.bss 181884 181884 0 0.0
.data 5240 13688 8448 161.2
.heap 849320 840872 -8448 -1.0
.text 1257576 1250224 -7352 -0.6
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2280256 2277184 -3072 -0.1
.bss 172492 172492 0 0.0
.data 5600 8848 3248 58.0
.heap 858352 855104 -3248 -0.4
.text 1242856 1239784 -3072 -0.2
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2253336 2253336 0 0.0
.bss 171308 171308 0 0.0
.data 5584 5584 0 0.0
.heap 859552 859552 0 0.0
.text 1215936 1215936 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2050936 2050936 0 0.0
.bss 156496 156496 0 0.0
.data 4984 4984 0 0.0
.heap 874968 874968 0 0.0
.text 1013536 1013536 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875611 875819 208 0.0
bss 112660 112660 0 0.0
rodata 97188 93988 -3200 -3.3
text 590116 590268 152 0.0
nrf52840dk_nrf52840+rpc (read/write) 838187 838395 208 0.0
bss 109012 109012 0 0.0
rodata 88436 85236 -3200 -3.6
text 564432 564580 148 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800650 800842 192 0.0
bss 114036 114036 0 0.0
rodata 92444 89244 -3200 -3.5
text 519580 519728 148 0.0
lock-app nrf52840dk_nrf52840 (read/write) 846539 846539 0 0.0
bss 109700 109700 0 0.0
rodata 92972 92972 0 0.0
text 568388 568388 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 771810 771810 0 0.0
bss 111108 111108 0 0.0
rodata 88260 88260 0 0.0
text 497940 497940 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 852511 852615 104 0.0
bss 109836 109836 0 0.0
rodata 94680 91744 -2936 -3.1
text 572432 572520 88 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 845619 845619 0 0.0
bss 109712 109712 0 0.0
rodata 92844 92844 0 0.0
text 567512 567512 0 0.0
shell nrf52840dk_nrf52840 (read/write) 778447 778447 0 0.0
bss 109180 109180 0 0.0
rodata 73084 73084 0 0.0
text 521576 521576 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693482 693482 0 0.0
bss 110164 110164 0 0.0
rodata 67724 67724 0 0.0
text 442184 442184 0 0.0
p6 all-clusters-app default (read/write) 2311304 2303968 -7336 -0.3
.bss 114688 114688 0 0.0
.data 2544 10992 8448 332.1
.heap 916112 907664 -8448 -0.9
.text 1269568 1262232 -7336 -0.6
lock-app default (read/write) 2223120 2223120 0 0.0
.bss 100976 100976 0 0.0
.data 2416 2416 0 0.0
.heap 929952 929952 0 0.0
.text 1181384 1181384 0 0.0
qpg lighting-app qpg6100+debug (read only) 503096 500040 -3056 -0.6
(read/write) 114144 114140 -4 -0.0
.bss 50400 50400 0 0.0
.data 1024 4276 3252 317.6
.text 497776 494720 -3056 -0.6
lock-app qpg6100+debug (read only) 475804 475804 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49272 49272 0 0.0
.data 980 980 0 0.0
.text 470484 470484 0 0.0
persistent-storage-app qpg6100+debug (read only) 105424 105424 0 0.0
(read/write) 114138 114138 0 0.0
.bss 12002 12002 0 0.0
.data 276 276 0 0.0
.text 100104 100104 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 777398 777606 208 0.0
bss 79236 79236 0 0.0
noinit 37160 37160 0 0.0
text 540724 540884 160 0.0

@vivien-apple
Copy link
Contributor

@bzbarsky-apple The .data section increase seems huge ?

@bzbarsky-apple
Copy link
Contributor Author

@bzbarsky-apple The .data section increase seems huge ?

Yep, I am working on fixing that right now. ;)

@github-actions
Copy link

PR #12325: Size comparison from 2bd6bd6 to 29b79a2

Increases (1 build for telink)
platform target config section 2bd6bd6 29b79a2 change % change
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
text 540724 540750 26 0.0
Full report (1 build for telink)
platform target config section 2bd6bd6 29b79a2 change % change
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
bss 79236 79236 0 0.0
noinit 37160 37160 0 0.0
text 540724 540750 26 0.0

@github-actions
Copy link

github-actions bot commented Nov 29, 2021

PR #12325: Size comparison from ef9c86c to c3ab4d9

Increases above 0.2%:

platform target config section ef9c86c c3ab4d9 change % change
linux all-clusters-app debug .rodata 139093 139893 800 0.6
Increases (12 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section ef9c86c c3ab4d9 change % change
efr32 lighting-app BRD4161A (read only) 762200 762280 80 0.0
.text 762192 762272 80 0.0
BRD4161A+rpc (read only) 790632 790712 80 0.0
.text 790624 790704 80 0.0
window-app BRD4161A (read only) 739208 739248 40 0.0
.text 739200 739240 40 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723316 723380 64 0.0
.text 637380 637444 64 0.0
linux all-clusters-app debug (read only) 1775209 1776881 1672 0.1
.rodata 139093 139893 800 0.6
.text 1497746 1497970 224 0.0
bridge-app debug+rpc (read only) 1349405 1350037 632 0.0
.rodata 113596 113756 160 0.1
.text 1135717 1136165 448 0.0
chip-tool debug (read only) 6090405 6090533 128 0.0
.rodata 292936 292968 32 0.0
.text 5408037 5408133 96 0.0
lighting-app debug+rpc (read only) 1629193 1629961 768 0.0
.rodata 132017 132241 224 0.2
.text 1359458 1359906 448 0.0
tv-app debug (read only) 1921345 1921993 648 0.0
.rodata 161032 161192 160 0.1
.text 1611970 1612434 464 0.0
p6 all-clusters-app default (read/write) 2311416 2311760 344 0.0
.text 1269680 1270024 344 0.0
qpg lighting-app qpg6100+debug (read only) 493652 493716 64 0.0
.text 488332 488396 64 0.0
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
text 540724 540750 26 0.0
Decreases (3 builds for k32w, linux, qpg)
platform target config section ef9c86c c3ab4d9 change % change
k32w shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.text 590240 590224 -16 -0.0
linux ota-provider-app debug (read only) 1310401 1310385 -16 -0.0
.text 1095154 1095138 -16 -0.0
qpg lock-app qpg6100+debug (read only) 466328 466312 -16 -0.0
.text 461008 460992 -16 -0.0
Full report (21 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section ef9c86c c3ab4d9 change % change
efr32 lighting-app BRD4161A (read only) 762200 762280 80 0.0
(read/write) 119836 119836 0 0.0
.bss 118012 118012 0 0.0
.data 1820 1820 0 0.0
.text 762192 762272 80 0.0
BRD4161A+rpc (read only) 790632 790712 80 0.0
(read/write) 138132 138132 0 0.0
.bss 136212 136212 0 0.0
.data 1920 1920 0 0.0
.text 790624 790704 80 0.0
lock-app BRD4161A (read only) 736144 736144 0 0.0
(read/write) 117540 117540 0 0.0
.bss 115764 115764 0 0.0
.data 1776 1776 0 0.0
.text 736136 736136 0 0.0
window-app BRD4161A (read only) 739208 739248 40 0.0
(read/write) 117972 117972 0 0.0
.bss 116188 116188 0 0.0
.data 1784 1784 0 0.0
.text 739200 739240 40 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723316 723380 64 0.0
.bss 78292 78292 0 0.0
.data 1844 1844 0 0.0
.text 637380 637444 64 0.0
lock-app k32w061+debug (read/write) 612388 612388 0 0.0
.bss 68740 68740 0 0.0
.data 1808 1808 0 0.0
.text 536040 536040 0 0.0
shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.bss 79892 79892 0 0.0
.data 1780 1780 0 0.0
.text 590240 590224 -16 -0.0
linux all-clusters-app debug (read only) 1775209 1776881 1672 0.1
(read/write) 131416 131416 0 0.0
.bss 60144 60144 0 0.0
.data 1040 1040 0 0.0
.data.rel.ro 64928 64928 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 576 0 0.0
.rodata 139093 139893 800 0.6
.text 1497746 1497970 224 0.0
bridge-app debug+rpc (read only) 1349405 1350037 632 0.0
(read/write) 77856 77856 0 0.0
.bss 41744 41744 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 29384 29384 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 113596 113756 160 0.1
.text 1135717 1136165 448 0.0
chip-tool debug (read only) 6090405 6090533 128 0.0
(read/write) 198744 198744 0 0.0
.bss 40096 40096 0 0.0
.data 1008 1008 0 0.0
.data.rel.ro 152048 152048 0 0.0
.dynamic 592 592 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 496 496 0 0.0
.rodata 292936 292968 32 0.0
.text 5408037 5408133 96 0.0
lighting-app debug+rpc (read only) 1629193 1629961 768 0.0
(read/write) 110976 110976 0 0.0
.bss 47440 47440 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 56976 56976 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 132017 132241 224 0.2
.text 1359458 1359906 448 0.0
ota-provider-app debug (read only) 1310401 1310385 -16 -0.0
(read/write) 76312 76312 0 0.0
.bss 44320 44320 0 0.0
.data 912 912 0 0.0
.data.rel.ro 25944 25944 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 464 0 0.0
.rodata 114896 114896 0 0.0
.text 1095154 1095138 -16 -0.0
ota-requestor-app debug (read only) 1406873 1406873 0 0.0
(read/write) 80144 80144 0 0.0
.bss 46752 46752 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27272 27272 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 126400 126400 0 0.0
.text 1177330 1177330 0 0.0
shell debug (read only) 820449 820449 0 0.0
(read/write) 66808 66808 0 0.0
.bss 23496 23496 0 0.0
.data 224 224 0 0.0
.data.rel.ro 38560 38560 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 360 360 0 0.0
.rodata 79154 79154 0 0.0
.text 634610 634610 0 0.0
tv-app debug (read only) 1921345 1921993 648 0.0
(read/write) 318944 318944 0 0.0
.bss 250264 250264 0 0.0
.data 1504 1504 0 0.0
.data.rel.ro 61480 61480 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 161032 161192 160 0.1
.text 1611970 1612434 464 0.0
p6 all-clusters-app default (read/write) 2311416 2311760 344 0.0
.bss 114688 114688 0 0.0
.data 2432 2432 0 0.0
.heap 916224 916224 0 0.0
.text 1269680 1270024 344 0.0
lock-app default (read/write) 2223232 2223232 0 0.0
.bss 100976 100976 0 0.0
.data 2304 2304 0 0.0
.heap 930064 930064 0 0.0
.text 1181496 1181496 0 0.0
qpg lighting-app qpg6100+debug (read only) 493652 493716 64 0.0
(read/write) 114144 114144 0 0.0
.bss 77464 77464 0 0.0
.data 920 920 0 0.0
.text 488332 488396 64 0.0
lock-app qpg6100+debug (read only) 466328 466312 -16 -0.0
(read/write) 114144 114144 0 0.0
.bss 76376 76376 0 0.0
.data 872 872 0 0.0
.text 461008 460992 -16 -0.0
persistent-storage-app qpg6100+debug (read only) 105612 105612 0 0.0
(read/write) 114138 114138 0 0.0
.bss 35218 35218 0 0.0
.data 276 276 0 0.0
.text 100292 100292 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
bss 79236 79236 0 0.0
noinit 37160 37160 0 0.0
text 540724 540750 26 0.0

…texpr.

This should ensure that it does not accidentally end up in .data
instead of .rodata.

The main fix here is adding the constexpr constructor for
EmberAfDefaultOrMinMaxAttributeValue that takes a
EmberAfAttributeMinMaxValue*, which lets us remove the non-constexpr
reinterpret_cast (coming from the C-style cast) to uint8_t* in
ZAP_MIN_MAX_DEFAULTS_INDEX.

The other fixes are just fixing long-standing const-correctness
issues; this allows us to remove the implicit const_cast from
ZAP_LONG_DEFAULTS_INDEX.
@github-actions
Copy link

github-actions bot commented Nov 29, 2021

PR #12325: Size comparison from 489de97 to 45566eb

Increases above 0.2%:

platform target config section 489de97 45566eb change % change
linux all-clusters-app debug .rodata 139093 139893 800 0.6
Increases (20 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 489de97 45566eb change % change
efr32 lighting-app BRD4161A (read only) 762200 762280 80 0.0
.text 762192 762272 80 0.0
BRD4161A+rpc (read only) 790648 790728 80 0.0
.text 790640 790720 80 0.0
window-app BRD4161A (read only) 739208 739248 40 0.0
.text 739200 739240 40 0.0
esp32 all-clusters-app c3devkit (read only) 836020 836046 26 0.0
(read/write) 1224474 1224794 320 0.0
.flash.rodata 166080 166400 320 0.2
.flash.text 836020 836046 26 0.0
m5stack (read only) 907959 907999 40 0.0
(read/write) 423692 424020 328 0.1
.flash.rodata 193916 194244 328 0.2
.flash.text 902575 902615 40 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723316 723380 64 0.0
.text 637380 637444 64 0.0
linux all-clusters-app debug (read only) 1775225 1776881 1656 0.1
.rodata 139093 139893 800 0.6
.text 1497762 1497970 208 0.0
bridge-app debug+rpc (read only) 1349405 1350053 648 0.0
.rodata 113596 113756 160 0.1
.text 1135717 1136181 464 0.0
chip-tool debug (read only) 6095509 6095621 112 0.0
.rodata 293096 293128 32 0.0
.text 5412981 5413061 80 0.0
lighting-app debug+rpc (read only) 1629209 1629977 768 0.0
.rodata 132017 132241 224 0.2
.text 1359474 1359922 448 0.0
tv-app debug (read only) 1921361 1922009 648 0.0
.rodata 161032 161192 160 0.1
.text 1611986 1612450 464 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2295088 2295416 328 0.0
.text 1257688 1258016 328 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2280368 2280416 48 0.0
.text 1242968 1243016 48 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875615 875679 64 0.0
rodata 97296 97344 48 0.0
text 590116 590140 24 0.0
nrf52840dk_nrf52840+rpc (read/write) 838191 838255 64 0.0
rodata 88544 88592 48 0.1
text 564432 564452 20 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800650 800714 64 0.0
rodata 92556 92604 48 0.1
text 519580 519600 20 0.0
pump-app nrf52840dk_nrf52840 (read/write) 852511 852551 40 0.0
rodata 94792 94816 24 0.0
text 572432 572452 20 0.0
p6 all-clusters-app default (read/write) 2311416 2311776 360 0.0
.text 1269680 1270040 360 0.0
qpg lighting-app qpg6100+debug (read only) 493652 493716 64 0.0
.text 488332 488396 64 0.0
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
text 540724 540750 26 0.0
Decreases (3 builds for k32w, linux, qpg)
platform target config section 489de97 45566eb change % change
k32w shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.text 590240 590224 -16 -0.0
linux ota-requestor-app debug (read only) 1406889 1406873 -16 -0.0
.text 1177346 1177330 -16 -0.0
qpg lock-app qpg6100+debug (read only) 466328 466312 -16 -0.0
.text 461008 460992 -16 -0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 489de97 45566eb change % change
efr32 lighting-app BRD4161A (read only) 762200 762280 80 0.0
(read/write) 119836 119836 0 0.0
.bss 118012 118012 0 0.0
.data 1820 1820 0 0.0
.text 762192 762272 80 0.0
BRD4161A+rpc (read only) 790648 790728 80 0.0
(read/write) 138132 138132 0 0.0
.bss 136212 136212 0 0.0
.data 1920 1920 0 0.0
.text 790640 790720 80 0.0
lock-app BRD4161A (read only) 736144 736144 0 0.0
(read/write) 117540 117540 0 0.0
.bss 115764 115764 0 0.0
.data 1776 1776 0 0.0
.text 736136 736136 0 0.0
window-app BRD4161A (read only) 739208 739248 40 0.0
(read/write) 117972 117972 0 0.0
.bss 116188 116188 0 0.0
.data 1784 1784 0 0.0
.text 739200 739240 40 0.0
esp32 all-clusters-app c3devkit (read only) 836020 836046 26 0.0
(read/write) 1224474 1224794 320 0.0
.dram0.bss 59144 59144 0 0.0
.dram0.data 13988 13988 0 0.0
.flash.rodata 166080 166400 320 0.2
.flash.text 836020 836046 26 0.0
.iram0.text 61390 61390 0 0.0
m5stack (read only) 907959 907999 40 0.0
(read/write) 423692 424020 328 0.1
.dram0.bss 64536 64536 0 0.0
.dram0.data 33960 33960 0 0.0
.flash.rodata 193916 194244 328 0.2
.flash.text 902575 902615 40 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723316 723380 64 0.0
.bss 78292 78292 0 0.0
.data 1844 1844 0 0.0
.text 637380 637444 64 0.0
lock-app k32w061+debug (read/write) 612388 612388 0 0.0
.bss 68740 68740 0 0.0
.data 1808 1808 0 0.0
.text 536040 536040 0 0.0
shell k32w061+debug (read/write) 677712 677696 -16 -0.0
.bss 79892 79892 0 0.0
.data 1780 1780 0 0.0
.text 590240 590224 -16 -0.0
linux all-clusters-app debug (read only) 1775225 1776881 1656 0.1
(read/write) 131416 131416 0 0.0
.bss 60144 60144 0 0.0
.data 1040 1040 0 0.0
.data.rel.ro 64928 64928 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 576 0 0.0
.rodata 139093 139893 800 0.6
.text 1497762 1497970 208 0.0
bridge-app debug+rpc (read only) 1349405 1350053 648 0.0
(read/write) 77856 77856 0 0.0
.bss 41744 41744 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 29384 29384 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 113596 113756 160 0.1
.text 1135717 1136181 464 0.0
chip-tool debug (read only) 6095509 6095621 112 0.0
(read/write) 198744 198744 0 0.0
.bss 40096 40096 0 0.0
.data 1008 1008 0 0.0
.data.rel.ro 152048 152048 0 0.0
.dynamic 592 592 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 496 496 0 0.0
.rodata 293096 293128 32 0.0
.text 5412981 5413061 80 0.0
lighting-app debug+rpc (read only) 1629209 1629977 768 0.0
(read/write) 110976 110976 0 0.0
.bss 47440 47440 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 56976 56976 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 132017 132241 224 0.2
.text 1359474 1359922 448 0.0
ota-provider-app debug (read only) 1310401 1310401 0 0.0
(read/write) 76312 76312 0 0.0
.bss 44320 44320 0 0.0
.data 912 912 0 0.0
.data.rel.ro 25944 25944 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 464 0 0.0
.rodata 114896 114896 0 0.0
.text 1095154 1095154 0 0.0
ota-requestor-app debug (read only) 1406889 1406873 -16 -0.0
(read/write) 80144 80144 0 0.0
.bss 46752 46752 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27272 27272 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 126400 126400 0 0.0
.text 1177346 1177330 -16 -0.0
shell debug (read only) 820449 820449 0 0.0
(read/write) 66808 66808 0 0.0
.bss 23496 23496 0 0.0
.data 224 224 0 0.0
.data.rel.ro 38560 38560 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 360 360 0 0.0
.rodata 79154 79154 0 0.0
.text 634610 634610 0 0.0
tv-app debug (read only) 1921361 1922009 648 0.0
(read/write) 318944 318944 0 0.0
.bss 250264 250264 0 0.0
.data 1504 1504 0 0.0
.data.rel.ro 61480 61480 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 161032 161192 160 0.1
.text 1611986 1612450 464 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2295088 2295416 328 0.0
.bss 181884 181884 0 0.0
.data 5128 5128 0 0.0
.heap 849432 849432 0 0.0
.text 1257688 1258016 328 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2280368 2280416 48 0.0
.bss 172492 172492 0 0.0
.data 5488 5488 0 0.0
.heap 858464 858464 0 0.0
.text 1242968 1243016 48 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2253448 2253448 0 0.0
.bss 171308 171308 0 0.0
.data 5472 5472 0 0.0
.heap 859664 859664 0 0.0
.text 1216048 1216048 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2051040 2051040 0 0.0
.bss 156496 156496 0 0.0
.data 4872 4872 0 0.0
.heap 875080 875080 0 0.0
.text 1013640 1013640 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875615 875679 64 0.0
bss 112660 112660 0 0.0
rodata 97296 97344 48 0.0
text 590116 590140 24 0.0
nrf52840dk_nrf52840+rpc (read/write) 838191 838255 64 0.0
bss 109012 109012 0 0.0
rodata 88544 88592 48 0.1
text 564432 564452 20 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800650 800714 64 0.0
bss 114036 114036 0 0.0
rodata 92556 92604 48 0.1
text 519580 519600 20 0.0
lock-app nrf52840dk_nrf52840 (read/write) 846539 846539 0 0.0
bss 109700 109700 0 0.0
rodata 93084 93084 0 0.0
text 568388 568388 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 771810 771810 0 0.0
bss 111108 111108 0 0.0
rodata 88372 88372 0 0.0
text 497940 497940 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 852511 852551 40 0.0
bss 109836 109836 0 0.0
rodata 94792 94816 24 0.0
text 572432 572452 20 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 845615 845615 0 0.0
bss 109712 109712 0 0.0
rodata 92952 92952 0 0.0
text 567512 567512 0 0.0
shell nrf52840dk_nrf52840 (read/write) 778451 778451 0 0.0
bss 109180 109180 0 0.0
rodata 73192 73192 0 0.0
text 521576 521576 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693482 693482 0 0.0
bss 110164 110164 0 0.0
rodata 67836 67836 0 0.0
text 442184 442184 0 0.0
p6 all-clusters-app default (read/write) 2311416 2311776 360 0.0
.bss 114688 114688 0 0.0
.data 2432 2432 0 0.0
.heap 916224 916224 0 0.0
.text 1269680 1270040 360 0.0
lock-app default (read/write) 2223232 2223232 0 0.0
.bss 100976 100976 0 0.0
.data 2304 2304 0 0.0
.heap 930064 930064 0 0.0
.text 1181496 1181496 0 0.0
qpg lighting-app qpg6100+debug (read only) 493652 493716 64 0.0
(read/write) 114144 114144 0 0.0
.bss 77464 77464 0 0.0
.data 920 920 0 0.0
.text 488332 488396 64 0.0
lock-app qpg6100+debug (read only) 466328 466312 -16 -0.0
(read/write) 114144 114144 0 0.0
.bss 76376 76376 0 0.0
.data 872 872 0 0.0
.text 461008 460992 -16 -0.0
persistent-storage-app qpg6100+debug (read only) 105612 105612 0 0.0
(read/write) 114138 114138 0 0.0
.bss 35218 35218 0 0.0
.data 276 276 0 0.0
.text 100292 100292 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 777398 777470 72 0.0
bss 79236 79236 0 0.0
noinit 37160 37160 0 0.0
text 540724 540750 26 0.0

@bzbarsky-apple
Copy link
Contributor Author

Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast tracking this, given this is adding functionality for tests.

@woody-apple woody-apple merged commit 2278e6b into project-chip:master Nov 30, 2021
@bzbarsky-apple bzbarsky-apple deleted the pull-min-max-bits branch November 30, 2021 06:51
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