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

Make "contains" take a const argument in intrusive list #13348

Conversation

andy31415
Copy link
Contributor

Problem

Accepting a const input argument seems less restrictive than the non-const version.

Change overview

Change contains argument to be a const pointer, add unit test for contains working.

Testing

Ran unit tests, compiles and passes.

@github-actions
Copy link

github-actions bot commented Jan 6, 2022

PR #13348: Size comparison from 4972181 to 17bbf3e

Full report (29 builds for efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4972181 17bbf3e change % change
efr32 lighting-app BRD4161A (read only) 829396 829396 0 0.0
(read/write) 127068 127068 0 0.0
.bss 125192 125192 0 0.0
.data 1876 1876 0 0.0
.text 829388 829388 0 0.0
BRD4161A+rpc (read only) 816576 816576 0 0.0
(read/write) 143736 143736 0 0.0
.bss 141760 141760 0 0.0
.data 1976 1976 0 0.0
.text 816568 816568 0 0.0
window-app BRD4161A (read only) 802844 802844 0 0.0
(read/write) 126008 126008 0 0.0
.bss 124176 124176 0 0.0
.data 1832 1832 0 0.0
.text 802836 802836 0 0.0
k32w light k32w061+release (read/write) 648472 648472 0 0.0
.bss 76216 76216 0 0.0
.data 1904 1904 0 0.0
.text 564552 564552 0 0.0
lock k32w061+release (read/write) 633296 633296 0 0.0
.bss 75928 75928 0 0.0
.data 1860 1860 0 0.0
.text 549708 549708 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7011468 7011468 0 0.0
(read/write) 324849 324849 0 0.0
.bss 54209 54209 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208968 208968 0 0.0
.dynamic 560 560 0 0.0
.got 56888 56888 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 383108 383108 0 0.0
.text 5936084 5936084 0 0.0
thermostat-no-ble arm64 (read only) 2024348 2024348 0 0.0
(read/write) 144049 144049 0 0.0
.bss 64001 64001 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 560 560 0 0.0
.got 3936 3936 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128524 128524 0 0.0
.text 1683152 1683152 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2346288 2346288 0 0.0
.bss 188548 188548 0 0.0
.data 5312 5312 0 0.0
.text 1308864 1308864 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2329208 2329208 0 0.0
.bss 180624 180624 0 0.0
.data 5552 5552 0 0.0
.text 1291808 1291808 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302368 2302368 0 0.0
.bss 179672 179672 0 0.0
.data 5544 5544 0 0.0
.text 1264968 1264968 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2053888 2053888 0 0.0
.bss 156972 156972 0 0.0
.data 4864 4864 0 0.0
.text 1016488 1016488 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 935763 935763 0 0.0
bss 118188 118188 0 0.0
rodata 108048 108048 0 0.0
text 631948 631948 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 921187 921187 0 0.0
bss 115232 115232 0 0.0
rodata 100488 100488 0 0.0
text 627300 627300 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 846706 846706 0 0.0
bss 116080 116080 0 0.0
rodata 101220 101220 0 0.0
text 548888 548888 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 907875 907875 0 0.0
bss 117376 117376 0 0.0
rodata 103320 103320 0 0.0
text 609820 609820 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 819046 819046 0 0.0
bss 115296 115296 0 0.0
rodata 96544 96544 0 0.0
text 526796 526796 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 909151 909151 0 0.0
bss 117136 117136 0 0.0
rodata 103532 103532 0 0.0
text 611032 611032 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 905987 905987 0 0.0
bss 117164 117164 0 0.0
rodata 102792 102792 0 0.0
text 608568 608568 0 0.0
shell nrf52840dk_nrf52840 (read/write) 796843 796843 0 0.0
bss 109536 109536 0 0.0
rodata 78188 78188 0 0.0
text 532664 532664 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 709670 709670 0 0.0
bss 107424 107424 0 0.0
rodata 72492 72492 0 0.0
text 450340 450340 0 0.0
p6 all-clusters-app default (read/write) 2401288 2401288 0 0.0
.bss 116748 116748 0 0.0
.data 2592 2592 0 0.0
.text 1359552 1359552 0 0.0
light-app default (read/write) 2324568 2324568 0 0.0
.bss 105872 105872 0 0.0
.data 2384 2384 0 0.0
.text 1282832 1282832 0 0.0
lock-app default (read/write) 2296768 2296768 0 0.0
.bss 104752 104752 0 0.0
.data 2336 2336 0 0.0
.text 1255032 1255032 0 0.0
qpg lighting-app qpg6105+debug (read only) 531664 531664 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86672 86672 0 0.0
.data 1004 1004 0 0.0
.text 526344 526344 0 0.0
lock-app qpg6105+debug (read only) 503444 503444 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85808 85808 0 0.0
.data 952 952 0 0.0
.text 498124 498124 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 832242 832242 0 0.0
bss 86856 86856 0 0.0
noinit 37160 37160 0 0.0
text 580682 580682 0 0.0

@andy31415
Copy link
Contributor Author

/rebase

@woody-apple woody-apple force-pushed the const_correct_intrusive_iterator branch from 17bbf3e to 2f52ffa Compare January 6, 2022 21:44
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

PR #13348: Size comparison from fca97a3 to 2f52ffa

Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section fca97a3 2f52ffa change % change
efr32 lighting-app BRD4161A (read only) 830528 830528 0 0.0
(read/write) 127096 127096 0 0.0
.bss 125216 125216 0 0.0
.data 1876 1876 0 0.0
.text 830520 830520 0 0.0
BRD4161A+rpc (read only) 817708 817708 0 0.0
(read/write) 143752 143752 0 0.0
.bss 141776 141776 0 0.0
.data 1976 1976 0 0.0
.text 817700 817700 0 0.0
window-app BRD4161A (read only) 803960 803960 0 0.0
(read/write) 126032 126032 0 0.0
.bss 124200 124200 0 0.0
.data 1832 1832 0 0.0
.text 803952 803952 0 0.0
esp32 all-clusters-app c3devkit (read only) 891298 891298 0 0.0
(read/write) 1314178 1314178 0 0.0
.dram0.bss 69552 69552 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 177336 177336 0 0.0
.flash.text 891298 891298 0 0.0
.iram0.text 62254 62254 0 0.0
m5stack (read only) 946699 946699 0 0.0
(read/write) 440928 440928 0 0.0
.dram0.bss 72232 72232 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 203624 203624 0 0.0
.flash.text 941315 941315 0 0.0
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 649288 649288 0 0.0
.bss 76240 76240 0 0.0
.data 1904 1904 0 0.0
.text 565344 565344 0 0.0
lock k32w061+release (read/write) 634104 634104 0 0.0
.bss 75944 75944 0 0.0
.data 1860 1860 0 0.0
.text 550500 550500 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7033996 7033996 0 0.0
(read/write) 325073 325073 0 0.0
.bss 54241 54241 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 209064 209064 0 0.0
.dynamic 560 560 0 0.0
.got 56992 56992 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 384292 384292 0 0.0
.text 5956932 5956932 0 0.0
thermostat-no-ble arm64 (read only) 2026956 2026956 0 0.0
(read/write) 144193 144193 0 0.0
.bss 64033 64033 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72392 72392 0 0.0
.dynamic 560 560 0 0.0
.got 3952 3952 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128844 128844 0 0.0
.text 1685200 1685200 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2348264 2348264 0 0.0
.bss 188812 188812 0 0.0
.data 5312 5312 0 0.0
.text 1310840 1310840 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330160 2330160 0 0.0
.bss 180632 180632 0 0.0
.data 5552 5552 0 0.0
.text 1292760 1292760 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303312 2303312 0 0.0
.bss 179680 179680 0 0.0
.data 5544 5544 0 0.0
.text 1265912 1265912 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054200 2054200 0 0.0
.bss 156972 156972 0 0.0
.data 4864 4864 0 0.0
.text 1016800 1016800 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 936687 936687 0 0.0
bss 118208 118208 0 0.0
rodata 108220 108220 0 0.0
text 632700 632700 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 922147 922147 0 0.0
bss 115252 115252 0 0.0
rodata 100664 100664 0 0.0
text 628052 628052 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 847666 847666 0 0.0
bss 116100 116100 0 0.0
rodata 101396 101396 0 0.0
text 549640 549640 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 908831 908831 0 0.0
bss 117396 117396 0 0.0
rodata 103492 103492 0 0.0
text 610576 610576 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 820006 820006 0 0.0
bss 115316 115316 0 0.0
rodata 96720 96720 0 0.0
text 527552 527552 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 910111 910111 0 0.0
bss 117156 117156 0 0.0
rodata 103708 103708 0 0.0
text 611788 611788 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 906911 906911 0 0.0
bss 117184 117184 0 0.0
rodata 102964 102964 0 0.0
text 609324 609324 0 0.0
shell nrf52840dk_nrf52840 (read/write) 797543 797543 0 0.0
bss 109680 109680 0 0.0
rodata 78188 78188 0 0.0
text 533180 533180 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 710362 710362 0 0.0
bss 107568 107568 0 0.0
rodata 72492 72492 0 0.0
text 450860 450860 0 0.0
p6 all-clusters-app default (read/write) 2403672 2403672 0 0.0
.bss 117020 117020 0 0.0
.data 2592 2592 0 0.0
.text 1361936 1361936 0 0.0
light-app default (read/write) 2325656 2325656 0 0.0
.bss 105888 105888 0 0.0
.data 2384 2384 0 0.0
.text 1283920 1283920 0 0.0
lock-app default (read/write) 2297856 2297856 0 0.0
.bss 104768 104768 0 0.0
.data 2336 2336 0 0.0
.text 1256120 1256120 0 0.0
qpg lighting-app qpg6105+debug (read only) 532452 532452 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86696 86696 0 0.0
.data 1004 1004 0 0.0
.text 527132 527132 0 0.0
lock-app qpg6105+debug (read only) 504232 504232 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85832 85832 0 0.0
.data 952 952 0 0.0
.text 498912 498912 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 834110 834110 0 0.0
bss 87020 87020 0 0.0
noinit 37160 37160 0 0.0
text 582188 582188 0 0.0

@bzbarsky-apple
Copy link
Contributor

/rebase

@woody-apple woody-apple force-pushed the const_correct_intrusive_iterator branch from 2f52ffa to b4406e4 Compare January 8, 2022 06:47
@github-actions
Copy link

github-actions bot commented Jan 8, 2022

PR #13348: Size comparison from 5d0c314 to b4406e4

Increases (2 builds for linux)
platform target config section 5d0c314 b4406e4 change % change
linux chip-tool-ipv6only arm64 (read only) 7056652 7056700 48 0.0
.text 5978228 5978276 48 0.0
thermostat-no-ble arm64 (read only) 2033804 2033868 64 0.0
.text 1691168 1691232 64 0.0
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 5d0c314 b4406e4 change % change
efr32 lighting-app BRD4161A (read only) 829244 829244 0 0.0
(read/write) 126996 126996 0 0.0
.bss 125120 125120 0 0.0
.data 1876 1876 0 0.0
.text 829236 829236 0 0.0
BRD4161A+rpc (read only) 816888 816888 0 0.0
(read/write) 143656 143656 0 0.0
.bss 141680 141680 0 0.0
.data 1976 1976 0 0.0
.text 816880 816880 0 0.0
window-app BRD4161A (read only) 802692 802692 0 0.0
(read/write) 125936 125936 0 0.0
.bss 124104 124104 0 0.0
.data 1832 1832 0 0.0
.text 802684 802684 0 0.0
esp32 all-clusters-app c3devkit (read only) 891904 891904 0 0.0
(read/write) 1314010 1314010 0 0.0
.dram0.bss 69464 69464 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 177248 177248 0 0.0
.flash.text 891904 891904 0 0.0
.iram0.text 62254 62254 0 0.0
m5stack (read only) 951843 951843 0 0.0
(read/write) 445592 445592 0 0.0
.dram0.bss 73960 73960 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 206560 206560 0 0.0
.flash.text 946459 946459 0 0.0
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 655324 655324 0 0.0
.bss 76776 76776 0 0.0
.data 1848 1848 0 0.0
.text 570900 570900 0 0.0
lock k32w061+release (read/write) 659616 659616 0 0.0
.bss 77072 77072 0 0.0
.data 1868 1868 0 0.0
.text 574876 574876 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7056652 7056700 48 0.0
(read/write) 326113 326113 0 0.0
.bss 54865 54865 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 209392 209392 0 0.0
.dynamic 560 560 0 0.0
.got 57072 57072 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 384564 384564 0 0.0
.text 5978228 5978276 48 0.0
thermostat-no-ble arm64 (read only) 2033804 2033868 64 0.0
(read/write) 145089 145089 0 0.0
.bss 64657 64657 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72624 72624 0 0.0
.dynamic 560 560 0 0.0
.got 4000 4000 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128988 128988 0 0.0
.text 1691168 1691232 64 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2348560 2348560 0 0.0
.bss 188724 188724 0 0.0
.data 5312 5312 0 0.0
.text 1311136 1311136 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330752 2330752 0 0.0
.bss 180544 180544 0 0.0
.data 5552 5552 0 0.0
.text 1293352 1293352 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303904 2303904 0 0.0
.bss 179592 179592 0 0.0
.data 5544 5544 0 0.0
.text 1266504 1266504 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054256 2054256 0 0.0
.bss 157060 157060 0 0.0
.data 4864 4864 0 0.0
.text 1016856 1016856 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 937115 937115 0 0.0
bss 118112 118112 0 0.0
rodata 108120 108120 0 0.0
text 633324 633324 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 923511 923511 0 0.0
bss 115156 115156 0 0.0
rodata 101548 101548 0 0.0
text 628636 628636 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 848094 848094 0 0.0
bss 116004 116004 0 0.0
rodata 101296 101296 0 0.0
text 550256 550256 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 909259 909259 0 0.0
bss 117300 117300 0 0.0
rodata 103392 103392 0 0.0
text 611188 611188 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 820418 820418 0 0.0
bss 115220 115220 0 0.0
rodata 96620 96620 0 0.0
text 528164 528164 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 542351 542351 0 0.0
bss 52588 52588 0 0.0
rodata 50668 50668 0 0.0
text 376892 376892 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 910523 910523 0 0.0
bss 117060 117060 0 0.0
rodata 103608 103608 0 0.0
text 612404 612404 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 907339 907339 0 0.0
bss 117088 117088 0 0.0
rodata 102864 102864 0 0.0
text 609936 609936 0 0.0
shell nrf52840dk_nrf52840 (read/write) 797935 797935 0 0.0
bss 109768 109768 0 0.0
rodata 78148 78148 0 0.0
text 533508 533508 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 710750 710750 0 0.0
bss 107656 107656 0 0.0
rodata 72448 72448 0 0.0
text 451188 451188 0 0.0
p6 all-clusters-app default (read/write) 2401656 2401656 0 0.0
.bss 116804 116804 0 0.0
.data 2592 2592 0 0.0
.text 1359920 1359920 0 0.0
light-app default (read/write) 2323680 2323680 0 0.0
.bss 105672 105672 0 0.0
.data 2384 2384 0 0.0
.text 1281944 1281944 0 0.0
lock-app default (read/write) 2295904 2295904 0 0.0
.bss 104552 104552 0 0.0
.data 2336 2336 0 0.0
.text 1254168 1254168 0 0.0
qpg lighting-app qpg6105+debug (read only) 533192 533192 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86624 86624 0 0.0
.data 1004 1004 0 0.0
.text 527872 527872 0 0.0
lock-app qpg6105+debug (read only) 504968 504968 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85760 85760 0 0.0
.data 952 952 0 0.0
.text 499648 499648 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 834522 834522 0 0.0
bss 86924 86924 0 0.0
noinit 37160 37160 0 0.0
text 582766 582766 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit b7ff37e into project-chip:master Jan 8, 2022
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
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