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

Split CHIPClusters.cpp to speed up compilation. #11091

Merged
merged 4 commits into from
Oct 28, 2021

Conversation

mrjerryjohns
Copy link
Contributor

@mrjerryjohns mrjerryjohns commented Oct 27, 2021

This splits up CHIPClusters.cpp into a couple of different files:

  • CHIPClusters.cpp contains no template specialized methods.
  • CHIPClustersInvoke.cpp contains all template specialized methods for invoking commands.
  • CHIPClustersWrite.cpp contains all template specialized methods for doing writes.

This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when
doing an incremental compilation of chip-tool after touching CHIPClusters*.cpp.

It does this by better leveraging -jX builds to parallelize compilation.

More importantly, this might also provide a pattern for others (like
Android) that is running into OOM issues with clang compiling
CHIPClusters.cpp.

@mrjerryjohns mrjerryjohns changed the title Split CHIPClusters.cpp Split CHIPClusters.cpp to speed up compilation. Oct 27, 2021
@github-actions
Copy link

github-actions bot commented Oct 27, 2021

PR #11091: Size comparison from 4b6486f to d3e2f1e

Full report (27 builds for efr32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4b6486f d3e2f1e change % change
efr32 lighting-app BRD4161A (read only) 736916 736916 0 0.0
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 736908 736908 0 0.0
BRD4161A+rpc (read only) 724344 724344 0 0.0
(read/write) 132036 132036 0 0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724336 724336 0 0.0
lock-app BRD4161A (read only) 716212 716212 0 0.0
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716204 716204 0 0.0
window-app BRD4161A (read only) 717116 717116 0 0.0
(read/write) 113568 113568 0 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717108 717108 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700852 700852 0 0.0
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614464 614464 0 0.0
lock-app k32w061+debug (read/write) 592808 592808 0 0.0
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 515972 515972 0 0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290480 2290480 0 0.0
.bss 180620 180620 0 0.0
.data 5192 5192 0 0.0
.heap 850632 850632 0 0.0
.text 1253080 1253080 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274816 2274816 0 0.0
.bss 172820 172820 0 0.0
.data 5568 5568 0 0.0
.heap 858056 858056 0 0.0
.text 1237416 1237416 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252536 2252536 0 0.0
.bss 171724 171724 0 0.0
.data 5552 5552 0 0.0
.heap 859168 859168 0 0.0
.text 1215136 1215136 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) 2048984 2048984 0 0.0
.bss 156208 156208 0 0.0
.data 4968 4968 0 0.0
.heap 875272 875272 0 0.0
.text 1011584 1011584 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862739 862739 0 0.0
bss 112132 112132 0 0.0
rodata 97484 97484 0 0.0
text 577496 577496 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 823579 823579 0 0.0
bss 108372 108372 0 0.0
rodata 88260 88260 0 0.0
text 550688 550688 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787730 787730 0 0.0
bss 113504 113504 0 0.0
rodata 92724 92724 0 0.0
text 506964 506964 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839411 839411 0 0.0
bss 111168 111168 0 0.0
rodata 93836 93836 0 0.0
text 558980 558980 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764710 764710 0 0.0
bss 112576 112576 0 0.0
rodata 89144 89144 0 0.0
text 488540 488540 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497339 497339 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844115 844115 0 0.0
bss 111304 111304 0 0.0
rodata 95084 95084 0 0.0
text 562188 562188 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839387 839387 0 0.0
bss 111200 111200 0 0.0
rodata 93860 93860 0 0.0
text 558820 558820 0 0.0
shell nrf52840dk_nrf52840 (read/write) 776435 776435 0 0.0
bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520232 520232 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691490 0 0.0
bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440844 440844 0 0.0
p6 lock-app default (read/write) 2169056 2169056 0 0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127320 1127320 0 0.0
qpg lighting-app qpg6100+debug (read only) 491060 491060 0 0.0
(read/write) 114144 114144 0 0.0
.bss 52400 52400 0 0.0
.data 1000 1000 0 0.0
.text 485740 485740 0 0.0
lock-app qpg6100+debug (read only) 467400 467400 0 0.0
(read/write) 114140 114140 0 0.0
.bss 51352 51352 0 0.0
.data 956 956 0 0.0
.text 462080 462080 0 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155244 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149924 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 664350 664350 0 0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 457966 457966 0 0.0

