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

Do not include endpoint config in types_stub.h #25128

Merged
merged 7 commits into from
Feb 17, 2023

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Feb 16, 2023

Including data types should not have a sideffect of including / depending on app-specific endpoint configuration.

This removes endpoint_config/gen_config from types_stub and starded adding direct includes where these seem needed (probably not exhausinve, relying on CI to test compilation for now).

Without this change, Accessors.h is not directly usable without depending on a codegen bit because of a dependency of Accessors.h -> af-types.h -> types_stub.h -> endpoint_config.h

af-types.h seemed to want some of gen/endpoint config flags (specifically to define structures depending on what clusters are selected), changed this like:
- removed some unused clusters
- moved scenese table entry to scenes.h

@github-actions
Copy link

PR #25128: Size comparison from 6a3bbe0 to 0013be0

Increases (1 build for cc32xx)
platform target config section 6a3bbe0 0013be0 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 931515 931540 25 0.0
Decreases (1 build for cc32xx)
platform target config section 6a3bbe0 0013be0 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20347053 20347052 -1 -0.0
.debug_line 2658245 2658237 -8 -0.0
Full report (1 build for cc32xx)
platform target config section 6a3bbe0 0013be0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 641857 641857 0 0.0
(read/write) 204124 204124 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197528 197528 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 931515 931540 25 0.0
.debug_aranges 87464 87464 0 0.0
.debug_frame 300232 300232 0 0.0
.debug_info 20347053 20347052 -1 -0.0
.debug_line 2658245 2658237 -8 -0.0
.debug_loc 2791387 2791387 0 0.0
.debug_ranges 281600 281600 0 0.0
.debug_str 3015122 3015122 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105697 105697 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 376514 376514 0 0.0
.symtab 256016 256016 0 0.0
.text 534036 534036 0 0.0

@github-actions github-actions bot added the tests label Feb 16, 2023
@github-actions
Copy link

PR #25128: Size comparison from 1fd5c53 to b473d37

Increases (3 builds for bl702, cc32xx)
platform target config section 1fd5c53 b473d37 change % change
bl702 lighting-app bl702 .debug_info 40645879 40645881 2 0.0
.debug_line 5282334 5282335 1 0.0
bl702+rpc .debug_info 45055033 45055035 2 0.0
.debug_line 5681330 5681331 1 0.0
.debug_loc 3611135 3611136 1 0.0
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330255 20330256 1 0.0
.debug_line 2658243 2658245 2 0.0
.debug_loc 2791404 2791419 15 0.0
Decreases (1 build for bl702)
platform target config section 1fd5c53 b473d37 change % change
bl702 lighting-app bl702 .debug_loc 3414273 3414272 -1 -0.0
Full report (10 builds for bl602, bl702, cc32xx, linux, mbed, qpg)
platform target config section 1fd5c53 b473d37 change % change
bl602 lighting-app bl602 (read/write) 1349102 1349102 0 0.0
.bss 94834 94834 0 0.0
.data 9736 9736 0 0.0
.text 1025366 1025366 0 0.0
bl602+rpc (read/write) 1394270 1394270 0 0.0
.bss 102882 102882 0 0.0
.data 10128 10128 0 0.0
.text 1056046 1056046 0 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1187451 1187451 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69937 69937 0 0.0
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1551468 1551468 0 0.0
.debug_aranges 134384 134384 0 0.0
.debug_frame 492440 492440 0 0.0
.debug_info 40645879 40645881 2 0.0
.debug_line 5282334 5282335 1 0.0
.debug_loc 3414273 3414272 -1 -0.0
.debug_ranges 372192 372192 0 0.0
.debug_str 3575307 3575307 0 0.0
.hbn 536 536 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 107552 107552 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 574057 574057 0 0.0
.symtab 173584 173584 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 954762 954762 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1280607 1280607 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77985 77985 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1699936 1699936 0 0.0
.debug_aranges 142616 142616 0 0.0
.debug_frame 520188 520188 0 0.0
.debug_info 45055033 45055035 2 0.0
.debug_line 5681330 5681331 1 0.0
.debug_loc 3611135 3611136 1 0.0
.debug_ranges 395960 395960 0 0.0
.debug_str 3978811 3978811 0 0.0
.hbn 536 536 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 122192 122192 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 635116 635116 0 0.0
.symtab 192048 192048 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1032158 1032158 0 0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 641857 641857 0 0.0
(read/write) 204124 204124 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197528 197528 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 930151 930151 0 0.0
.debug_aranges 87464 87464 0 0.0
.debug_frame 300232 300232 0 0.0
.debug_info 20330255 20330256 1 0.0
.debug_line 2658243 2658245 2 0.0
.debug_loc 2791404 2791419 15 0.0
.debug_ranges 281600 281600 0 0.0
.debug_str 3015052 3015052 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105697 105697 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 376514 376514 0 0.0
.symtab 256016 256016 0 0.0
.text 534036 534036 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12050772 12050772 0 0.0
(read/write) 729208 729208 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 671424 671424 0 0.0
.dynamic 560 560 0 0.0
.got 15328 15328 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 585300 585300 0 0.0
.text 9735204 9735204 0 0.0
thermostat-no-ble arm64 (read only) 2517204 2517204 0 0.0
(read/write) 145320 145320 0 0.0
.bss 56488 56488 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 77544 77544 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 151232 151232 0 0.0
.text 2103680 2103680 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467864 2467864 0 0.0
.bss 215924 215924 0 0.0
.data 5880 5880 0 0.0
.text 1430508 1430508 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1150468 1150468 0 0.0
.bss 99932 99932 0 0.0
.data 848 848 0 0.0
.text 597568 597568 0 0.0
lock-app qpg6105+debug (read/write) 1117820 1117820 0 0.0
.bss 96428 96428 0 0.0
.data 860 860 0 0.0
.text 564916 564916 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

