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

Use safe System::Clock types for system timers #10779

Merged
merged 2 commits into from
Oct 21, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

Timer functions take plain integer arguments and rely on callers to
get the units correct.

Part of #10062 Some operations on System::Clock types are not safe

Change overview

Change System::Layer and PlatformManager timers to take
System::Clock::Timeout instead of plain integers.

This change primarily converts arguments at call sites by wrapping
with a Clock::Milliseconds32() constructor or similar operation.
Future changes will convert types further up the call stack.

Also removed IsEarlier() and AddOffset() in favour of ‘<’ and ‘+’, given the 64/32-bit non-overflow guarantee introduced in commit 0fd7520.

Testing

CI; no change to functionality intended.

#### Problem

Timer functions take plain integer arguments and rely on callers to
get the units correct.

Part of project-chip#10062 _Some operations on System::Clock types are not safe_

#### Change overview

Change `System::Layer` and `PlatformManager` timers to take
`System::Clock::Timeout` instead of plain integers.

This change primarily converts arguments at call sites by wrapping
with a `Clock::Milliseconds32()` constructor or similar operation.
Future changes will convert types further up the call stack.

#### Testing

CI; no change to functionality intended.
@kpschoedel
Copy link
Contributor Author

kpschoedel commented Oct 21, 2021

PR #10779: Size comparison from 288d42a to bc64f81

