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

Stop generating attribute accessors for AttributeAccessInterface-only attributes. #26279

Conversation

bzbarsky-apple
Copy link
Contributor

Those accessors can't work correctly and are just a bug waiting to happen if someone tries to use them.

Blocked on project-chip/zap#1008 for actually passing the ZAP codegen.

@github-actions
Copy link

PR #26279: Size comparison from c1108d7 to e62787c

Decreases (1 build for cc32xx)
platform target config section c1108d7 e62787c change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 103416 100984 -2432 -2.4
.debug_frame 349704 340584 -9120 -2.6
.debug_info 19489250 19413106 -76144 -0.4
.debug_line 2678035 2651951 -26084 -1.0
.debug_loclists 1501882 1469977 -31905 -2.1
.debug_rnglists 96008 94047 -1961 -2.0
.debug_str 3024877 2993772 -31105 -1.0
Full report (1 build for cc32xx)
platform target config section c1108d7 e62787c change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601114 0 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 100984 -2432 -2.4
.debug_frame 349704 340584 -9120 -2.6
.debug_info 19489250 19413106 -76144 -0.4
.debug_line 2678035 2651951 -26084 -1.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1469977 -31905 -2.1
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 94047 -1961 -2.0
.debug_str 3024877 2993772 -31105 -1.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494824 0 0.0

@github-actions
Copy link

PR #26279: Size comparison from e4d000d to d10436f

