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 unused emberAfPreCommandReceived callback and some discovery related code #10765

Merged

Conversation

vivien-apple
Copy link
Contributor

Problem

This code is unused and increase the maintenance cost.

Change overview

  • Remove unused code
  • Run codegen

Testing

In theory, all this code is unused so I have runned ./scripts/tests/tests_suites.sh locally to make sure the rest properly works.

@github-actions
Copy link

github-actions bot commented Oct 21, 2021

PR #10765: Size comparison from c4a4361 to f50cd3f

8 builds (for k32w, p6, qpg, telink)
platform target config section c4a4361 f50cd3f change % change
k32w lock-app k32w061+debug .bss 69060 69060 0 0.0
.data 1864 1864 0 0.0
.text 515688 515168 -520 -0.1
shell k32w061+debug .bss 55080 55080 0 0.0
.data 672 672 0 0.0
.text 357336 357336 0 0.0
lighting-app k32w061+se05x+release .bss 78584 78584 0 0.0
.data 1900 1900 0 0.0
.text 614456 613680 -776 -0.1
p6 lock-app default .bss 68208 68208 0 0.0
.data 2416 2416 0 0.0
.heap 962720 962720 0 0.0
.text 1126536 1125992 -544 -0.0
qpg lighting-app qpg6100+debug .bss 53552 53552 0 0.0
.data 996 996 0 0.0
.text 486644 485852 -792 -0.2
lock-app qpg6100+debug .bss 52496 52496 0 0.0
.data 952 952 0 0.0
.text 462712 462192 -520 -0.1
persistent-storage-app qpg6100+debug .bss 17778 17778 0 0.0
.data 280 280 0 0.0
.text 102708 102708 0 0.0
telink lighting-app tlsr9518adk80d bss 70992 70992 0 0.0
noinit 33216 33216 0 0.0
text 458348 457488 -860 -0.2
14 builds (for efr32, linux, mbed)
platform target config section c4a4361 f50cd3f change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 782888 781816 -1072 -0.1
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 762024 761496 -528 -0.1
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 762940 762412 -528 -0.1
lighting-app BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762604 761548 -1056 -0.1
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 136149 -96 -0.1
.text 1341586 1340514 -1072 -0.1
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 183300 -704 -0.4
.text 3456805 3454549 -2256 -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 109928 -96 -0.1
.text 1009586 1008498 -1088 -0.1
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 128072 -704 -0.5
.text 1129490 1127250 -2240 -0.2
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 569906 569906 0 0.0
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 152680 -704 -0.5
.text 1444114 1441890 -2224 -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 110524 -96 -0.1
.text 1050661 1049573 -1088 -0.1
lighting-app debug+rpc .bss 42200 42200 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 52496 52512 16 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 128593 800 0.6
.text 1250898 1246754 -4144 -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 1220152 1219408 -744 -0.1
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 1198048 1197560 -488 -0.0
12 builds (for esp32, nrfconnect)
platform target config section c4a4361 f50cd3f change % change
esp32 all-clusters-app c3devkit .dram0.bss 60320 60320 0 0.0
.dram0.data 16200 16200 0 0.0
.flash.rodata 199128 199032 -96 -0.0
.flash.text 872850 872294 -556 -0.1
.iram0.text 57330 57330 0 0.0
m5stack .dram0.bss 62824 62824 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 207872 207784 -88 -0.0
.flash.text 903827 903295 -532 -0.1
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 112476 112476 0 0.0
rodata 97780 97740 -40 -0.0
text 577800 577060 -740 -0.1
lock-app nrf52840dk_nrf52840 bss 111544 111544 0 0.0
rodata 94116 94076 -40 -0.0
text 559288 558808 -480 -0.1
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 111612 111612 0 0.0
rodata 95096 95056 -40 -0.0
text 562440 561964 -476 -0.1
pump-controller-app nrf52840dk_nrf52840 bss 111552 111552 0 0.0
rodata 94176 94136 -40 -0.0
text 559080 558600 -480 -0.1
shell nrf52840dk_nrf52840 bss 107316 107316 0 0.0
rodata 71644 71644 0 0.0
text 519032 519032 0 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 108720 108720 0 0.0
rodata 88564 88524 -40 -0.0
text 551000 550260 -740 -0.1
nrf5340dk_nrf5340_cpuapp bss 113852 113852 0 0.0
rodata 93020 92980 -40 -0.0
text 507264 506524 -740 -0.1
lock-app nrf5340dk_nrf5340_cpuapp bss 112916 112916 0 0.0
rodata 89376 89336 -40 -0.0
text 488744 488268 -476 -0.1
shell nrf5340dk_nrf5340_cpuapp bss 108300 108300 0 0.0
rodata 66288 66288 0 0.0
text 439632 439632 0 0.0

@vivien-apple vivien-apple force-pushed the ZAP_RemoveSomeUnusedCode branch from f50cd3f to 4698cdc Compare October 21, 2021 15:55
@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from b5ad57f

File Section File VM
chip-qpg6100-lighting-example.out .text -520 -520
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
[Unmapped],0,520
.shstrtab,0,-1
.debug_aranges,0,-32
.debug_ranges,0,-32
.debug_abbrev,0,-75
.debug_frame,0,-84
.symtab,0,-160
.strtab,0,-195
.debug_line,0,-275
.debug_loc,0,-423
.text,-520,-520
.debug_str,0,-632
.debug_info,0,-1827

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