Increases (8 builds for linux)
platform target config section 288d42a0 bc64f81 change % change
linux all-clusters-app debug .rodata 136245 136277 32 0.0
.text 1341378 1344770 3392 0.3
bridge-app debug+rpc .text 1050485 1053701 3216 0.3
chip-tool debug .text 3456773 3459893 3120 0.1
lighting-app debug+rpc .text 1250674 1253970 3296 0.3
ota-provider-app debug .text 1009346 1012626 3280 0.3
ota-requestor-app debug .text 1129250 1132514 3264 0.3
shell debug .text 569778 572786 3008 0.5
tv-app debug .text 1443842 1447218 3376 0.2
Decreases (11 builds for efr32, mbed, p6, qpg, telink)
platform target config section 288d42a0 bc64f81 change % change
efr32 lighting-app BRD4161A .text 783016 782840 -176 -0.0
BRD4161A+rpc .text 762732 762556 -176 -0.0
lock-app BRD4161A .text 762152 761976 -176 -0.0
window-app BRD4161A .text 763068 762892 -176 -0.0
mbed lighting-app CY8CPROTO_062_4343W+release .text 1220280 1220152 -128 -0.0
lock-app CY8CPROTO_062_4343W+release .text 1198176 1198048 -128 -0.0
p6 lock-app default .text 1126664 1126488 -176 -0.0
1126664 1126488 -176 -0.0
qpg lighting-app qpg6100+debug .text 486716 486596 -120 -0.0
486716 486596 -120 -0.0
lock-app qpg6100+debug .text 462792 462672 -120 -0.0
462792 462672 -120 -0.0
persistent-storage-app qpg6100+debug .text 102732 102604 -128 -0.1
102732 102604 -128 -0.1
telink lighting-app tlsr9518adk80d text 458412 458228 -184 -0.0
458412 458228 -184 -0.0
Full report (19 builds for efr32, linux, mbed, p6, qpg, telink)
platform target config section 288d42a0 bc64f81 change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 783016 782840 -176 -0.0
BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762732 762556 -176 -0.0
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 762152 761976 -176 -0.0
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 763068 762892 -176 -0.0
linux all-clusters-app debug .bss 52176 52176 0 0.0
.data 978 978 0 0.0
.data.rel.ro 59072 59072 0 0.0
.dynamic 592 592 0 0.0
.got 4080 4080 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 136245 136277 32 0.0
.text 1341378 1344770 3392 0.3
bridge-app debug+rpc .bss 52880 52880 0 0.0
.data 976 976 0 0.0
.data.rel.ro 25784 25784 0 0.0
.dynamic 592 592 0 0.0
.got 3944 3944 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110620 110620 0 0.0
.text 1050485 1053701 3216 0.3
chip-tool debug .bss 17520 17520 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 91920 91920 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 184004 184004 0 0.0
.text 3456773 3459893 3120 0.1
lighting-app debug+rpc .bss 42200 42200 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 52496 52496 0 0.0
.dynamic 608 608 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127793 127793 0 0.0
.text 1250674 1253970 3296 0.3
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 23176 23176 0 0.0
.dynamic 592 592 0 0.0
.got 4008 4008 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110024 110024 0 0.0
.text 1009346 1012626 3280 0.3
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128776 128776 0 0.0
.text 1129250 1132514 3264 0.3
shell debug .bss 16072 16072 0 0.0
.data 242 242 0 0.0
.data.rel.ro 35120 35120 0 0.0
.dynamic 592 592 0 0.0
.got 3496 3496 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 71823 71823 0 0.0
.text 569778 572786 3008 0.5
tv-app debug .bss 216560 216560 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 56096 56096 0 0.0
.dynamic 592 592 0 0.0
.got 4400 4400 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 153384 153384 0 0.0
.text 1443842 1447218 3376 0.2
mbed lighting-app CY8CPROTO_062_4343W+release .bss 172092 172092 0 0.0
.data 5464 5464 0 0.0
.heap 858888 858888 0 0.0
.text 1220280 1220152 -128 -0.0
lock-app CY8CPROTO_062_4343W+release .bss 171012 171012 0 0.0
.data 5432 5432 0 0.0
.heap 860000 860000 0 0.0
.text 1198176 1198048 -128 -0.0
p6 lock-app default .bss 68208 68208 0 0.0
68208 68208 0 0.0
.data 2416 2416 0 0.0
2416 2416 0 0.0
.heap 962720 962720 0 0.0
962720 962720 0 0.0
.text 1126664 1126488 -176 -0.0
1126664 1126488 -176 -0.0
qpg lighting-app qpg6100+debug .bss 53552 53552 0 0.0
53552 53552 0 0.0
.data 996 996 0 0.0
996 996 0 0.0
.text 486716 486596 -120 -0.0
486716 486596 -120 -0.0
lock-app qpg6100+debug .bss 52496 52496 0 0.0
52496 52496 0 0.0
.data 952 952 0 0.0
952 952 0 0.0
.text 462792 462672 -120 -0.0
462792 462672 -120 -0.0
persistent-storage-app qpg6100+debug .bss 17778 17778 0 0.0
17778 17778 0 0.0
.data 280 280 0 0.0
280 280 0 0.0
.text 102732 102604 -128 -0.1
102732 102604 -128 -0.1
telink lighting-app tlsr9518adk80d bss 70992 70992 0 0.0
70992 70992 0 0.0
noinit 33216 33216 0 0.0
33216 33216 0 0.0
text 458412 458228 -184 -0.0
458412 458228 -184 -0.0

@kpschoedel
Copy link
Contributor Author

kpschoedel commented Oct 21, 2021

PR #10779: Size comparison from 288d42a to bc64f81