Increases (2 builds for bl602, bl702)
platform target config section e4d000d d10436f change % change
bl602 lighting-app bl602+rpc .text 1064572 1064574 2 0.0
bl702 lighting-app bl702+rpc .text 1034940 1034942 2 0.0
Decreases (3 builds for bl702, cc32xx)
platform target config section e4d000d d10436f change % change
bl702 lighting-app bl702 .debug_aranges 134848 132416 -2432 -1.8
.debug_frame 495892 486324 -9568 -1.9
.debug_info 40792870 40724589 -68281 -0.2
.debug_line 5317307 5279662 -37645 -0.7
.debug_loc 3452901 3404532 -48369 -1.4
.debug_ranges 377408 373800 -3608 -1.0
.debug_str 3634516 3603762 -30754 -0.8
bl702+rpc .debug_aranges 143072 140640 -2432 -1.7
.debug_frame 523772 514204 -9568 -1.8
.debug_info 45286330 45218046 -68284 -0.2
.debug_line 5724599 5686958 -37641 -0.7
.debug_loc 3653491 3605120 -48371 -1.3
.debug_ranges 402400 398792 -3608 -0.9
.debug_str 4058927 4028173 -30754 -0.8
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 103664 101232 -2432 -2.3
.debug_frame 350552 341432 -9120 -2.6
.debug_info 19521971 19445828 -76143 -0.4
.debug_line 2682751 2656665 -26086 -1.0
.debug_loclists 1506147 1474223 -31924 -2.1
.debug_rnglists 96278 94317 -1961 -2.0
.debug_str 3059490 3028385 -31105 -1.0
Full report (23 builds for bl602, bl702, cc13x2_26x2, cc32xx, k32w, linux, mbed, nrfconnect, qpg)
platform target config section e4d000d d10436f change % change
bl602 lighting-app bl602 (read/write) 1352438 1352438 0 0.0
.bss 87886 87886 0 0.0
.data 9648 9648 0 0.0
.text 1033476 1033476 0 0.0
bl602+rpc (read/write) 1398450 1398450 0 0.0
.bss 95934 95934 0 0.0
.data 10040 10040 0 0.0
.text 1064572 1064574 2 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1182831 1182831 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67601 67601 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1549638 1549638 0 0.0
.debug_aranges 134848 132416 -2432 -1.8
.debug_frame 495892 486324 -9568 -1.9
.debug_info 40792870 40724589 -68281 -0.2
.debug_line 5317307 5279662 -37645 -0.7
.debug_loc 3452901 3404532 -48369 -1.4
.debug_ranges 377408 373800 -3608 -1.0
.debug_str 3634516 3603762 -30754 -0.8
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106192 106192 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 576706 576706 0 0.0
.symtab 174752 174752 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 962636 962636 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1270291 1270291 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75633 75633 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1700384 1700384 0 0.0
.debug_aranges 143072 140640 -2432 -1.7
.debug_frame 523772 514204 -9568 -1.8
.debug_info 45286330 45218046 -68284 -0.2
.debug_line 5724599 5686958 -37641 -0.7
.debug_loc 3653491 3605120 -48371 -1.3
.debug_ranges 402400 398792 -3608 -0.9
.debug_str 4058927 4028173 -30754 -0.8
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 120032 120032 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 637250 637250 0 0.0
.symtab 193040 193040 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1034940 1034942 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678031 678031 0 0.0
(read/write) 158660 158660 0 0.0
.bss 81232 81232 0 0.0
.data 3316 3316 0 0.0
.rodata 86855 86855 0 0.0
.text 590852 590852 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642207 642207 0 0.0
(read/write) 157860 157860 0 0.0
.bss 80432 80432 0 0.0
.data 3316 3316 0 0.0
.rodata 76663 76663 0 0.0
.text 565224 565224 0 0.0
lock-ftd LP_CC2652R7 (read only) 677391 677391 0 0.0
(read/write) 156152 156152 0 0.0
.bss 78760 78760 0 0.0
.data 3280 3280 0 0.0
.rodata 75535 75535 0 0.0
.text 601368 601368 0 0.0
lock-mtd LP_CC2652R7 (read only) 664939 664939 0 0.0
(read/write) 151320 151320 0 0.0
.bss 73928 73928 0 0.0
.data 3280 3280 0 0.0
.rodata 102363 102363 0 0.0
.text 562088 562088 0 0.0
pump-app LP_CC2652R7 (read only) 690451 690451 0 0.0
(read/write) 156596 156596 0 0.0
.bss 78728 78728 0 0.0
.data 3244 3244 0 0.0
.rodata 89651 89651 0 0.0
.text 600312 600312 0 0.0
pump-controller-app LP_CC2652R7 (read only) 675907 675907 0 0.0
(read/write) 157012 157012 0 0.0
.bss 78864 78864 0 0.0
.data 3268 3268 0 0.0
.rodata 85427 85427 0 0.0
.text 589992 589992 0 0.0
shell LP_CC2652R7 (read only) 671246 671246 0 0.0
(read/write) 160732 160732 0 0.0
.bss 83320 83320 0 0.0
.data 3300 3300 0 0.0
.rodata 85150 85150 0 0.0
.text 585776 585776 0 0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956984 0 0.0
.debug_aranges 103664 101232 -2432 -2.3
.debug_frame 350552 341432 -9120 -2.6
.debug_info 19521971 19445828 -76143 -0.4
.debug_line 2682751 2656665 -26086 -1.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1474223 -31924 -2.1
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 94317 -1961 -2.0
.debug_str 3059490 3028385 -31105 -1.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496340 0 0.0
k32w contact k32w0+release (read only) 581172 581172 0 0.0
(read/write) 82712 82712 0 0.0
.bss 65896 65896 0 0.0
.data 2192 2192 0 0.0
.text 580636 580636 0 0.0
light k32w0+release (read only) 580308 580308 0 0.0
(read/write) 82356 82356 0 0.0
.bss 65552 65552 0 0.0
.data 2180 2180 0 0.0
.text 579772 579772 0 0.0
lock k32w0+release (read only) 553748 553748 0 0.0
(read/write) 80360 80360 0 0.0
.bss 63632 63632 0 0.0
.data 2104 2104 0 0.0
.text 553212 553212 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12172316 12172316 0 0.0
(read/write) 745192 745192 0 0.0
.bss 34392 34392 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 687016 687016 0 0.0
.dynamic 560 560 0 0.0
.got 15584 15584 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 567904 567904 0 0.0
.text 9835812 9835812 0 0.0
thermostat-no-ble arm64 (read only) 2512300 2512300 0 0.0
(read/write) 145704 145704 0 0.0
.bss 56360 56360 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 78064 78064 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 129424 129424 0 0.0
.text 2118896 2118896 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2494568 2494568 0 0.0
.bss 216296 216296 0 0.0
.data 5144 5144 0 0.0
.text 1457252 1457252 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1175616 1175616 0 0.0
bss 155593 155593 0 0.0
rodata 132864 132864 0 0.0
text 806424 806424 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1120852 1120852 0 0.0
bss 154749 154749 0 0.0
rodata 109684 109684 0 0.0
text 775816 775816 0 0.0
all-clusters-app nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1435216 1435216 0 0.0
bss 135333 135333 0 0.0
rodata 228880 228880 0 0.0
text 776960 776960 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1165864 1165864 0 0.0
.bss 99640 99640 0 0.0
.data 856 856 0 0.0
.text 612964 612964 0 0.0
lock-app qpg6105+debug (read/write) 1135224 1135224 0 0.0
.bss 94792 94792 0 0.0
.data 852 852 0 0.0
.text 582320 582320 0 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the no-generating-useless-accessors branch from d10436f to f91587e Compare April 28, 2023 03:14
@github-actions
Copy link

PR #26279: Size comparison from e4d000d to f91587e

Decreases (1 build for cc32xx)
platform target config section e4d000d f91587e change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 103664 101232 -2432 -2.3
.debug_frame 350552 341432 -9120 -2.6
.debug_info 19521971 19445827 -76144 -0.4
.debug_line 2682751 2656665 -26086 -1.0
.debug_loclists 1506147 1474223 -31924 -2.1
.debug_rnglists 96278 94317 -1961 -2.0
.debug_str 3059490 3028385 -31105 -1.0
Full report (1 build for cc32xx)
platform target config section e4d000d f91587e change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956984 0 0.0
.debug_aranges 103664 101232 -2432 -2.3
.debug_frame 350552 341432 -9120 -2.6
.debug_info 19521971 19445827 -76144 -0.4
.debug_line 2682751 2656665 -26086 -1.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1474223 -31924 -2.1
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 94317 -1961 -2.0
.debug_str 3059490 3028385 -31105 -1.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496340 0 0.0