@github-actions
Copy link

github-actions bot commented Oct 28, 2021

PR #11091: Size comparison from 4b6486f to 932f364

Increases (21 builds for efr32, k32w, mbed, nrfconnect, qpg, telink)
platform target config section 4b6486f 932f364 change % change
efr32 lighting-app BRD4161A (read only) 736916 737316 400 0.1
.text 736908 737308 400 0.1
BRD4161A+rpc (read only) 724344 724756 412 0.1
.text 724336 724748 412 0.1
lock-app BRD4161A (read only) 716212 716612 400 0.1
.text 716204 716604 400 0.1
window-app BRD4161A (read only) 717116 717516 400 0.1
.text 717108 717508 400 0.1
k32w lighting-app k32w061+se05x+release (read/write) 700852 700976 124 0.0
.text 614464 614588 124 0.0
lock-app k32w061+debug (read/write) 592808 592932 124 0.0
.text 515972 516096 124 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2290480 2290600 120 0.0
.text 1253080 1253200 120 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2274816 2274928 112 0.0
.text 1237416 1237528 112 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2252536 2252648 112 0.0
.text 1215136 1215248 112 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862739 862863 124 0.0
rodata 97484 97528 44 0.0
text 577496 577576 80 0.0
nrf52840dk_nrf52840+rpc (read/write) 823579 823687 108 0.0
rodata 88260 88304 44 0.0
text 550688 550752 64 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787730 787854 124 0.0
rodata 92724 92768 44 0.0
text 506964 507044 80 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839411 839535 124 0.0
rodata 93836 93880 44 0.0
text 558980 559060 80 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764710 764834 124 0.0
rodata 89144 89188 44 0.0
text 488540 488620 80 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844115 844239 124 0.0
rodata 95084 95128 44 0.0
text 562188 562272 84 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839387 839527 140 0.0
rodata 93860 93904 44 0.0
text 558820 558904 84 0.0
shell nrf52840dk_nrf52840 text 520232 520236 4 0.0
nrf5340dk_nrf5340_cpuapp text 440844 440848 4 0.0
qpg lighting-app qpg6100+debug (read only) 491060 491192 132 0.0
.text 485740 485872 132 0.0
lock-app qpg6100+debug (read only) 467400 467532 132 0.0
.text 462080 462212 132 0.0
telink lighting-app tlsr9518adk80d (read/write) 664350 664466 116 0.0
text 457966 458034 68 0.0
Decreases (3 builds for efr32, nrfconnect, p6)
platform target config section 4b6486f 932f364 change % change
efr32 lighting-app BRD4161A+rpc (read/write) 132036 132032 -4 -0.0
nrfconnect pigweed-app nrf52840dk_nrf52840 (read/write) 497339 497323 -16 -0.0
text 339456 339436 -20 -0.0
p6 lock-app default (read/write) 2169056 2168936 -120 -0.0
.text 1127320 1127200 -120 -0.0
Full report (27 builds for efr32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4b6486f 932f364 change % change
efr32 lighting-app BRD4161A (read only) 736916 737316 400 0.1
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 736908 737308 400 0.1
BRD4161A+rpc (read only) 724344 724756 412 0.1
(read/write) 132036 132032 -4 -0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724336 724748 412 0.1
lock-app BRD4161A (read only) 716212 716612 400 0.1
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716204 716604 400 0.1
window-app BRD4161A (read only) 717116 717516 400 0.1
(read/write) 113568 113568 0 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717108 717508 400 0.1
k32w lighting-app k32w061+se05x+release (read/write) 700852 700976 124 0.0
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614464 614588 124 0.0
lock-app k32w061+debug (read/write) 592808 592932 124 0.0
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 515972 516096 124 0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290480 2290600 120 0.0
.bss 180620 180620 0 0.0
.data 5192 5192 0 0.0
.heap 850632 850632 0 0.0
.text 1253080 1253200 120 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274816 2274928 112 0.0
.bss 172820 172820 0 0.0
.data 5568 5568 0 0.0
.heap 858056 858056 0 0.0
.text 1237416 1237528 112 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252536 2252648 112 0.0
.bss 171724 171724 0 0.0
.data 5552 5552 0 0.0
.heap 859168 859168 0 0.0
.text 1215136 1215248 112 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) 2048984 2048984 0 0.0
.bss 156208 156208 0 0.0
.data 4968 4968 0 0.0
.heap 875272 875272 0 0.0
.text 1011584 1011584 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862739 862863 124 0.0
bss 112132 112132 0 0.0
rodata 97484 97528 44 0.0
text 577496 577576 80 0.0
nrf52840dk_nrf52840+rpc (read/write) 823579 823687 108 0.0
bss 108372 108372 0 0.0
rodata 88260 88304 44 0.0
text 550688 550752 64 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787730 787854 124 0.0
bss 113504 113504 0 0.0
rodata 92724 92768 44 0.0
text 506964 507044 80 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839411 839535 124 0.0
bss 111168 111168 0 0.0
rodata 93836 93880 44 0.0
text 558980 559060 80 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764710 764834 124 0.0
bss 112576 112576 0 0.0
rodata 89144 89188 44 0.0
text 488540 488620 80 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497339 497323 -16 -0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339436 -20 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 844115 844239 124 0.0
bss 111304 111304 0 0.0
rodata 95084 95128 44 0.0
text 562188 562272 84 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839387 839527 140 0.0
bss 111200 111200 0 0.0
rodata 93860 93904 44 0.0
text 558820 558904 84 0.0
shell nrf52840dk_nrf52840 (read/write) 776435 776435 0 0.0
bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520232 520236 4 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691490 0 0.0
bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440844 440848 4 0.0
p6 lock-app default (read/write) 2169056 2168936 -120 -0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127320 1127200 -120 -0.0
qpg lighting-app qpg6100+debug (read only) 491060 491192 132 0.0
(read/write) 114144 114144 0 0.0
.bss 52400 52400 0 0.0
.data 1000 1000 0 0.0
.text 485740 485872 132 0.0
lock-app qpg6100+debug (read only) 467400 467532 132 0.0
(read/write) 114140 114140 0 0.0
.bss 51352 51352 0 0.0
.data 956 956 0 0.0
.text 462080 462212 132 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155244 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149924 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 664350 664466 116 0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 457966 458034 68 0.0