Increases (8 builds for linux)
platform target config section 288d42a0 bc64f81 change % change
linux all-clusters-app debug .rodata 136245 136277 32 0.0
.text 1341378 1344770 3392 0.3
chip-tool debug .text 3456773 3459893 3120 0.1
ota-provider-app debug .text 1009346 1012626 3280 0.3
ota-requestor-app debug .text 1129250 1132514 3264 0.3
shell debug .text 569778 572786 3008 0.5
tv-app debug .text 1443842 1447218 3376 0.2
bridge-app debug+rpc .text 1050485 1053701 3216 0.3
lighting-app debug+rpc .text 1250674 1253970 3296 0.3
Decreases (9 builds for efr32, p6, qpg, telink)
platform target config section 288d42a0 bc64f81 change % change
efr32 lighting-app BRD4161A .text 783016 782840 -176 -0.0
lock-app BRD4161A .text 762152 761976 -176 -0.0
window-app BRD4161A .text 763068 762892 -176 -0.0
lighting-app BRD4161A+rpc .text 762732 762556 -176 -0.0
p6 lock-app default .text 1126664 1126488 -176 -0.0
qpg lighting-app qpg6100+debug .text 486716 486596 -120 -0.0
lock-app qpg6100+debug .text 462792 462672 -120 -0.0
persistent-storage-app qpg6100+debug .text 102732 102604 -128 -0.1
telink lighting-app tlsr9518adk80d text 458412 458228 -184 -0.0
Full report (17 builds for efr32, linux, p6, qpg, telink)
platform target config section 288d42a0 bc64f81 change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 783016 782840 -176 -0.0
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 762152 761976 -176 -0.0
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 763068 762892 -176 -0.0
lighting-app BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762732 762556 -176 -0.0
linux all-clusters-app debug .bss 52176 52176 0 0.0
.data 978 978 0 0.0
.data.rel.ro 59072 59072 0 0.0
.dynamic 592 592 0 0.0
.got 4080 4080 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 136245 136277 32 0.0
.text 1341378 1344770 3392 0.3
chip-tool debug .bss 17520 17520 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 91920 91920 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 184004 184004 0 0.0
.text 3456773 3459893 3120 0.1
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 23176 23176 0 0.0
.dynamic 592 592 0 0.0
.got 4008 4008 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110024 110024 0 0.0
.text 1009346 1012626 3280 0.3
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128776 128776 0 0.0
.text 1129250 1132514 3264 0.3
shell debug .bss 16072 16072 0 0.0
.data 242 242 0 0.0
.data.rel.ro 35120 35120 0 0.0
.dynamic 592 592 0 0.0
.got 3496 3496 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 71823 71823 0 0.0
.text 569778 572786 3008 0.5
tv-app debug .bss 216560 216560 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 56096 56096 0 0.0
.dynamic 592 592 0 0.0
.got 4400 4400 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 153384 153384 0 0.0
.text 1443842 1447218 3376 0.2
bridge-app debug+rpc .bss 52880 52880 0 0.0
.data 976 976 0 0.0
.data.rel.ro 25784 25784 0 0.0
.dynamic 592 592 0 0.0
.got 3944 3944 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110620 110620 0 0.0
.text 1050485 1053701 3216 0.3
lighting-app debug+rpc .bss 42200 42200 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 52496 52496 0 0.0
.dynamic 608 608 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127793 127793 0 0.0
.text 1250674 1253970 3296 0.3
p6 lock-app default .bss 68208 68208 0 0.0
.data 2416 2416 0 0.0
.heap 962720 962720 0 0.0
.text 1126664 1126488 -176 -0.0
qpg lighting-app qpg6100+debug .bss 53552 53552 0 0.0
.data 996 996 0 0.0
.text 486716 486596 -120 -0.0
lock-app qpg6100+debug .bss 52496 52496 0 0.0
.data 952 952 0 0.0
.text 462792 462672 -120 -0.0
persistent-storage-app qpg6100+debug .bss 17778 17778 0 0.0
.data 280 280 0 0.0
.text 102732 102604 -128 -0.1
telink lighting-app tlsr9518adk80d bss 70992 70992 0 0.0
noinit 33216 33216 0 0.0
text 458412 458228 -184 -0.0

@github-actions
Copy link

github-actions bot commented Oct 21, 2021

PR #10779: Size comparison from 288d42a to bc64f81

