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

Remove GenericConfigurationManagerImpl's CRTP #11784

Merged
merged 10 commits into from
Nov 17, 2021

Conversation

harimau-qirex
Copy link
Contributor

Problem

The CRTP in the GenericConfigurationManagerImpl hides an interface that it depends on, as well as makes it more challenging to make subclasses of the platform-specific ConfigurationManager implementations.

Change overview

  • Make the methods that deal with the configuration values an explicit part of the GenericConfigurationManagerImpl interface. Add implementations of these to each platform.
  • Replace the ImplClass template parameter with a class that specifies the type of and defines the keys used.
  • Remove all remaining Impl() calls in GenericConfigurationManagerImpl.

Testing

Ran the unit tests.

@github-actions
Copy link

github-actions bot commented Nov 15, 2021

PR #11784: Size comparison from 2832392 to 17560fc

Increases above 0.2%:

platform target config section 28323922 17560fc change % change
linux all-clusters-app debug .data.rel.ro 62848 63040 192 0.3
bridge-app debug+rpc .data.rel.ro 28088 28280 192 0.7
lighting-app debug+rpc .data.rel.ro 55680 55872 192 0.3
ota-provider-app debug (read/write) 75304 75496 192 0.3
.data.rel.ro 24904 25096 192 0.8
ota-requestor-app debug .data.rel.ro 26168 26360 192 0.7
shell debug (read/write) 65512 65704 192 0.3
.data.rel.ro 37360 37552 192 0.5
tv-app debug .data.rel.ro 59824 60016 192 0.3
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 97112 97684 572 0.6
nrf52840dk_nrf52840+rpc rodata 88304 88872 568 0.6
nrf5340dk_nrf5340_cpuapp rodata 92372 92940 568 0.6
lock-app nrf52840dk_nrf52840 rodata 93176 93748 572 0.6
nrf5340dk_nrf5340_cpuapp rodata 88484 89052 568 0.6
pump-app nrf52840dk_nrf52840 rodata 94888 95456 568 0.6
pump-controller-app nrf52840dk_nrf52840 rodata 93136 93704 568 0.6
shell nrf52840dk_nrf52840 rodata 72192 72764 572 0.8
nrf5340dk_nrf5340_cpuapp (read/write) 690666 692118 1452 0.2
rodata 66836 67408 572 0.9
qpg lighting-app qpg6100+debug (read only) 494340 495604 1264 0.3
.text 489020 490284 1264 0.3
lock-app qpg6100+debug (read only) 468868 470132 1264 0.3
.text 463548 464812 1264 0.3
Increases (32 builds for efr32, esp32, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 28323922 17560fc change % change
efr32 lighting-app BRD4161A (read only) 750128 750512 384 0.1
.text 750120 750504 384 0.1
BRD4161A+rpc (read only) 737692 738060 368 0.0
.text 737684 738052 368 0.0
lock-app BRD4161A (read only) 726792 727176 384 0.1
.text 726784 727168 384 0.1
window-app BRD4161A (read only) 727784 728152 368 0.1
.text 727776 728144 368 0.1
esp32 all-clusters-app c3devkit (read only) 828266 828822 556 0.1
(read/write) 1226042 1226170 128 0.0
.flash.rodata 169600 169728 128 0.1
.flash.text 828266 828822 556 0.1
m5stack (read only) 898639 899223 584 0.1
(read/write) 424816 424952 136 0.0
.flash.rodata 197252 197388 136 0.1
.flash.text 893255 893839 584 0.1
linux all-clusters-app debug (read only) 1722641 1724337 1696 0.1
(read/write) 126944 127136 192 0.2
.data.rel.ro 62848 63040 192 0.3
.text 1447762 1448882 1120 0.1
bridge-app debug+rpc (read only) 1313045 1314733 1688 0.1
(read/write) 77552 77744 192 0.2
.data.rel.ro 28088 28280 192 0.7
.text 1103829 1104949 1120 0.1
chip-tool debug (read only) 4921333 4923021 1688 0.0
(read/write) 167336 167528 192 0.1
.data.rel.ro 118384 118576 192 0.2
.text 4343125 4344245 1120 0.0
lighting-app debug+rpc (read only) 1582617 1584313 1696 0.1
(read/write) 110320 110512 192 0.2
.data.rel.ro 55680 55872 192 0.3
.text 1317666 1318786 1120 0.1
ota-provider-app debug (read only) 1267641 1269345 1704 0.1
(read/write) 75304 75496 192 0.3
.data.rel.ro 24904 25096 192 0.8
.text 1057026 1058162 1136 0.1
ota-requestor-app debug (read only) 1352313 1354001 1688 0.1
(read/write) 79072 79264 192 0.2
.data.rel.ro 26168 26360 192 0.7
.text 1128322 1129442 1120 0.1
shell debug (read only) 793417 795081 1664 0.2
(read/write) 65512 65704 192 0.3
.data.rel.ro 37360 37552 192 0.5
.text 612434 613554 1120 0.2
tv-app debug (read only) 1858457 1860145 1688 0.1
(read/write) 407512 407704 192 0.0
.data.rel.ro 59824 60016 192 0.3
.text 1555954 1557074 1120 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2292496 2293616 1120 0.0
.text 1255096 1256216 1120 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2274912 2276104 1192 0.1
.text 1237512 1238704 1192 0.1
lock-app CY8CPROTO_062_4343W+release (read/write) 2250352 2251544 1192 0.1
.text 1212952 1214144 1192 0.1
shell CY8CPROTO_062_4343W+release (read/write) 2049136 2050320 1184 0.1
.text 1011736 1012920 1184 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 865287 866739 1452 0.2
rodata 97112 97684 572 0.6
text 581596 582476 880 0.2
nrf52840dk_nrf52840+rpc (read/write) 827679 829111 1432 0.2
rodata 88304 88872 568 0.6
text 555768 556644 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 790346 791794 1448 0.2
rodata 92372 92940 568 0.6
text 511064 511944 880 0.2
lock-app nrf52840dk_nrf52840 (read/write) 840327 841763 1436 0.2
rodata 93176 93748 572 0.6
text 561700 562576 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 765626 767074 1448 0.2
rodata 88484 89052 568 0.6
text 491260 492136 876 0.2
pump-app nrf52840dk_nrf52840 (read/write) 846439 847871 1432 0.2
rodata 94888 95456 568 0.6
text 565880 566756 876 0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 840031 841463 1432 0.2
rodata 93136 93704 568 0.6
text 561320 562196 876 0.2
shell nrf52840dk_nrf52840 (read/write) 775643 777095 1452 0.2
rodata 72192 72764 572 0.8
text 520104 520980 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 690666 692118 1452 0.2
rodata 66836 67408 572 0.9
text 440712 441588 876 0.2
p6 all-clusters-app default (read/write) 2301248 2302096 848 0.0
.text 1259512 1260360 848 0.1
lock-app default (read/write) 2214736 2215584 848 0.0
.text 1173000 1173848 848 0.1
qpg lighting-app qpg6100+debug (read only) 494340 495604 1264 0.3
.text 489020 490284 1264 0.3
lock-app qpg6100+debug (read only) 468868 470132 1264 0.3
.text 463548 464812 1264 0.3
telink lighting-app tlsr9518adk80d (read/write) 667966 669582 1616 0.2
text 462450 463458 1008 0.2
Decreases (6 builds for linux)
platform target config section 28323922 17560fc change % change
linux bridge-app debug+rpc .rodata 111860 111852 -8 -0.0
chip-tool debug .rodata 268178 268170 -8 -0.0
ota-provider-app debug .rodata 113383 113375 -8 -0.0
ota-requestor-app debug .rodata 124208 124200 -8 -0.0
shell debug .rodata 77903 77871 -32 -0.0
tv-app debug .rodata 157037 157029 -8 -0.0
Full report (35 builds for efr32, esp32, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 28323922 17560fc change % change
efr32 lighting-app BRD4161A (read only) 750128 750512 384 0.1
(read/write) 115940 115940 0 0.0
.bss 114140 114140 0 0.0
.data 1800 1800 0 0.0
.text 750120 750504 384 0.1
BRD4161A+rpc (read only) 737692 738060 368 0.0
(read/write) 132568 132568 0 0.0
.bss 130644 130644 0 0.0
.data 1924 1924 0 0.0
.text 737684 738052 368 0.0
lock-app BRD4161A (read only) 726792 727176 384 0.1
(read/write) 113724 113724 0 0.0
.bss 111964 111964 0 0.0
.data 1756 1756 0 0.0
.text 726784 727168 384 0.1
window-app BRD4161A (read only) 727784 728152 368 0.1
(read/write) 114044 114044 0 0.0
.bss 112284 112284 0 0.0
.data 1760 1760 0 0.0
.text 727776 728144 368 0.1
esp32 all-clusters-app c3devkit (read only) 828266 828822 556 0.1
(read/write) 1226042 1226170 128 0.0
.dram0.bss 57096 57096 0 0.0
.dram0.data 14092 14092 0 0.0
.flash.rodata 169600 169728 128 0.1
.flash.text 828266 828822 556 0.1
.iram0.text 61394 61394 0 0.0
m5stack (read only) 898639 899223 584 0.1
(read/write) 424816 424952 136 0.0
.dram0.bss 62184 62184 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 197252 197388 136 0.1
.flash.text 893255 893839 584 0.1
.iram0.text 122987 122987 0 0.0
linux all-clusters-app debug (read only) 1722641 1724337 1696 0.1
(read/write) 126944 127136 192 0.2
.bss 57776 57776 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 62848 63040 192 0.3
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 140277 140277 0 0.0
.text 1447762 1448882 1120 0.1
bridge-app debug+rpc (read only) 1313045 1314733 1688 0.1
(read/write) 77552 77744 192 0.2
.bss 42896 42896 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 28088 28280 192 0.7
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111860 111852 -8 -0.0
.text 1103829 1104949 1120 0.1
chip-tool debug (read only) 4921333 4923021 1688 0.0
(read/write) 167336 167528 192 0.1
.bss 41192 41192 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 118384 118576 192 0.2
.dynamic 592 592 0 0.0
.got 4416 4416 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 268178 268170 -8 -0.0
.text 4343125 4344245 1120 0.0
lighting-app debug+rpc (read only) 1582617 1584313 1696 0.1
(read/write) 110320 110512 192 0.2
.bss 48080 48080 0 0.0
.data 1234 1234 0 0.0
.data.rel.ro 55680 55872 192 0.3
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129873 129873 0 0.0
.text 1317666 1318786 1120 0.1
ota-provider-app debug (read only) 1267641 1269345 1704 0.1
(read/write) 75304 75496 192 0.3
.bss 44512 44512 0 0.0
.data 784 784 0 0.0
.data.rel.ro 24904 25096 192 0.8
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 113383 113375 -8 -0.0
.text 1057026 1058162 1136 0.1
ota-requestor-app debug (read only) 1352313 1354001 1688 0.1
(read/write) 79072 79264 192 0.2
.bss 46976 46976 0 0.0
.data 848 848 0 0.0
.data.rel.ro 26168 26360 192 0.7
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 124208 124200 -8 -0.0
.text 1128322 1129442 1120 0.1
shell debug (read only) 793417 795081 1664 0.2
(read/write) 65512 65704 192 0.3
.bss 23400 23400 0 0.0
.data 242 242 0 0.0
.data.rel.ro 37360 37552 192 0.5
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77903 77871 -32 -0.0
.text 612434 613554 1120 0.2
tv-app debug (read only) 1858457 1860145 1688 0.1
(read/write) 407512 407704 192 0.0
.bss 339240 339240 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 59824 60016 192 0.3
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 157037 157029 -8 -0.0
.text 1555954 1557074 1120 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2292496 2293616 1120 0.0
.bss 179692 179692 0 0.0
.data 5216 5216 0 0.0
.heap 851536 851536 0 0.0
.text 1255096 1256216 1120 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274912 2276104 1192 0.1
.bss 172556 172556 0 0.0
.data 5576 5576 0 0.0
.heap 858312 858312 0 0.0
.text 1237512 1238704 1192 0.1
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2250352 2251544 1192 0.1
.bss 171436 171436 0 0.0
.data 5568 5568 0 0.0
.heap 859440 859440 0 0.0
.text 1212952 1214144 1192 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) 2049136 2050320 1184 0.1
.bss 155912 155912 0 0.0
.data 4968 4968 0 0.0
.heap 875568 875568 0 0.0
.text 1011736 1012920 1184 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 865287 866739 1452 0.2
bss 110964 110964 0 0.0
rodata 97112 97684 572 0.6
text 581596 582476 880 0.2
nrf52840dk_nrf52840+rpc (read/write) 827679 829111 1432 0.2
bss 107320 107320 0 0.0
rodata 88304 88872 568 0.6
text 555768 556644 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 790346 791794 1448 0.2
bss 112340 112340 0 0.0
rodata 92372 92940 568 0.6
text 511064 511944 880 0.2
lock-app nrf52840dk_nrf52840 (read/write) 840327 841763 1436 0.2
bss 109988 109988 0 0.0
rodata 93176 93748 572 0.6
text 561700 562576 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 765626 767074 1448 0.2
bss 111400 111400 0 0.0
rodata 88484 89052 568 0.6
text 491260 492136 876 0.2
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) 846439 847871 1432 0.2
bss 110128 110128 0 0.0
rodata 94888 95456 568 0.6
text 565880 566756 876 0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 840031 841463 1432 0.2
bss 110024 110024 0 0.0
rodata 93136 93704 568 0.6
text 561320 562196 876 0.2
shell nrf52840dk_nrf52840 (read/write) 775643 777095 1452 0.2
bss 108744 108744 0 0.0
rodata 72192 72764 572 0.8
text 520104 520980 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 690666 692118 1452 0.2
bss 109728 109728 0 0.0
rodata 66836 67408 572 0.9
text 440712 441588 876 0.2
p6 all-clusters-app default (read/write) 2301248 2302096 848 0.0
.bss 112680 112680 0 0.0
.data 2520 2520 0 0.0
.heap 918144 918144 0 0.0
.text 1259512 1260360 848 0.1
lock-app default (read/write) 2214736 2215584 848 0.0
.bss 101296 101296 0 0.0
.data 2400 2400 0 0.0
.heap 929648 929648 0 0.0
.text 1173000 1173848 848 0.1
qpg lighting-app qpg6100+debug (read only) 494340 495604 1264 0.3
(read/write) 114144 114144 0 0.0
.bss 50640 50640 0 0.0
.data 1008 1008 0 0.0
.text 489020 490284 1264 0.3
lock-app qpg6100+debug (read only) 468868 470132 1264 0.3
(read/write) 114140 114140 0 0.0
.bss 49576 49576 0 0.0
.data 964 964 0 0.0
.text 463548 464812 1264 0.3
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 667966 669582 1616 0.2
bss 69320 69320 0 0.0
noinit 33216 33216 0 0.0
text 462450 463458 1008 0.2