Copy link
Contributor

@msandstedt msandstedt left a comment

Choose a reason for hiding this comment

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

Approved assuming resolution of Boris's comments.

Nice build optimization!

@andy31415
Copy link
Contributor

/rebase

mrjerryjohns and others added 2 commits October 28, 2021 16:29
This splits up CHIPClusters.cpp into a couple of different files:
        - CHIPClusters.cpp contains no template specialized methods.
        - CHIPClustersInvoke.cpp contains all template specialized
          methods for invoking commands.
        - CHIPClustersWrite.cpp contains all template specialized
          methods for doing writes.

This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when
doing an incremental compilation of chip-tool after touching CHIPClusters.cpp.

It does this by better leveraging -jX builds to parallelize compilation.

More importantly, this might also provide a pattern for others (like
Android) that is running into OOM issues with clang compiling
CHIPClusters.cpp.
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@github-actions
Copy link

github-actions bot commented Oct 28, 2021

PR #11091: Size comparison from 149e582 to ee570cb

Increases (2 builds for linux, telink)
platform target config section 149e582 ee570cb change % change
linux chip-tool debug .rodata 214032 214064 32 0.0
telink lighting-app tlsr9518adk80d text 458068 458070 2 0.0
Decreases (11 builds for efr32, linux, qpg)
platform target config section 149e582 ee570cb change % change
efr32 lighting-app BRD4161A (read only) 737476 737460 -16 -0.0
.text 737468 737452 -16 -0.0
BRD4161A+rpc (read only) 724916 724900 -16 -0.0
.text 724908 724892 -16 -0.0
linux all-clusters-app debug (read only) 1653505 1653185 -320 -0.0
(read/write) 119136 119104 -32 -0.0
.data.rel.ro 61536 61504 -32 -0.1
.rodata 137845 137749 -96 -0.1
.text 1383346 1383170 -176 -0.0
bridge-app debug+rpc (read only) 1282421 1282125 -296 -0.0
(read/write) 85192 85160 -32 -0.0
.data.rel.ro 27368 27336 -32 -0.1
.rodata 110812 110724 -88 -0.1
.text 1076245 1076085 -160 -0.0
chip-tool debug (read only) 4262469 4262277 -192 -0.0
(read/write) 122208 122176 -32 -0.0
.data.rel.ro 97536 97504 -32 -0.0
.text 3785589 3785413 -176 -0.0
lighting-app debug+rpc (read only) 1541401 1541097 -304 -0.0
(read/write) 102032 102000 -32 -0.0
.data.rel.ro 54448 54416 -32 -0.1
.rodata 128977 128881 -96 -0.1
.text 1279922 1279762 -160 -0.0
ota-provider-app debug (read only) 1238937 1238617 -320 -0.0
(read/write) 67904 67872 -32 -0.0
.data.rel.ro 24616 24584 -32 -0.1
.rodata 110984 110888 -96 -0.1
.text 1031730 1031554 -176 -0.0
ota-requestor-app debug (read only) 1301033 1300233 -800 -0.1
(read/write) 76648 76616 -32 -0.0
.data.rel.ro 25496 25464 -32 -0.1
.rodata 127680 127104 -576 -0.5
.text 1075490 1075314 -176 -0.0
shell debug (read only) 787361 787089 -272 -0.0
(read/write) 57792 57760 -32 -0.1
.data.rel.ro 36880 36848 -32 -0.1
.rodata 77519 77455 -64 -0.1
.text 608258 608098 -160 -0.0
tv-app debug (read only) 1774529 1773697 -832 -0.0
(read/write) 289656 289624 -32 -0.0
.data.rel.ro 58704 58672 -32 -0.1
.rodata 154776 154168 -608 -0.4
.text 1477442 1477266 -176 -0.0
qpg persistent-storage-app qpg6100+debug (read only) 155244 155236 -8 -0.0
.text 149924 149916 -8 -0.0
Full report (20 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 149e582 ee570cb change % change
efr32 lighting-app BRD4161A (read only) 737476 737460 -16 -0.0
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 737468 737452 -16 -0.0
BRD4161A+rpc (read only) 724916 724900 -16 -0.0
(read/write) 132032 132032 0 0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724908 724892 -16 -0.0
lock-app BRD4161A (read only) 716756 716756 0 0.0
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716748 716748 0 0.0
window-app BRD4161A (read only) 717660 717660 0 0.0
(read/write) 113568 113568 0 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717652 717652 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 701024 701024 0 0.0
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614636 614636 0 0.0
lock-app k32w061+debug (read/write) 592980 592980 0 0.0
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 516144 516144 0 0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
linux all-clusters-app debug (read only) 1653505 1653185 -320 -0.0
(read/write) 119136 119104 -32 -0.0
.bss 51376 51376 0 0.0
.data 978 978 0 0.0
.data.rel.ro 61536 61504 -32 -0.1
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 137845 137749 -96 -0.1
.text 1383346 1383170 -176 -0.0
bridge-app debug+rpc (read only) 1282421 1282125 -296 -0.0
(read/write) 85192 85160 -32 -0.0
.bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27368 27336 -32 -0.1
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110812 110724 -88 -0.1
.text 1076245 1076085 -160 -0.0
chip-tool debug (read only) 4262469 4262277 -192 -0.0
(read/write) 122208 122176 -32 -0.0
.bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 97536 97504 -32 -0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 214032 214064 32 0.0
.text 3785589 3785413 -176 -0.0
lighting-app debug+rpc (read only) 1541401 1541097 -304 -0.0
(read/write) 102032 102000 -32 -0.0
.bss 41208 41208 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 54448 54416 -32 -0.1
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 128977 128881 -96 -0.1
.text 1279922 1279762 -160 -0.0
ota-provider-app debug (read only) 1238937 1238617 -320 -0.0
(read/write) 67904 67872 -32 -0.0
.bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24616 24584 -32 -0.1
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110984 110888 -96 -0.1
.text 1031730 1031554 -176 -0.0
ota-requestor-app debug (read only) 1301033 1300233 -800 -0.1
(read/write) 76648 76616 -32 -0.0
.bss 45216 45216 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25496 25464 -32 -0.1
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 127680 127104 -576 -0.5
.text 1075490 1075314 -176 -0.0
shell debug (read only) 787361 787089 -272 -0.0
(read/write) 57792 57760 -32 -0.1
.bss 16168 16168 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36880 36848 -32 -0.1
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 77519 77455 -64 -0.1
.text 608258 608098 -160 -0.0
tv-app debug (read only) 1774529 1773697 -832 -0.0
(read/write) 289656 289624 -32 -0.0
.bss 223280 223280 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 58704 58672 -32 -0.1
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 154776 154168 -608 -0.4
.text 1477442 1477266 -176 -0.0
p6 lock-app default (read/write) 2169096 2169096 0 0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127360 1127360 0 0.0
qpg lighting-app qpg6100+debug (read only) 491224 491224 0 0.0
(read/write) 114144 114144 0 0.0
.bss 51288 51288 0 0.0
.data 1000 1000 0 0.0
.text 485904 485904 0 0.0
lock-app qpg6100+debug (read only) 467556 467556 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50240 50240 0 0.0
.data 956 956 0 0.0
.text 462236 462236 0 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155236 -8 -0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149916 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 664518 664518 0 0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 458068 458070 2 0.0

@github-actions
Copy link

github-actions bot commented Oct 28, 2021

PR #11091: Size comparison from 149e582 to 91dad09

Increases above 0.2%:

platform target config section 149e582 91dad09 change % change
linux chip-tool debug .rodata 214032 214704 672 0.3
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 97528 97816 288 0.3
nrf52840dk_nrf52840+rpc rodata 88304 88596 292 0.3
nrf5340dk_nrf5340_cpuapp rodata 92768 93056 288 0.3
lock-app nrf52840dk_nrf52840 rodata 93880 94172 292 0.3
nrf5340dk_nrf5340_cpuapp rodata 89188 89476 288 0.3
pump-app nrf52840dk_nrf52840 rodata 95128 95416 288 0.3
pump-controller-app nrf52840dk_nrf52840 rodata 93904 94192 288 0.3
Increases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 149e582 91dad09 change % change
efr32 lighting-app BRD4161A (read only) 737476 738120 644 0.1
.text 737468 738112 644 0.1
BRD4161A+rpc (read only) 724916 725560 644 0.1
(read/write) 132032 132036 4 0.0
.text 724908 725552 644 0.1
lock-app BRD4161A (read only) 716756 717400 644 0.1
.text 716748 717392 644 0.1
window-app BRD4161A (read only) 717660 718304 644 0.1
(read/write) 113568 113572 4 0.0
.text 717652 718296 644 0.1
esp32 all-clusters-app c3devkit (read only) 875926 876382 456 0.1
(read/write) 1308672 1308944 272 0.0
.flash.rodata 199744 200016 272 0.1
.flash.text 875926 876382 456 0.1
m5stack (read only) 907275 907659 384 0.0
(read/write) 428460 428724 264 0.1
.flash.rodata 208468 208732 264 0.1
.flash.text 907275 907659 384 0.0
k32w lighting-app k32w061+se05x+release (read/write) 701024 701656 632 0.1
.text 614636 615268 632 0.1
lock-app k32w061+debug (read/write) 592980 593612 632 0.1
.text 516144 516776 632 0.1
linux all-clusters-app debug (read only) 1653505 1655073 1568 0.1
.rodata 137845 138069 224 0.2
.text 1383346 1384738 1392 0.1
bridge-app debug+rpc (read only) 1282421 1283341 920 0.1
.rodata 110812 111044 232 0.2
.text 1076245 1076981 736 0.1
chip-tool debug (read only) 4262469 4266229 3760 0.1
.rodata 214032 214704 672 0.3
.text 3785589 3788725 3136 0.1
lighting-app debug+rpc (read only) 1541401 1542281 880 0.1
.rodata 128977 129169 192 0.1
.text 1279922 1280658 736 0.1
ota-provider-app debug (read only) 1238937 1239849 912 0.1
.rodata 110984 111208 224 0.2
.text 1031730 1032466 736 0.1
ota-requestor-app debug (read only) 1301033 1301465 432 0.0
.text 1075490 1076226 736 0.1
tv-app debug (read only) 1774529 1774929 400 0.0
.text 1477442 1478178 736 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2290664 2291400 736 0.0
.text 1253264 1254000 736 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2274992 2275608 616 0.0
.text 1237592 1238208 616 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2252712 2253328 616 0.0
.text 1215312 1215928 616 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862911 863535 624 0.1
rodata 97528 97816 288 0.3
text 577624 577960 336 0.1
nrf52840dk_nrf52840+rpc (read/write) 823735 824363 628 0.1
rodata 88304 88596 292 0.3
text 550800 551136 336 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 787902 788526 624 0.1
rodata 92768 93056 288 0.3
text 507092 507428 336 0.1
lock-app nrf52840dk_nrf52840 (read/write) 839583 840211 628 0.1
rodata 93880 94172 292 0.3
text 559108 559444 336 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 764882 765506 624 0.1
rodata 89188 89476 288 0.3
text 488668 489004 336 0.1
pump-app nrf52840dk_nrf52840 (read/write) 844287 844911 624 0.1
rodata 95128 95416 288 0.3
text 562320 562656 336 0.1
pump-controller-app nrf52840dk_nrf52840 (read/write) 839575 840199 624 0.1
rodata 93904 94192 288 0.3
text 558952 559288 336 0.1
p6 lock-app default (read/write) 2169096 2169744 648 0.0
.text 1127360 1128008 648 0.1
telink lighting-app tlsr9518adk80d (read/write) 664518 665202 684 0.1
text 458068 458454 386 0.1
Decreases (10 builds for linux, mbed, qpg)
platform target config section 149e582 91dad09 change % change
linux all-clusters-app debug (read/write) 119136 119104 -32 -0.0
.data.rel.ro 61536 61504 -32 -0.1
bridge-app debug+rpc (read/write) 85192 85160 -32 -0.0
.data.rel.ro 27368 27336 -32 -0.1
chip-tool debug (read/write) 122208 122176 -32 -0.0
.data.rel.ro 97536 97504 -32 -0.0
lighting-app debug+rpc (read/write) 102032 102000 -32 -0.0
.data.rel.ro 54448 54416 -32 -0.1
ota-provider-app debug (read/write) 67904 67872 -32 -0.0
.data.rel.ro 24616 24584 -32 -0.1
ota-requestor-app debug (read/write) 76648 76616 -32 -0.0
.data.rel.ro 25496 25464 -32 -0.1
.rodata 127680 127424 -256 -0.2
shell debug (read only) 787361 787153 -208 -0.0
(read/write) 57792 57760 -32 -0.1
.data.rel.ro 36880 36848 -32 -0.1
.text 608258 608098 -160 -0.0
tv-app debug (read/write) 289656 289624 -32 -0.0
.data.rel.ro 58704 58672 -32 -0.1
.rodata 154776 154488 -288 -0.2
mbed shell CY8CPROTO_062_4343W+release (read/write) 2048984 2048976 -8 -0.0
.text 1011584 1011576 -8 -0.0
qpg persistent-storage-app qpg6100+debug (read only) 155244 155236 -8 -0.0
.text 149924 149916 -8 -0.0
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 149e582 91dad09 change % change
efr32 lighting-app BRD4161A (read only) 737476 738120 644 0.1
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 737468 738112 644 0.1
BRD4161A+rpc (read only) 724916 725560 644 0.1
(read/write) 132032 132036 4 0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724908 725552 644 0.1
lock-app BRD4161A (read only) 716756 717400 644 0.1
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716748 717392 644 0.1
window-app BRD4161A (read only) 717660 718304 644 0.1
(read/write) 113568 113572 4 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717652 718296 644 0.1
esp32 all-clusters-app c3devkit (read only) 875926 876382 456 0.1
(read/write) 1308672 1308944 272 0.0
.dram0.bss 59248 59248 0 0.0
.dram0.data 16448 16448 0 0.0
.flash.rodata 199744 200016 272 0.1
.flash.text 875926 876382 456 0.1
.iram0.text 57554 57554 0 0.0
m5stack (read only) 907275 907659 384 0.0
(read/write) 428460 428724 264 0.1
.dram0.bss 61744 61744 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 208468 208732 264 0.1
.flash.text 907275 907659 384 0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 701024 701656 632 0.1
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614636 615268 632 0.1
lock-app k32w061+debug (read/write) 592980 593612 632 0.1
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 516144 516776 632 0.1
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
linux all-clusters-app debug (read only) 1653505 1655073 1568 0.1
(read/write) 119136 119104 -32 -0.0
.bss 51376 51376 0 0.0
.data 978 978 0 0.0
.data.rel.ro 61536 61504 -32 -0.1
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 137845 138069 224 0.2
.text 1383346 1384738 1392 0.1
bridge-app debug+rpc (read only) 1282421 1283341 920 0.1
(read/write) 85192 85160 -32 -0.0
.bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27368 27336 -32 -0.1
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110812 111044 232 0.2
.text 1076245 1076981 736 0.1
chip-tool debug (read only) 4262469 4266229 3760 0.1
(read/write) 122208 122176 -32 -0.0
.bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 97536 97504 -32 -0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 214032 214704 672 0.3
.text 3785589 3788725 3136 0.1
lighting-app debug+rpc (read only) 1541401 1542281 880 0.1
(read/write) 102032 102000 -32 -0.0
.bss 41208 41208 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 54448 54416 -32 -0.1
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 128977 129169 192 0.1
.text 1279922 1280658 736 0.1
ota-provider-app debug (read only) 1238937 1239849 912 0.1
(read/write) 67904 67872 -32 -0.0
.bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24616 24584 -32 -0.1
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110984 111208 224 0.2
.text 1031730 1032466 736 0.1
ota-requestor-app debug (read only) 1301033 1301465 432 0.0
(read/write) 76648 76616 -32 -0.0
.bss 45216 45216 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25496 25464 -32 -0.1
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 127680 127424 -256 -0.2
.text 1075490 1076226 736 0.1
shell debug (read only) 787361 787153 -208 -0.0
(read/write) 57792 57760 -32 -0.1
.bss 16168 16168 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36880 36848 -32 -0.1
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 77519 77519 0 0.0
.text 608258 608098 -160 -0.0
tv-app debug (read only) 1774529 1774929 400 0.0
(read/write) 289656 289624 -32 -0.0
.bss 223280 223280 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 58704 58672 -32 -0.1
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 154776 154488 -288 -0.2
.text 1477442 1478178 736 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290664 2291400 736 0.0
.bss 180620 180620 0 0.0
.data 5192 5192 0 0.0
.heap 850632 850632 0 0.0
.text 1253264 1254000 736 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274992 2275608 616 0.0
.bss 172820 172820 0 0.0
.data 5568 5568 0 0.0
.heap 858056 858056 0 0.0
.text 1237592 1238208 616 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252712 2253328 616 0.0
.bss 171724 171724 0 0.0
.data 5552 5552 0 0.0
.heap 859168 859168 0 0.0
.text 1215312 1215928 616 0.1
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) 2048984 2048976 -8 -0.0
.bss 156208 156208 0 0.0
.data 4968 4968 0 0.0
.heap 875272 875272 0 0.0
.text 1011584 1011576 -8 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862911 863535 624 0.1
bss 112132 112132 0 0.0
rodata 97528 97816 288 0.3
text 577624 577960 336 0.1
nrf52840dk_nrf52840+rpc (read/write) 823735 824363 628 0.1
bss 108372 108372 0 0.0
rodata 88304 88596 292 0.3
text 550800 551136 336 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 787902 788526 624 0.1
bss 113504 113504 0 0.0
rodata 92768 93056 288 0.3
text 507092 507428 336 0.1
lock-app nrf52840dk_nrf52840 (read/write) 839583 840211 628 0.1
bss 111168 111168 0 0.0
rodata 93880 94172 292 0.3
text 559108 559444 336 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 764882 765506 624 0.1
bss 112576 112576 0 0.0
rodata 89188 89476 288 0.3
text 488668 489004 336 0.1
pigweed-app nrf52840dk_nrf52840 (read/write) 497323 497323 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844287 844911 624 0.1
bss 111304 111304 0 0.0
rodata 95128 95416 288 0.3
text 562320 562656 336 0.1
pump-controller-app nrf52840dk_nrf52840 (read/write) 839575 840199 624 0.1
bss 111200 111200 0 0.0
rodata 93904 94192 288 0.3
text 558952 559288 336 0.1
shell nrf52840dk_nrf52840 (read/write) 776435 776435 0 0.0
bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520236 520236 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691490 0 0.0
bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440848 440848 0 0.0
p6 lock-app default (read/write) 2169096 2169744 648 0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127360 1128008 648 0.1
qpg lighting-app qpg6100+debug (read only) 491224 491224 0 0.0
(read/write) 114144 114144 0 0.0
.bss 51288 51288 0 0.0
.data 1000 1000 0 0.0
.text 485904 485904 0 0.0
lock-app qpg6100+debug (read only) 467556 467556 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50240 50240 0 0.0
.data 956 956 0 0.0
.text 462236 462236 0 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155236 -8 -0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149916 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 664518 665202 684 0.1
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 458068 458454 386 0.1

@mrjerryjohns mrjerryjohns merged commit 1e27d92 into project-chip:master Oct 28, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
* Split CHIPClusters.cpp

This splits up CHIPClusters.cpp into a couple of different files:
        - CHIPClusters.cpp contains no template specialized methods.
        - CHIPClustersInvoke.cpp contains all template specialized
          methods for invoking commands.
        - CHIPClustersWrite.cpp contains all template specialized
          methods for doing writes.

This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when
doing an incremental compilation of chip-tool after touching CHIPClusters.cpp.

It does this by better leveraging -jX builds to parallelize compilation.

More importantly, this might also provide a pattern for others (like
Android) that is running into OOM issues with clang compiling
CHIPClusters.cpp.

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Fix regen breakaga

* Address review feedback

Co-authored-by: Justin Wood <woody@apple.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
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.

7 participants