15 builds (for efr32, k32w, linux)
platform target config section 288d42a0 bc64f81 change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 783016 782840 -176 -0.0
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 762152 761976 -176 -0.0
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 763068 762892 -176 -0.0
lighting-app BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762732 762556 -176 -0.0
k32w lock-app k32w061+debug .bss 69060 69060 0 0.0
.data 1864 1864 0 0.0
.text 515752 515640 -112 -0.0
shell k32w061+debug .bss 55080 55080 0 0.0
.data 672 672 0 0.0
.text 357384 357272 -112 -0.0
lighting-app k32w061+se05x+release .bss 78584 78584 0 0.0
.data 1900 1900 0 0.0
.text 614536 614392 -144 -0.0
linux all-clusters-app debug .bss 52176 52176 0 0.0
.data 978 978 0 0.0
.data.rel.ro 59072 59072 0 0.0
.dynamic 592 592 0 0.0
.got 4080 4080 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 136245 136277 32 0.0
.text 1341378 1344770 3392 0.3
chip-tool debug .bss 17520 17520 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 91920 91920 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 184004 184004 0 0.0
.text 3456773 3459893 3120 0.1
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 23176 23176 0 0.0
.dynamic 592 592 0 0.0
.got 4008 4008 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110024 110024 0 0.0
.text 1009346 1012626 3280 0.3
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128776 128776 0 0.0
.text 1129250 1132514 3264 0.3
shell debug .bss 16072 16072 0 0.0
.data 242 242 0 0.0
.data.rel.ro 35120 35120 0 0.0
.dynamic 592 592 0 0.0
.got 3496 3496 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 71823 71823 0 0.0
.text 569778 572786 3008 0.5
tv-app debug .bss 216560 216560 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 56096 56096 0 0.0
.dynamic 592 592 0 0.0
.got 4400 4400 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 153384 153384 0 0.0
.text 1443842 1447218 3376 0.2
bridge-app debug+rpc .bss 52880 52880 0 0.0
.data 976 976 0 0.0
.data.rel.ro 25784 25784 0 0.0
.dynamic 592 592 0 0.0
.got 3944 3944 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110620 110620 0 0.0
.text 1050485 1053701 3216 0.3
lighting-app debug+rpc .bss 42200 42200 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 52496 52496 0 0.0
.dynamic 608 608 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127793 127793 0 0.0
.text 1250674 1253970 3296 0.3
12 builds (for esp32, nrfconnect)
platform target config section 288d42a0 bc64f81 change % change
esp32 all-clusters-app c3devkit .dram0.bss 60288 60288 0 0.0
.dram0.data 16200 16200 0 0.0
.flash.rodata 199128 199128 0 0.0
.flash.text 872942 872746 -196 -0.0
.iram0.text 57330 57330 0 0.0
m5stack .dram0.bss 62792 62792 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 207872 207872 0 0.0
.flash.text 904011 903759 -252 -0.0
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 113172 113172 0 0.0
rodata 97780 97780 0 0.0
text 577864 577736 -128 -0.0
lock-app nrf52840dk_nrf52840 bss 112240 112240 0 0.0
rodata 94116 94116 0 0.0
text 559352 559224 -128 -0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 112308 112308 0 0.0
rodata 95096 95096 0 0.0
text 562504 562380 -124 -0.0
pump-controller-app nrf52840dk_nrf52840 bss 112248 112248 0 0.0
rodata 94176 94176 0 0.0
text 559144 559016 -128 -0.0
shell nrf52840dk_nrf52840 bss 109068 109068 0 0.0
rodata 71644 71644 0 0.0
text 519084 518956 -128 -0.0
lighting-app nrf52840dk_nrf52840+rpc bss 109416 109416 0 0.0
rodata 88564 88564 0 0.0
text 551064 550936 -128 -0.0
nrf5340dk_nrf5340_cpuapp bss 114548 114548 0 0.0
rodata 93020 93020 0 0.0
text 507332 507204 -128 -0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 113612 113612 0 0.0
rodata 89376 89376 0 0.0
text 488812 488688 -124 -0.0
shell nrf5340dk_nrf5340_cpuapp bss 110052 110052 0 0.0
rodata 66288 66288 0 0.0
text 439696 439568 -128 -0.0