github-actions bot commented Oct 21, 2021

PR #10765: Size comparison from b5ad57f to 4698cdc

22 builds (for efr32, k32w, linux, mbed, p6, qpg, telink)
platform target config section b5ad57f 4698cdc change % change
efr32 lighting-app BRD4161A .bss 118028 118028 0 0.0
.data 1800 1800 0 0.0
.text 783016 782488 -528 -0.1
lock-app BRD4161A .bss 115884 115884 0 0.0
.data 1760 1760 0 0.0
.text 762152 761624 -528 -0.1
window-app BRD4161A .bss 116204 116204 0 0.0
.data 1764 1764 0 0.0
.text 763068 762540 -528 -0.1
lighting-app BRD4161A+rpc .bss 131356 131356 0 0.0
.data 1852 1852 0 0.0
.text 762732 762204 -528 -0.1
k32w lock-app k32w061+debug .bss 69060 69060 0 0.0
.data 1864 1864 0 0.0
.text 515752 515232 -520 -0.1
shell k32w061+debug .bss 55080 55080 0 0.0
.data 672 672 0 0.0
.text 357384 357384 0 0.0
lighting-app k32w061+se05x+release .bss 78584 78584 0 0.0
.data 1900 1900 0 0.0
.text 614536 614016 -520 -0.1
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 136149 -96 -0.1
.text 1341378 1340290 -1088 -0.1
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 183300 -704 -0.4
.text 3456773 3454517 -2256 -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 109928 -96 -0.1
.text 1009346 1008258 -1088 -0.1
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 128072 -704 -0.5
.text 1129250 1126994 -2256 -0.2
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 569778 0 0.0
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 152680 -704 -0.5
.text 1443842 1441618 -2224 -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 110524 -96 -0.1
.text 1050485 1049397 -1088 -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 127697 -96 -0.1
.text 1250674 1249586 -1088 -0.1
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 1219792 -488 -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 1197624 -552 -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 1126664 1126120 -544 -0.0
qpg lighting-app qpg6100+debug .bss 53552 53552 0 0.0
.data 996 996 0 0.0
.text 486716 486196 -520 -0.1
lock-app qpg6100+debug .bss 52496 52496 0 0.0
.data 952 952 0 0.0
.text 462792 462272 -520 -0.1
persistent-storage-app qpg6100+debug .bss 17778 17778 0 0.0
.data 280 280 0 0.0
.text 102732 102732 0 0.0
telink lighting-app tlsr9518adk80d bss 70992 70992 0 0.0
noinit 33216 33216 0 0.0
text 458412 457856 -556 -0.1
2 builds (for esp32)
platform target config section b5ad57f 4698cdc change % change
esp32 all-clusters-app c3devkit .dram0.bss 60288 60288 0 0.0
.dram0.data 16200 16200 0 0.0
.flash.rodata 199128 199032 -96 -0.0
.flash.text 872942 872386 -556 -0.1
.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 207784 -88 -0.0
.flash.text 903923 903387 -536 -0.1
.iram0.text 125115 125115 0 0.0
10 builds (for nrfconnect)
platform target config section b5ad57f 4698cdc change % change
nrfconnect lighting-app nrf52840dk_nrf52840 bss 113172 113172 0 0.0
rodata 97780 97740 -40 -0.0
text 577864 577384 -480 -0.1
lock-app nrf52840dk_nrf52840 bss 112240 112240 0 0.0
rodata 94116 94076 -40 -0.0
text 559352 558872 -480 -0.1
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 95056 -40 -0.0
text 562504 562028 -476 -0.1
pump-controller-app nrf52840dk_nrf52840 bss 112248 112248 0 0.0
rodata 94176 94136 -40 -0.0
text 559144 558664 -480 -0.1
shell nrf52840dk_nrf52840 bss 109068 109068 0 0.0
rodata 71644 71644 0 0.0
text 519084 519084 0 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 109416 109416 0 0.0
rodata 88564 88524 -40 -0.0
text 551064 550584 -480 -0.1
nrf5340dk_nrf5340_cpuapp bss 114548 114548 0 0.0
rodata 93020 92980 -40 -0.0
text 507332 506852 -480 -0.1
lock-app nrf5340dk_nrf5340_cpuapp bss 113612 113612 0 0.0
rodata 89376 89336 -40 -0.0
text 488812 488336 -476 -0.1
shell nrf5340dk_nrf5340_cpuapp bss 110052 110052 0 0.0
rodata 66288 66288 0 0.0
text 439696 439696 0 0.0

@vivien-apple vivien-apple merged commit 342d1d3 into project-chip:master Oct 21, 2021
@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from b5ad57f

File Section File VM
chip-lock.elf rodata -40 -40
chip-lock.elf text -480 -480
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.shstrtab,0,3
.debug_aranges,0,-32
.debug_ranges,0,-32
rodata,-40,-40
.debug_frame,0,-84
.debug_abbrev,0,-137
.symtab,0,-160
.strtab,0,-195
.debug_line,0,-274
.debug_loc,0,-447
text,-480,-480
.debug_str,0,-629
.debug_info,0,-1829

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

sections,vmsize,filesize


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.

4 participants