@github-actions
Copy link

github-actions bot commented Nov 15, 2021

PR #11784: Size comparison from eb40a4c to 186d097

Increases above 0.2%:

platform target config section eb40a4c 186d097 change % change
linux all-clusters-app debug .data.rel.ro 62784 62976 192 0.3
bridge-app debug+rpc .data.rel.ro 28024 28216 192 0.7
lighting-app debug+rpc .data.rel.ro 55616 55808 192 0.3
ota-provider-app debug (read/write) 75560 75752 192 0.3
.data.rel.ro 24840 25032 192 0.8
ota-requestor-app debug .data.rel.ro 26024 26216 192 0.7
shell debug (read/write) 66088 66280 192 0.3
.data.rel.ro 37520 37712 192 0.5
tv-app debug .data.rel.ro 59600 59792 192 0.3
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 95932 96504 572 0.6
nrf52840dk_nrf52840+rpc rodata 87120 87692 572 0.7
nrf5340dk_nrf5340_cpuapp rodata 91192 91760 568 0.6
lock-app nrf52840dk_nrf52840 rodata 92404 92976 572 0.6
nrf5340dk_nrf5340_cpuapp rodata 87708 88280 572 0.7
pump-app nrf52840dk_nrf52840 rodata 94112 94684 572 0.6
pump-controller-app nrf52840dk_nrf52840 rodata 92360 92932 572 0.6
shell nrf52840dk_nrf52840 rodata 72516 73088 572 0.8
nrf5340dk_nrf5340_cpuapp (read/write) 691294 692746 1452 0.2
rodata 67160 67732 572 0.9
qpg lighting-app qpg6100+debug (read only) 491504 492768 1264 0.3
.text 486184 487448 1264 0.3
lock-app qpg6100+debug (read only) 466436 467700 1264 0.3
.text 461116 462380 1264 0.3
Increases (35 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section eb40a4c 186d097 change % change
efr32 lighting-app BRD4161A (read only) 746448 746832 384 0.1
.text 746440 746824 384 0.1
BRD4161A+rpc (read only) 733980 734348 368 0.1
.text 733972 734340 368 0.1
lock-app BRD4161A (read only) 723512 723896 384 0.1
.text 723504 723888 384 0.1
window-app BRD4161A (read only) 724504 724872 368 0.1
.text 724496 724864 368 0.1
esp32 all-clusters-app c3devkit (read only) 825722 826278 556 0.1
(read/write) 1221338 1221466 128 0.0
.flash.rodata 164944 165072 128 0.1
.flash.text 825722 826278 556 0.1
m5stack (read only) 896527 897115 588 0.1
(read/write) 420644 420780 136 0.0
.flash.rodata 192908 193044 136 0.1
.flash.text 891143 891731 588 0.1
k32w lighting-app k32w061+se05x+release (read/write) 705948 706316 368 0.1
.text 620720 621088 368 0.1
lock-app k32w061+debug (read/write) 597372 597740 368 0.1
.text 521656 522024 368 0.1
shell k32w061+debug (read/write) 662580 662948 368 0.1
.text 575840 576208 368 0.1
linux all-clusters-app debug (read only) 1710041 1711737 1696 0.1
(read/write) 127168 127360 192 0.2
.data.rel.ro 62784 62976 192 0.3
.text 1440930 1442050 1120 0.1
bridge-app debug+rpc (read only) 1305277 1306965 1688 0.1
(read/write) 77360 77552 192 0.2
.data.rel.ro 28024 28216 192 0.7
.text 1097237 1098357 1120 0.1
chip-tool debug (read only) 4899829 4901517 1688 0.0
(read/write) 166280 166472 192 0.1
.data.rel.ro 117936 118128 192 0.2
.text 4325589 4326709 1120 0.0
lighting-app debug+rpc (read only) 1574273 1575969 1696 0.1
(read/write) 110608 110800 192 0.2
.data.rel.ro 55616 55808 192 0.3
.text 1311090 1312210 1120 0.1
ota-provider-app debug (read only) 1260233 1261937 1704 0.1
(read/write) 75560 75752 192 0.3
.data.rel.ro 24840 25032 192 0.8
.text 1050402 1051538 1136 0.1
ota-requestor-app debug (read only) 1343361 1345049 1688 0.1
(read/write) 79264 79456 192 0.2
.data.rel.ro 26024 26216 192 0.7
.text 1120370 1121490 1120 0.1
shell debug (read only) 794377 796057 1680 0.2
(read/write) 66088 66280 192 0.3
.data.rel.ro 37520 37712 192 0.5
.text 612674 613810 1136 0.2
tv-app debug (read only) 1846961 1848649 1688 0.1
(read/write) 405560 405752 192 0.0
.data.rel.ro 59600 59792 192 0.3
.text 1547106 1548226 1120 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2285872 2287000 1128 0.0
.text 1248472 1249600 1128 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2271816 2273000 1184 0.1
.text 1234416 1235600 1184 0.1
lock-app CY8CPROTO_062_4343W+release (read/write) 2247712 2248832 1120 0.0
.text 1210312 1211432 1120 0.1
shell CY8CPROTO_062_4343W+release (read/write) 2049456 2050640 1184 0.1
.text 1012056 1013240 1184 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862251 863703 1452 0.2
rodata 95932 96504 572 0.6
text 579768 580648 880 0.2
nrf52840dk_nrf52840+rpc (read/write) 824623 826075 1452 0.2
rodata 87120 87692 572 0.7
text 553940 554816 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 787294 788742 1448 0.2
rodata 91192 91760 568 0.6
text 509236 510116 880 0.2
lock-app nrf52840dk_nrf52840 (read/write) 837651 839103 1452 0.2
rodata 92404 92976 572 0.6
text 559868 560744 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 762954 764390 1436 0.2
rodata 87708 88280 572 0.7
text 489428 490304 876 0.2
pump-app nrf52840dk_nrf52840 (read/write) 843759 845211 1452 0.2
rodata 94112 94684 572 0.6
text 564048 564924 876 0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 837351 838803 1452 0.2
rodata 92360 92932 572 0.6
text 559488 560364 876 0.2
shell nrf52840dk_nrf52840 (read/write) 776239 777691 1452 0.2
rodata 72516 73088 572 0.8
text 520124 521000 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 691294 692746 1452 0.2
rodata 67160 67732 572 0.9
text 440732 441608 876 0.2
p6 all-clusters-app default (read/write) 2294360 2295208 848 0.0
.text 1252624 1253472 848 0.1
lock-app default (read/write) 2211784 2212632 848 0.0
.text 1170048 1170896 848 0.1
qpg lighting-app qpg6100+debug (read only) 491504 492768 1264 0.3
.text 486184 487448 1264 0.3
lock-app qpg6100+debug (read only) 466436 467700 1264 0.3
.text 461116 462380 1264 0.3
telink lighting-app tlsr9518adk80d (read/write) 765206 766814 1608 0.2
text 530008 531016 1008 0.2
Decreases (6 builds for linux)
platform target config section eb40a4c 186d097 change % change
linux bridge-app debug+rpc .rodata 111020 111012 -8 -0.0
chip-tool debug .rodata 265266 265258 -8 -0.0
ota-provider-app debug .rodata 112743 112735 -8 -0.0
ota-requestor-app debug .rodata 123568 123560 -8 -0.0
shell debug .rodata 78191 78159 -32 -0.0
tv-app debug .rodata 155469 155461 -8 -0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section eb40a4c 186d097 change % change
efr32 lighting-app BRD4161A (read only) 746448 746832 384 0.1
(read/write) 115892 115892 0 0.0
.bss 114092 114092 0 0.0
.data 1800 1800 0 0.0
.text 746440 746824 384 0.1
BRD4161A+rpc (read only) 733980 734348 368 0.1
(read/write) 132520 132520 0 0.0
.bss 130596 130596 0 0.0
.data 1924 1924 0 0.0
.text 733972 734340 368 0.1
lock-app BRD4161A (read only) 723512 723896 384 0.1
(read/write) 113676 113676 0 0.0
.bss 111916 111916 0 0.0
.data 1756 1756 0 0.0
.text 723504 723888 384 0.1
window-app BRD4161A (read only) 724504 724872 368 0.1
(read/write) 113996 113996 0 0.0
.bss 112236 112236 0 0.0
.data 1760 1760 0 0.0
.text 724496 724864 368 0.1
esp32 all-clusters-app c3devkit (read only) 825722 826278 556 0.1
(read/write) 1221338 1221466 128 0.0
.dram0.bss 57048 57048 0 0.0
.dram0.data 14084 14084 0 0.0
.flash.rodata 164944 165072 128 0.1
.flash.text 825722 826278 556 0.1
.iram0.text 61394 61394 0 0.0
m5stack (read only) 896527 897115 588 0.1
(read/write) 420644 420780 136 0.0
.dram0.bss 62400 62400 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 192908 193044 136 0.1
.flash.text 891143 891731 588 0.1
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 705948 706316 368 0.1
.bss 77516 77516 0 0.0
.data 1912 1912 0 0.0
.text 620720 621088 368 0.1
lock-app k32w061+debug (read/write) 597372 597740 368 0.1
.bss 68036 68036 0 0.0
.data 1880 1880 0 0.0
.text 521656 522024 368 0.1
shell k32w061+debug (read/write) 662580 662948 368 0.1
.bss 79092 79092 0 0.0
.data 1848 1848 0 0.0
.text 575840 576208 368 0.1
linux all-clusters-app debug (read only) 1710041 1711737 1696 0.1
(read/write) 127168 127360 192 0.2
.bss 58064 58064 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 62784 62976 192 0.3
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 135541 135541 0 0.0
.text 1440930 1442050 1120 0.1
bridge-app debug+rpc (read only) 1305277 1306965 1688 0.1
(read/write) 77360 77552 192 0.2
.bss 42768 42768 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 28024 28216 192 0.7
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111020 111012 -8 -0.0
.text 1097237 1098357 1120 0.1
chip-tool debug (read only) 4899829 4901517 1688 0.0
(read/write) 166280 166472 192 0.1
.bss 40584 40584 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 117936 118128 192 0.2
.dynamic 592 592 0 0.0
.got 4416 4416 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 265266 265258 -8 -0.0
.text 4325589 4326709 1120 0.0
lighting-app debug+rpc (read only) 1574273 1575969 1696 0.1
(read/write) 110608 110800 192 0.2
.bss 48432 48432 0 0.0
.data 1234 1234 0 0.0
.data.rel.ro 55616 55808 192 0.3
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 128561 128561 0 0.0
.text 1311090 1312210 1120 0.1
ota-provider-app debug (read only) 1260233 1261937 1704 0.1
(read/write) 75560 75752 192 0.3
.bss 44832 44832 0 0.0
.data 784 784 0 0.0
.data.rel.ro 24840 25032 192 0.8
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112743 112735 -8 -0.0
.text 1050402 1051538 1136 0.1
ota-requestor-app debug (read only) 1343361 1345049 1688 0.1
(read/write) 79264 79456 192 0.2
.bss 47296 47296 0 0.0
.data 848 848 0 0.0
.data.rel.ro 26024 26216 192 0.7
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 123568 123560 -8 -0.0
.text 1120370 1121490 1120 0.1
shell debug (read only) 794377 796057 1680 0.2
(read/write) 66088 66280 192 0.3
.bss 23816 23816 0 0.0
.data 242 242 0 0.0
.data.rel.ro 37520 37712 192 0.5
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 78191 78159 -32 -0.0
.text 612674 613810 1136 0.2
tv-app debug (read only) 1846961 1848649 1688 0.1
(read/write) 405560 405752 192 0.0
.bss 337512 337512 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 59600 59792 192 0.3
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 155469 155461 -8 -0.0
.text 1547106 1548226 1120 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2285872 2287000 1128 0.0
.bss 179644 179644 0 0.0
.data 5216 5216 0 0.0
.heap 851584 851584 0 0.0
.text 1248472 1249600 1128 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2271816 2273000 1184 0.1
.bss 172508 172508 0 0.0
.data 5576 5576 0 0.0
.heap 858360 858360 0 0.0
.text 1234416 1235600 1184 0.1
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2247712 2248832 1120 0.0
.bss 171388 171388 0 0.0
.data 5568 5568 0 0.0
.heap 859488 859488 0 0.0
.text 1210312 1211432 1120 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) 2049456 2050640 1184 0.1
.bss 156160 156160 0 0.0
.data 4968 4968 0 0.0
.heap 875320 875320 0 0.0
.text 1012056 1013240 1184 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862251 863703 1452 0.2
bss 110916 110916 0 0.0
rodata 95932 96504 572 0.6
text 579768 580648 880 0.2
nrf52840dk_nrf52840+rpc (read/write) 824623 826075 1452 0.2
bss 107272 107272 0 0.0
rodata 87120 87692 572 0.7
text 553940 554816 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 787294 788742 1448 0.2
bss 112292 112292 0 0.0
rodata 91192 91760 568 0.6
text 509236 510116 880 0.2
lock-app nrf52840dk_nrf52840 (read/write) 837651 839103 1452 0.2
bss 109940 109940 0 0.0
rodata 92404 92976 572 0.6
text 559868 560744 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 762954 764390 1436 0.2
bss 111352 111352 0 0.0
rodata 87708 88280 572 0.7
text 489428 490304 876 0.2
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) 843759 845211 1452 0.2
bss 110080 110080 0 0.0
rodata 94112 94684 572 0.6
text 564048 564924 876 0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 837351 838803 1452 0.2
bss 109976 109976 0 0.0
rodata 92360 92932 572 0.6
text 559488 560364 876 0.2
shell nrf52840dk_nrf52840 (read/write) 776239 777691 1452 0.2
bss 109004 109004 0 0.0
rodata 72516 73088 572 0.8
text 520124 521000 876 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 691294 692746 1452 0.2
bss 109988 109988 0 0.0
rodata 67160 67732 572 0.9
text 440732 441608 876 0.2
p6 all-clusters-app default (read/write) 2294360 2295208 848 0.0
.bss 112632 112632 0 0.0
.data 2520 2520 0 0.0
.heap 918192 918192 0 0.0
.text 1252624 1253472 848 0.1
lock-app default (read/write) 2211784 2212632 848 0.0
.bss 101248 101248 0 0.0
.data 2400 2400 0 0.0
.heap 929696 929696 0 0.0
.text 1170048 1170896 848 0.1
qpg lighting-app qpg6100+debug (read only) 491504 492768 1264 0.3
(read/write) 114144 114144 0 0.0
.bss 50592 50592 0 0.0
.data 1008 1008 0 0.0
.text 486184 487448 1264 0.3
lock-app qpg6100+debug (read only) 466436 467700 1264 0.3
(read/write) 114140 114140 0 0.0
.bss 49528 49528 0 0.0
.data 964 964 0 0.0
.text 461116 462380 1264 0.3
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 765206 766814 1608 0.2
bss 79428 79428 0 0.0
noinit 37160 37160 0 0.0
text 530008 531016 1008 0.2

@kghost
Copy link
Contributor

kghost commented Nov 16, 2021

Glad to see we are moving this direction. Using CRTP may save us several hundred bytes memory, but its complexity and error prone is not fitting for the reference SDK of CHIP.

@andy31415
Copy link
Contributor

fast track: this is generally a refactor for vtable/crtp change. It should not affect functionality. PR has been up for sufficient time for cross-timezone review.

@andy31415 andy31415 merged commit 09f38cd into project-chip:master Nov 17, 2021
@harimau-qirex harimau-qirex deleted the remove-confmgr-crtp branch November 17, 2021 16:26
kpschoedel pushed a commit to kpschoedel/connectedhomeip that referenced this pull request Nov 18, 2021
* Explicitly add the config value methods to the generic configuration manager's as a protected interface.

Add the config class as a template parameter.

* Remove the ImplClass from the GenericConfigurationManagerImpl template.

* Minor cleanup.

* Restyling with clang-format.

* Apply the same changes to the other platforms.

* Fix Linux with the same changes.

* Fix remaining platforms.

* Remove the Key namespacing since it's already defined in the superclass.

This fixes the doxygen generation.

* Remove the explicit template definitions.
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.

5 participants