@andy31415
Copy link
Contributor

Fast track rationale: code refactoring adding an explicit cast - trivial refactoring.

@kpschoedel - merge conflicts before this can be merged.

@github-actions
Copy link

github-actions bot commented Oct 21, 2021

PR #10779: Size comparison from 1b9ac5f to 607c4d8

8 builds (for k32w, p6, qpg, telink)
platform target config section 1b9ac5f 607c4d8 change % change
k32w lock-app k32w061+debug .bss 69060 69060 0 0.0
.data 1864 1864 0 0.0
.text 515200 515072 -128 -0.0
shell k32w061+debug .bss 55080 55080 0 0.0
.data 672 672 0 0.0
.text 357416 357288 -128 -0.0
lighting-app k32w061+se05x+release .bss 78584 78584 0 0.0
.data 1900 1900 0 0.0
.text 613984 613840 -144 -0.0
p6 lock-app default .bss 68208 68208 0 0.0
.data 2416 2416 0 0.0
.heap 962720 962720 0 0.0
.text 1126088 1125912 -176 -0.0
qpg lighting-app qpg6100+debug .bss 53552 53552 0 0.0
.data 996 996 0 0.0
.text 486164 486044 -120 -0.0
lock-app qpg6100+debug .bss 52496 52496 0 0.0
.data 952 952 0 0.0
.text 462240 462112 -128 -0.0
persistent-storage-app qpg6100+debug .bss 17778 17778 0 0.0
.data 280 280 0 0.0
.text 102756 102628 -128 -0.1
telink lighting-app tlsr9518adk80d bss 70992 70992 0 0.0
noinit 33216 33216 0 0.0
text 457820 457636 -184 -0.0
14 builds (for efr32, linux, mbed)
platform target config section 1b9ac5f 607c4d8 change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 782424 782232 -192 -0.0
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 761544 761368 -176 -0.0
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 762460 762300 -160 -0.0
lighting-app BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762124 761948 -176 -0.0
linux all-clusters-app debug .bss 52176 52176 0 0.0
.data 978 978 0 0.0
.data.rel.ro 59072 59072 0 0.0
.dynamic 592 592 0 0.0
.got 4080 4080 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 136149 136181 32 0.0
.text 1341346 1344738 3392 0.3
chip-tool debug .bss 17520 17520 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 91984 91984 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 183492 183492 0 0.0
.text 3456277 3459397 3120 0.1
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 23176 23176 0 0.0
.dynamic 592 592 0 0.0
.got 4008 4008 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 109928 109928 0 0.0
.text 1009010 1012290 3280 0.3
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128072 128072 0 0.0
.text 1127554 1130818 3264 0.3
shell debug .bss 16072 16072 0 0.0
.data 242 242 0 0.0
.data.rel.ro 35120 35120 0 0.0
.dynamic 592 592 0 0.0
.got 3496 3496 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 71823 71823 0 0.0
.text 570146 573154 3008 0.5
tv-app debug .bss 216560 216560 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 56096 56096 0 0.0
.dynamic 592 592 0 0.0
.got 4400 4400 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152680 152680 0 0.0
.text 1442370 1445730 3360 0.2
bridge-app debug+rpc .bss 52880 52880 0 0.0
.data 976 976 0 0.0
.data.rel.ro 25784 25784 0 0.0
.dynamic 592 592 0 0.0
.got 3944 3944 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110524 110524 0 0.0
.text 1050277 1053509 3232 0.3
lighting-app debug+rpc .bss 42200 42200 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 52496 52496 0 0.0
.dynamic 608 608 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127697 127697 0 0.0
.text 1250434 1253730 3296 0.3
mbed lighting-app CY8CPROTO_062_4343W+release .bss 172092 172092 0 0.0
.data 5464 5464 0 0.0
.heap 858888 858888 0 0.0
.text 1219728 1219600 -128 -0.0
lock-app CY8CPROTO_062_4343W+release .bss 171012 171012 0 0.0
.data 5432 5432 0 0.0
.heap 860000 860000 0 0.0
.text 1197624 1197432 -192 -0.0
12 builds (for esp32, nrfconnect)
platform target config section 1b9ac5f 607c4d8 change % change
esp32 all-clusters-app c3devkit .dram0.bss 60296 60296 0 0.0
.dram0.data 16432 16432 0 0.0
.flash.rodata 199072 199072 0 0.0
.flash.text 873322 873122 -200 -0.0
.iram0.text 57564 57564 0 0.0
m5stack .dram0.bss 62800 62800 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 207832 207832 0 0.0
.flash.text 904379 904159 -220 -0.0
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 113172 113172 0 0.0
rodata 97740 97740 0 0.0
text 577332 577204 -128 -0.0
lock-app nrf52840dk_nrf52840 bss 112240 112240 0 0.0
rodata 94076 94076 0 0.0
text 558820 558692 -128 -0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 112308 112308 0 0.0
rodata 95056 95056 0 0.0
text 561972 561848 -124 -0.0
pump-controller-app nrf52840dk_nrf52840 bss 112248 112248 0 0.0
rodata 94136 94136 0 0.0
text 558612 558484 -128 -0.0
shell nrf52840dk_nrf52840 bss 109068 109068 0 0.0
rodata 71644 71644 0 0.0
text 519104 518980 -124 -0.0
lighting-app nrf52840dk_nrf52840+rpc bss 109416 109416 0 0.0
rodata 88524 88524 0 0.0
text 550532 550404 -128 -0.0
nrf5340dk_nrf5340_cpuapp bss 114548 114548 0 0.0
rodata 92980 92980 0 0.0
text 506800 506676 -124 -0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 113612 113612 0 0.0
rodata 89336 89336 0 0.0
text 488284 488156 -128 -0.0
shell nrf5340dk_nrf5340_cpuapp bss 110052 110052 0 0.0
rodata 66288 66288 0 0.0
text 439720 439592 -128 -0.0

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from 1b9ac5f

