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

Respect maximum log level in esp32 pw_hdlc logger #19401

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jun 9, 2022

Problem

Enabling HDLC & RPC causes a significant increase in logs verbosity on
ESP32 which may cause bottlenecks (even causing commissioning to fail).

Change overview

Respect the maximum log level to suppress these extra logs.

It would be more efficient to check this at the logging call sites, but
using a platform specific level limit is not easily supported with the
matter logging stack (instead, there are separate build time toggles
such as CHIP_DETAIL_LOGGING).

The esp-idf logger also support tag based dynamic level setting,
but this functionality is not exposed so it cannot be reused here.

Testing

Check for ChipLogDetail logs with RPC build.

Enabling HDLC & RPC causes a significant increase in logs verbosity on
ESP32 which may cause bottlenecks (even causing commissioning to fail).

Respect the maximum log level to suppress these extra logs.

It would be more efficient to check this at the logging call sites, but
using a platform specific level limit is not easily supported with the
matter logging stack (instead, there are separate build time toggles
such as CHIP_DETAIL_LOGGING).
@mspang
Copy link
Contributor Author

mspang commented Jun 9, 2022

@sweetymhaiske

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

PR #19401: Size comparison from fbe49dd to 809f30a

Increases (3 builds for cc13x2_26x2, nrfconnect)
platform target config section fbe49dd 809f30a change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 683455 683463 8 0.0
.text 584788 584796 8 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1192035 1192051 16 0.0
text 817108 817112 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 text 789184 789188 4 0.0
Decreases (3 builds for cc13x2_26x2, telink)
platform target config section fbe49dd 809f30a change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read/write) 159376 159368 -8 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 781704 781696 -8 -0.0
text 552578 552574 -4 -0.0
lighting-app tlsr9518adk80d text 569296 569294 -2 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section fbe49dd 809f30a change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 689943 689943 0 0.0
(read/write) 161824 161824 0 0.0
.bss 74660 74660 0 0.0
.data 3392 3392 0 0.0
.rodata 112327 112327 0 0.0
.text 577304 577304 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 640599 640599 0 0.0
(read/write) 158132 158132 0 0.0
.bss 73884 73884 0 0.0
.data 3332 3332 0 0.0
.rodata 89367 89367 0 0.0
.text 550912 550912 0 0.0
lock-ftd LP_CC2652R7 (read only) 683455 683463 8 0.0
(read/write) 159376 159368 -8 -0.0
.bss 72612 72612 0 0.0
.data 3256 3256 0 0.0
.rodata 98183 98183 0 0.0
.text 584788 584796 8 0.0
lock-mtd LP_CC2652R7 (read only) 632879 632879 0 0.0
(read/write) 145720 145720 0 0.0
.bss 68348 68348 0 0.0
.data 3256 3256 0 0.0
.rodata 98071 98071 0 0.0
.text 534316 534316 0 0.0
pump-app LP_CC2652R7 (read only) 664907 664907 0 0.0
(read/write) 178836 178836 0 0.0
.bss 72756 72756 0 0.0
.data 3292 3292 0 0.0
.rodata 86363 86363 0 0.0
.text 578060 578060 0 0.0
pump-controller-app LP_CC2652R7 (read only) 655491 655491 0 0.0
(read/write) 188356 188356 0 0.0
.bss 72860 72860 0 0.0
.data 3252 3252 0 0.0
.rodata 84251 84251 0 0.0
.text 570756 570756 0 0.0
shell LP_CC2652R7 (read only) 682230 682230 0 0.0
(read/write) 165032 165032 0 0.0
.bss 76956 76956 0 0.0
.data 3396 3396 0 0.0
.rodata 108926 108926 0 0.0
.text 572992 572992 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 602562 602562 0 0.0
.app_xip_area 461508 461508 0 0.0
.bss 84008 84008 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 599646 599646 0 0.0
.app_xip_area 458456 458456 0 0.0
.bss 84176 84176 0 0.0
.data 700 700 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 599446 599446 0 0.0
.app_xip_area 459372 459372 0 0.0
.bss 83140 83140 0 0.0
.data 616 616 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 915032 915032 0 0.0
(read/write) 133176 133176 0 0.0
.bss 131088 131088 0 0.0
.data 2088 2088 0 0.0
.text 915024 915024 0 0.0
BRD4161A+rpc (read only) 949236 949236 0 0.0
(read/write) 149868 149868 0 0.0
.bss 147576 147576 0 0.0
.data 2292 2292 0 0.0
.text 949228 949228 0 0.0
BRD4161A+rs911x (read only) 790228 790228 0 0.0
(read/write) 129460 129460 0 0.0
.bss 127364 127364 0 0.0
.data 2096 2096 0 0.0
.text 790220 790220 0 0.0
lock-app BRD4161A+wf200 (read only) 958484 958484 0 0.0
(read/write) 128252 128252 0 0.0
.bss 126188 126188 0 0.0
.data 2064 2064 0 0.0
.text 958476 958476 0 0.0
window-app BRD4161A (read only) 900104 900104 0 0.0
(read/write) 133264 133264 0 0.0
.bss 131176 131176 0 0.0
.data 2084 2084 0 0.0
.text 900096 900096 0 0.0
esp32 all-clusters-app c3devkit (read only) 1007742 1007742 0 0.0
(read/write) 1481834 1481834 0 0.0
.dram0.bss 69168 69168 0 0.0
.dram0.data 14656 14656 0 0.0
.flash.rodata 212584 212584 0 0.0
.flash.text 1007742 1007742 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1062491 1062491 0 0.0
(read/write) 483968 483968 0 0.0
.dram0.bss 74688 74688 0 0.0
.dram0.data 34200 34200 0 0.0
.flash.rodata 243084 243084 0 0.0
.flash.text 1057107 1057107 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 653784 653784 0 0.0
.bss 70044 70044 0 0.0
.data 2004 2004 0 0.0
.text 575936 575936 0 0.0
lock k32w061+release (read/write) 714876 714876 0 0.0
.bss 70484 70484 0 0.0
.data 1976 1976 0 0.0
.text 636616 636616 0 0.0
linux all-clusters-app debug (read only) 2892497 2892497 0 0.0
(read/write) 180024 180024 0 0.0
.bss 87840 87840 0 0.0
.data 2016 2016 0 0.0
.data.rel.ro 83944 83944 0 0.0
.dynamic 608 608 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 255485 255485 0 0.0
.text 2462562 2462562 0 0.0
all-clusters-minimal-app debug (read only) 2754009 2754009 0 0.0
(read/write) 171640 171640 0 0.0
.bss 87008 87008 0 0.0
.data 1888 1888 0 0.0
.data.rel.ro 76568 76568 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 256797 256797 0 0.0
.text 2324770 2324770 0 0.0
bridge-app debug+rpc (read only) 2197993 2197993 0 0.0
(read/write) 149528 149528 0 0.0
.bss 74496 74496 0 0.0
.data 3888 3888 0 0.0
.data.rel.ro 65384 65384 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 187840 187840 0 0.0
.text 1851314 1851314 0 0.0
chip-tool debug (read only) 9754445 9754445 0 0.0
(read/write) 611808 611808 0 0.0
.bss 25408 25408 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 579008 579008 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 505789 505789 0 0.0
.text 7835349 7835349 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9502876 9502876 0 0.0
(read/write) 678033 678033 0 0.0
.bss 43681 43681 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 614464 614464 0 0.0
.dynamic 528 528 0 0.0
.got 14936 14936 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 467916 467916 0 0.0
.text 7486628 7486628 0 0.0
lighting-app debug+rpc (read only) 2482409 2482409 0 0.0
(read/write) 155136 155136 0 0.0
.bss 76320 76320 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 70872 70872 0 0.0
.dynamic 608 608 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 205416 205416 0 0.0
.text 2109474 2109474 0 0.0
lock-app debug (read only) 2428377 2428377 0 0.0
(read/write) 150272 150272 0 0.0
.bss 75040 75040 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 67832 67832 0 0.0
.dynamic 608 608 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 219464 219464 0 0.0
.text 2046386 2046386 0 0.0
ota-provider-app debug (read only) 2203809 2203809 0 0.0
(read/write) 143232 143232 0 0.0
.bss 74496 74496 0 0.0
.data 1752 1752 0 0.0
.data.rel.ro 61192 61192 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 191992 191992 0 0.0
.text 1852210 1852210 0 0.0
ota-requestor-app debug (read only) 2265441 2265441 0 0.0
(read/write) 146280 146280 0 0.0
.bss 75264 75264 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63288 63288 0 0.0
.dynamic 608 608 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 704 704 0 0.0
.rodata 195328 195328 0 0.0
.text 1906450 1906450 0 0.0
shell debug (read only) 2584121 2584121 0 0.0
(read/write) 203200 203200 0 0.0
.bss 118728 118728 0 0.0
.data 1328 1328 0 0.0
.data.rel.ro 77368 77368 0 0.0
.dynamic 608 608 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 228050 228050 0 0.0
.text 2197522 2197522 0 0.0
thermostat-no-ble arm64 (read only) 2544060 2544060 0 0.0
(read/write) 183057 183057 0 0.0
.bss 91409 91409 0 0.0
.data 1512 1512 0 0.0
.data.rel.ro 82120 82120 0 0.0
.dynamic 528 528 0 0.0
.got 4992 4992 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 160164 160164 0 0.0
.text 2147040 2147040 0 0.0
tv-app debug (read only) 3035961 3035961 0 0.0
(read/write) 281616 281616 0 0.0
.bss 192296 192296 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 78216 78216 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 241056 241056 0 0.0
.text 2609794 2609794 0 0.0
tv-casting-app debug (read only) 5335129 5335129 0 0.0
(read/write) 224000 224000 0 0.0
.bss 80136 80136 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 135216 135216 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 340544 340544 0 0.0
.text 4643986 4643986 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2429656 2429656 0 0.0
.bss 202692 202692 0 0.0
.data 5872 5872 0 0.0
.text 1392300 1392300 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1192035 1192051 16 0.0
bss 141362 141362 0 0.0
rodata 154644 154644 0 0.0
text 817108 817112 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1139775 1139775 0 0.0
bss 140579 140579 0 0.0
rodata 131136 131136 0 0.0
text 789184 789188 4 0.0
p6 all-clusters-app default (read/write) 2545112 2545112 0 0.0
.bss 137120 137120 0 0.0
.data 2808 2808 0 0.0
.text 1503376 1503376 0 0.0
all-clusters-minimal-app default (read/write) 2489920 2489920 0 0.0
.bss 136328 136328 0 0.0
.data 2752 2752 0 0.0
.text 1448184 1448184 0 0.0
light-app default (read/write) 2421360 2421360 0 0.0
.bss 129432 129432 0 0.0
.data 2600 2600 0 0.0
.text 1379624 1379624 0 0.0
lock-app default (read/write) 2441696 2441696 0 0.0
.bss 129256 129256 0 0.0
.data 2576 2576 0 0.0
.text 1399960 1399960 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 781704 781696 -8 -0.0
bss 70636 70636 0 0.0
noinit 40416 40416 0 0.0
text 552578 552574 -4 -0.0
lighting-app tlsr9518adk80d (read/write) 801708 801708 0 0.0
bss 70888 70888 0 0.0
noinit 40416 40416 0 0.0
text 569296 569294 -2 -0.0

@mspang mspang merged commit cba9187 into project-chip:master Jun 9, 2022
@mspang mspang deleted the for-chip/esp32-rpc-log branch June 9, 2022 21:45
mkardous-silabs pushed a commit to mkardous-silabs/connectedhomeip that referenced this pull request Jun 10, 2022
Enabling HDLC & RPC causes a significant increase in logs verbosity on
ESP32 which may cause bottlenecks (even causing commissioning to fail).

Respect the maximum log level to suppress these extra logs.

It would be more efficient to check this at the logging call sites, but
using a platform specific level limit is not easily supported with the
matter logging stack (instead, there are separate build time toggles
such as CHIP_DETAIL_LOGGING).
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this pull request Jun 15, 2022
Enabling HDLC & RPC causes a significant increase in logs verbosity on
ESP32 which may cause bottlenecks (even causing commissioning to fail).

Respect the maximum log level to suppress these extra logs.

It would be more efficient to check this at the logging call sites, but
using a platform specific level limit is not easily supported with the
matter logging stack (instead, there are separate build time toggles
such as CHIP_DETAIL_LOGGING).
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.

8 participants