… attributes.

Those accessors can't work correctly and are just a bug waiting to happen if
someone tries to use them.

The code in the Infineon examples that did ManufacturingDate::Set was not really
doing anything useful, since the attribute value is read from
GetDeviceInstanceInfoProvider()->GetManufacturingDate() in the Basic Information
cluster implementation anyway, ignoring the attribute store.
@bzbarsky-apple bzbarsky-apple force-pushed the no-generating-useless-accessors branch from f91587e to 3036e76 Compare April 29, 2023 16:34
@github-actions
Copy link

PR #26279: Size comparison from 309e9f1 to 3036e76

Increases (1 build for bl602)
platform target config section 309e9f1 3036e76 change % change
bl602 lighting-app bl602+rpc (read/write) 1398850 1398858 8 0.0
.text 1064976 1064978 2 0.0
Decreases (2 builds for bl702)
platform target config section 309e9f1 3036e76 change % change
bl702 lighting-app bl702 (read/write) 1182975 1182959 -16 -0.0
.debug_aranges 134848 132416 -2432 -1.8
.debug_frame 495892 486324 -9568 -1.9
.debug_info 40803569 40735286 -68283 -0.2
.debug_line 5320569 5282924 -37645 -0.7
.debug_loc 3455865 3407495 -48370 -1.4
.debug_ranges 377408 373800 -3608 -1.0
.debug_str 3634551 3603797 -30754 -0.8
.text 962772 962768 -4 -0.0
bl702+rpc .debug_aranges 143072 140640 -2432 -1.7
.debug_frame 523772 514204 -9568 -1.8
.debug_info 45297032 45228747 -68285 -0.2
.debug_line 5727873 5690232 -37641 -0.7
.debug_loc 3656412 3608042 -48370 -1.3
.debug_ranges 402400 398792 -3608 -0.9
.debug_str 4058962 4028208 -30754 -0.8
Full report (9 builds for bl602, bl702, k32w, linux)
platform target config section 309e9f1 3036e76 change % change
bl602 lighting-app bl602 (read/write) 1352582 1352582 0 0.0
.bss 87886 87886 0 0.0
.data 9648 9648 0 0.0
.text 1033624 1033624 0 0.0
bl602+rpc (read/write) 1398850 1398858 8 0.0
.bss 95934 95934 0 0.0
.data 10040 10040 0 0.0
.text 1064976 1064978 2 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1182975 1182959 -16 -0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67601 67601 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1549676 1549676 0 0.0
.debug_aranges 134848 132416 -2432 -1.8
.debug_frame 495892 486324 -9568 -1.9
.debug_info 40803569 40735286 -68283 -0.2
.debug_line 5320569 5282924 -37645 -0.7
.debug_loc 3455865 3407495 -48370 -1.4
.debug_ranges 377408 373800 -3608 -1.0
.debug_str 3634551 3603797 -30754 -0.8
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106192 106192 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 576706 576706 0 0.0
.symtab 174752 174752 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 962772 962768 -4 -0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1270435 1270435 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75633 75633 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1700398 1700398 0 0.0
.debug_aranges 143072 140640 -2432 -1.7
.debug_frame 523772 514204 -9568 -1.8
.debug_info 45297032 45228747 -68285 -0.2
.debug_line 5727873 5690232 -37641 -0.7
.debug_loc 3656412 3608042 -48370 -1.3
.debug_ranges 402400 398792 -3608 -0.9
.debug_str 4058962 4028208 -30754 -0.8
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 120032 120032 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 637250 637250 0 0.0
.symtab 193040 193040 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1035074 1035074 0 0.0
k32w contact k32w0+release (read only) 581412 581412 0 0.0
(read/write) 82712 82712 0 0.0
.bss 65896 65896 0 0.0
.data 2192 2192 0 0.0
.text 580876 580876 0 0.0
light k32w0+release (read only) 580484 580484 0 0.0
(read/write) 82356 82356 0 0.0
.bss 65552 65552 0 0.0
.data 2180 2180 0 0.0
.text 579948 579948 0 0.0
lock k32w0+release (read only) 554020 554020 0 0.0
(read/write) 80360 80360 0 0.0
.bss 63632 63632 0 0.0
.data 2104 2104 0 0.0
.text 553484 553484 0 0.0
linux chip-tool-ipv6only arm64 (read only) 1217222 1217222 0 0.0
(read/write) 745192 745192 0 0.0
.bss 34392 34392 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 687016 687016 0 0.0
.dynamic 560 560 0 0.0
.got 15584 15584 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 567936 567936 0 0.0
.text 9835684 9835684 0 0.0
thermostat-no-ble arm64 (read only) 2513292 2513292 0 0.0
(read/write) 145704 145704 0 0.0
.bss 56360 56360 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 78064 78064 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 129456 129456 0 0.0
.text 2119856 2119856 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 246188c into project-chip:master May 2, 2023
@bzbarsky-apple bzbarsky-apple deleted the no-generating-useless-accessors branch May 2, 2023 14:47
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