File Section File VM
chip-qpg6100-lighting-example.out .text -120 -120
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,31303
.debug_str,0,5678
.debug_abbrev,0,1157
.debug_line,0,741
.strtab,0,180
.debug_ranges,0,160
[Unmapped],0,120
.debug_loc,0,61
.debug_aranges,0,-24
.symtab,0,-64
.debug_frame,0,-84
.text,-120,-120

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "esp32-example-build" from 1b9ac5f

File Section File VM
chip-all-clusters-app.elf .flash.text -200 -200
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,75262
.debug_str,0,6060
.debug_abbrev,0,4647
[Unmapped],0,200
.strtab,0,180
.debug_ranges,0,120
.riscv.attributes,0,-1
.debug_aranges,0,-24
.symtab,0,-32
.debug_frame,0,-136
.flash.text,-200,-200
.debug_line,0,-395
.debug_loc,0,-429


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 1b9ac5f

File Section File VM
chip-shell.elf device_handles -4 -4
chip-shell.elf text -124 -124
chip-lock.elf text -128 -128
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,22812
.debug_str,0,9079
.debug_loc,0,733
.debug_line,0,556
.debug_abbrev,0,552
.debug_ranges,0,264
.strtab,0,84
device_handles,-4,-4
.debug_aranges,0,-32
.symtab,0,-48
.debug_frame,0,-100
text,-124,-124

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,34244
.debug_str,0,9881
.debug_abbrev,0,1093
.debug_line,0,835
.debug_loc,0,743
.debug_ranges,0,384
.strtab,0,84
.debug_aranges,0,-32
.symtab,0,-48
.debug_frame,0,-100
text,-128,-128


@andy31415 andy31415 merged commit ea1b443 into project-chip:master Oct 21, 2021
@kpschoedel kpschoedel deleted the x10062-clock-type-2-timers branch October 21, 2021 21:56
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.

2 participants