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

Add a max length to cluster-objects typeinfo for string attributes. #14256

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

This lets consumers size buffers based on the spec-defined max length.

Problem

Hard to know what buffer size to use for reading string attributes.

Change overview

Add the spec-defined max length to the metadata we output.

Testing

Code inspection of cluster-objects.h

This lets consumers size buffers based on the spec-defined max length.
@github-actions
Copy link

github-actions bot commented Jan 25, 2022

PR #14256: Size comparison from be9582b to 0acbb6c

Full report (20 builds for cyw30739, efr32, k32w, linux, mbed, p6, qpg, telink)
platform target config section be9582b 0acbb6c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 572258 572258 0 0.0
.app_xip_area 477320 477320 0 0.0
.bss 77684 77684 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 832688 832688 0 0.0
(read/write) 127216 127216 0 0.0
.bss 125312 125312 0 0.0
.data 1900 1900 0 0.0
.text 832680 832680 0 0.0
BRD4161A+rpc (read only) 820068 820068 0 0.0
(read/write) 143872 143872 0 0.0
.bss 141872 141872 0 0.0
.data 2000 2000 0 0.0
.text 820060 820060 0 0.0
window-app BRD4161A (read only) 808864 808864 0 0.0
(read/write) 125872 125872 0 0.0
.bss 124016 124016 0 0.0
.data 1856 1856 0 0.0
.text 808856 808856 0 0.0
k32w light k32w061+release (read/write) 660496 660496 0 0.0
.bss 77456 77456 0 0.0
.data 1868 1868 0 0.0
.text 575372 575372 0 0.0
lock k32w061+release (read/write) 661392 661392 0 0.0
.bss 77720 77720 0 0.0
.data 1892 1892 0 0.0
.text 575980 575980 0 0.0
linux chip-tool-ipv6only arm64 (read only) 8697804 8697804 0 0.0
(read/write) 390817 390817 0 0.0
.bss 56017 56017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 260888 260888 0 0.0
.dynamic 560 560 0 0.0
.got 69040 69040 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 532532 532532 0 0.0
.text 7326532 7326532 0 0.0
thermostat-no-ble arm64 (read only) 2043436 2043436 0 0.0
(read/write) 146625 146625 0 0.0
.bss 65649 65649 0 0.0
.data 904 904 0 0.0
.data.rel.ro 73072 73072 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 320 320 0 0.0
.rodata 130620 130620 0 0.0
.text 1698512 1698512 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2349912 2349912 0 0.0
.bss 189404 189404 0 0.0
.data 5296 5296 0 0.0
.text 1312512 1312512 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2332232 2332232 0 0.0
.bss 180920 180920 0 0.0
.data 5576 5576 0 0.0
.text 1294832 1294832 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302816 2302816 0 0.0
.bss 180824 180824 0 0.0
.data 5568 5568 0 0.0
.text 1265416 1265416 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) 2053896 2053896 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016496 1016496 0 0.0
p6 all-clusters-app default (read/write) 2408048 2408048 0 0.0
.bss 117748 117748 0 0.0
.data 2584 2584 0 0.0
.text 1366312 1366312 0 0.0
light-app default (read/write) 2327768 2327768 0 0.0
.bss 105512 105512 0 0.0
.data 2408 2408 0 0.0
.text 1286032 1286032 0 0.0
lock-app default (read/write) 2297208 2297208 0 0.0
.bss 105256 105256 0 0.0
.data 2360 2360 0 0.0
.text 1255472 1255472 0 0.0
qpg lighting-app qpg6105+debug (read only) 565568 565568 0 0.0
(read/write) 146936 146936 0 0.0
.bss 89656 89656 0 0.0
.data 1060 1060 0 0.0
.text 560248 560248 0 0.0
lock-app qpg6105+debug (read only) 514324 514324 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89128 89128 0 0.0
.data 992 992 0 0.0
.text 509004 509004 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 839534 839534 0 0.0
bss 87460 87460 0 0.0
noinit 37160 37160 0 0.0
text 586050 586050 0 0.0

@andy31415 andy31415 merged commit 3c043ec into project-chip:master Jan 25, 2022
@bzbarsky-apple bzbarsky-apple deleted the string-max-length branch January 25, 2022 23:43
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
…roject-chip#14256)

This lets consumers size buffers based on the spec-defined max length.
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