I am 99% sure color-control-server needs to include config.h as well... We really need that lint that checks for the defines from gen_config.h in files and make sure those files include config.h

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

Actually, I guess color-control-server is in this PR; I just missed it.

Approving, but we really do need the lint, as a followup.

@github-actions
Copy link

PR #25128: Size comparison from 1fd5c53 to 2e73fb5

Increases above 0.2%:

platform target config section 1fd5c53 2e73fb5 change % change
bl702 lighting-app bl702 .debug_abbrev 1551468 1556479 5011 0.3
bl702+rpc .debug_abbrev 1699936 1704707 4771 0.3
Increases (5 builds for bl602, bl702, mbed)
platform target config section 1fd5c53 2e73fb5 change % change
bl602 lighting-app bl602 (read/write) 1349102 1349138 36 0.0
.text 1025366 1025418 52 0.0
bl602+rpc (read/write) 1394270 1394554 284 0.0
.text 1056046 1056350 304 0.0
bl702 lighting-app bl702 (read/write) 1187451 1187683 232 0.0
.data 4056 4064 8 0.2
.debug_abbrev 1551468 1556479 5011 0.3
.debug_aranges 134384 134448 64 0.0
.debug_frame 492440 492760 320 0.1
.debug_info 40645879 40693352 47473 0.1
.debug_line 5282334 5286172 3838 0.1
.debug_loc 3414273 3417924 3651 0.1
.rodata 107552 107568 16 0.0
.symtab 173584 173616 32 0.0
.text 954762 954994 232 0.0
bl702+rpc (read/write) 1280607 1280863 256 0.0
.debug_abbrev 1699936 1704707 4771 0.3
.debug_aranges 142616 142680 64 0.0
.debug_frame 520188 520508 320 0.1
.debug_info 45055033 45103972 48939 0.1
.debug_line 5681330 5685176 3846 0.1
.debug_loc 3611135 3614755 3620 0.1
.rodata 122192 122208 16 0.0
.symtab 192048 192080 32 0.0
.text 1032158 1032448 290 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2467864 2468792 928 0.0
.text 1430508 1431436 928 0.1
Decreases (5 builds for bl602, bl702, mbed)
platform target config section 1fd5c53 2e73fb5 change % change
bl602 lighting-app bl602 .bss 94834 94786 -48 -0.1
bl602+rpc .bss 102882 102834 -48 -0.0
bl702 lighting-app bl702 .bss 69937 69889 -48 -0.1
.debug_ranges 372192 372136 -56 -0.0
.debug_str 3575307 3574968 -339 -0.0
.strtab 574057 573945 -112 -0.0
bl702+rpc .bss 77985 77937 -48 -0.1
.debug_ranges 395960 395904 -56 -0.0
.debug_str 3978811 3978477 -334 -0.0
.strtab 635116 635004 -112 -0.0
mbed lock-app CY8CPROTO_062_4343W+release .bss 215924 215900 -24 -0.0
Full report (5 builds for bl602, bl702, mbed)
platform target config section 1fd5c53 2e73fb5 change % change
bl602 lighting-app bl602 (read/write) 1349102 1349138 36 0.0
.bss 94834 94786 -48 -0.1
.data 9736 9736 0 0.0
.text 1025366 1025418 52 0.0
bl602+rpc (read/write) 1394270 1394554 284 0.0
.bss 102882 102834 -48 -0.0
.data 10128 10128 0 0.0
.text 1056046 1056350 304 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1187451 1187683 232 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69937 69889 -48 -0.1
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4056 4064 8 0.2
.debug_abbrev 1551468 1556479 5011 0.3
.debug_aranges 134384 134448 64 0.0
.debug_frame 492440 492760 320 0.1
.debug_info 40645879 40693352 47473 0.1
.debug_line 5282334 5286172 3838 0.1
.debug_loc 3414273 3417924 3651 0.1
.debug_ranges 372192 372136 -56 -0.0
.debug_str 3575307 3574968 -339 -0.0
.hbn 536 536 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 107552 107568 16 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 574057 573945 -112 -0.0
.symtab 173584 173616 32 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 954762 954994 232 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1280607 1280863 256 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77985 77937 -48 -0.1
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1699936 1704707 4771 0.3
.debug_aranges 142616 142680 64 0.0
.debug_frame 520188 520508 320 0.1
.debug_info 45055033 45103972 48939 0.1
.debug_line 5681330 5685176 3846 0.1
.debug_loc 3611135 3614755 3620 0.1
.debug_ranges 395960 395904 -56 -0.0
.debug_str 3978811 3978477 -334 -0.0
.hbn 536 536 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 122192 122208 16 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 635116 635004 -112 -0.0
.symtab 192048 192080 32 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1032158 1032448 290 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467864 2468792 928 0.0
.bss 215924 215900 -24 -0.0
.data 5880 5880 0 0.0
.text 1430508 1431436 928 0.1

@andy31415 andy31415 merged commit d684ecc into project-chip:master Feb 17, 2023
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
* Remove endpoint config from types. Add it to binding tables as they are directly referenced there

* Mass addition of gen_config header whenever endpoint count was being fetched

* Undo all changes except type_stubs. This is to create a tool that auto-adds headers

* Added app/util/config.h whenever gen_config or endpoint_config bits seemed to be used

* Restyle

* Remove duplicate include based on code review
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.

3 participants