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 message receive and send tracing to chip-tool #13637

Conversation

tcarmelveilleux
Copy link
Contributor

Problem

  • There doesn't exist a clean way to see all message-layer messages going in/out of chip-tool to assist the following use-cases:
    • Making test verification steps that don't rely on stable logs in-band of the business logic (e.g. BDX testing)
    • Testing MRP
    • Automatic the expectation/parsing of IM messages from test harness

Also, there didn't exist a way to see all traffic without encryption hacks for a given node, to assist in debugging.

Change overview

  • Move existing send tracing from SecureMessageCodec to SessionManager to allow covering both received and sent messages
  • Add received message tracing
  • Update trace handling to be flexible to receiving a context pointer.
  • Refactor trace handling logic in common/tracing to be more flexible to future needs
  • Add bookend FinishEvent to the TraceStream interface to assist in event flushing.

What it looks like in the logs with --trace_log 1 in chip-tool (and tracing enabled, which it isn't by default in the build yet):

Two messages, one outgoing, one incoming:

[1642198394.740868][1851914:1851919] CHIP:ATM: TraceStream:>>>SecureMsg.SecMsgSent<<< json|{"msg_counter": 1218820235, "session_id": 0, "msg_flags": 0, "security_flags": 0, "exchange_flags": 5, "exchange_id": 24662, "protocol_id": 0, "protocol_opcode": 32, "is_initiator": true, "is_ack_requested": true, "payload_size": 56, "payload_hex": "1530012069dcc043eed5febc214476b96f3b7dd7d29ca665cf20aece524835cb3c9375e1240201240300280435052501881325022c011818"}

[1642198394.742024][1851914:1851919] CHIP:ATM: TraceStream:>>>SecureMsg.SecMsgReceived<<< json|{"peer_address": "UDP:[fdda:ebcf:9d95:0:a238:3d3c:5a29:1f3d%eno1]:5540", "msg_counter": 2683499691, "session_id": 0, "msg_flags": 0, "security_flags": 0, "exchange_flags": 6, "exchange_id": 24662, "protocol_id": 0, "protocol_opcode": 33, "is_initiator": false, "is_ack_requested": true, "acknowledged_msg_counter": 1218820235, "payload_size": 111, "payload_hex": "1530012069dcc043eed5febc214476b96f3b7dd7d29ca665cf20aece524835cb3c9375e1300220543ba1aa453e12eaa538cedcd674adb6d88f037088fb48e57884972601009c2d24030135042401643002105350414b453250204b65792053616c741835052501881325022c011818"}

After basic parsing to recover JSON:

[
  {
    "timestamp": 1642198394.740868,
    "pid": 1851914,
    "tid": 1851919,
    "type": "SecureMsg.SecMsgSent",
    "data": {
      "msg_counter": 1218820235,
      "session_id": 0,
      "msg_flags": 0,
      "security_flags": 0,
      "exchange_flags": 5,
      "exchange_id": 24662,
      "protocol_id": 0,
      "protocol_opcode": 32,
      "is_initiator": true,
      "is_ack_requested": true,
      "payload_size": 56,
      "payload_hex": "1530012069dcc043eed5febc214476b96f3b7dd7d29ca665cf20aece524835cb3c9375e1240201240300280435052501881325022c011818"
    }
  },
  {
    "timestamp": 1642198394.742024,
    "pid": 1851914,
    "tid": 1851919,
    "type": "SecureMsg.SecMsgReceived",
    "data": {
      "peer_address": "UDP:[fdda:ebcf:9d95:0:a238:3d3c:5a29:1f3d%eno1]:5540",
      "msg_counter": 2683499691,
      "session_id": 0,
      "msg_flags": 0,
      "security_flags": 0,
      "exchange_flags": 6,
      "exchange_id": 24662,
      "protocol_id": 0,
      "protocol_opcode": 33,
      "is_initiator": false,
      "is_ack_requested": true,
      "acknowledged_msg_counter": 1218820235,
      "payload_size": 111,
      "payload_hex": "1530012069dcc043eed5febc214476b96f3b7dd7d29ca665cf20aece524835cb3c9375e1300220543ba1aa453e12eaa538cedcd674adb6d88f037088fb48e57884972601009c2d24030135042401643002105350414b453250204b65792053616c741835052501881325022c011818"
    }
  }
]

Testing

  • Integration tests pass, unit tests all pass
  • Validated manually through several runs that with chip-tool (using --trace_log 1) that dumped received/sent message traces match the outer higher-level (but less detailed) logs around them

examples/common/tracing/TraceHandlers.cpp Outdated Show resolved Hide resolved
examples/common/tracing/TraceHandlers.cpp Outdated Show resolved Hide resolved
examples/common/tracing/TraceHandlers.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jan 17, 2022

PR #13637: Size comparison from 7b28de4 to 6ddeb63

Increases (2 builds for linux)
platform target config section 7b28de4 6ddeb63 change % change
linux chip-tool-ipv6only arm64 (read only) 8049492 8049556 64 0.0
.text 6841076 6841140 64 0.0
thermostat-no-ble arm64 (read only) 2042812 2042860 48 0.0
.text 1698336 1698384 48 0.0
Decreases (5 builds for k32w, qpg, telink)
platform target config section 7b28de4 6ddeb63 change % change
k32w light k32w061+release (read/write) 659080 659064 -16 -0.0
.text 574292 574276 -16 -0.0
lock k32w061+release (read/write) 661812 661796 -16 -0.0
.text 576708 576692 -16 -0.0
qpg lighting-app qpg6105+debug (read only) 565088 565080 -8 -0.0
.text 559768 559760 -8 -0.0
lock-app qpg6105+debug (read only) 515500 515492 -8 -0.0
.text 510180 510172 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 840826 840810 -16 -0.0
text 587790 587778 -12 -0.0
Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 7b28de4 6ddeb63 change % change
efr32 lighting-app BRD4161A (read only) 834868 834868 0 0.0
(read/write) 127628 127628 0 0.0
.bss 125744 125744 0 0.0
.data 1884 1884 0 0.0
.text 834860 834860 0 0.0
BRD4161A+rpc (read only) 822264 822264 0 0.0
(read/write) 144288 144288 0 0.0
.bss 142304 142304 0 0.0
.data 1984 1984 0 0.0
.text 822256 822256 0 0.0
window-app BRD4161A (read only) 805456 805456 0 0.0
(read/write) 126320 126320 0 0.0
.bss 124480 124480 0 0.0
.data 1836 1836 0 0.0
.text 805448 805448 0 0.0
k32w light k32w061+release (read/write) 659080 659064 -16 -0.0
.bss 77136 77136 0 0.0
.data 1852 1852 0 0.0
.text 574292 574276 -16 -0.0
lock k32w061+release (read/write) 661812 661796 -16 -0.0
.bss 77432 77432 0 0.0
.data 1872 1872 0 0.0
.text 576708 576692 -16 -0.0
linux chip-tool-ipv6only arm64 (read only) 8049492 8049556 64 0.0
(read/write) 370641 370641 0 0.0
.bss 55217 55217 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 245856 245856 0 0.0
.dynamic 560 560 0 0.0
.got 64776 64776 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 419420 419420 0 0.0
.text 6841076 6841140 64 0.0
thermostat-no-ble arm64 (read only) 2042812 2042860 48 0.0
(read/write) 145969 145969 0 0.0
.bss 65089 65089 0 0.0
.data 880 880 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129884 129884 0 0.0
.text 1698336 1698384 48 0.0
p6 all-clusters-app default (read/write) 2405224 2405224 0 0.0
.bss 117556 117556 0 0.0
.data 2600 2600 0 0.0
.text 1363488 1363488 0 0.0
light-app default (read/write) 2330080 2330080 0 0.0
.bss 106128 106128 0 0.0
.data 2392 2392 0 0.0
.text 1288344 1288344 0 0.0
lock-app default (read/write) 2299104 2299104 0 0.0
.bss 104976 104976 0 0.0
.data 2344 2344 0 0.0
.text 1257368 1257368 0 0.0
qpg lighting-app qpg6105+debug (read only) 565088 565080 -8 -0.0
(read/write) 146940 146940 0 0.0
.bss 89960 89960 0 0.0
.data 1048 1048 0 0.0
.text 559768 559760 -8 -0.0
lock-app qpg6105+debug (read only) 515500 515492 -8 -0.0
(read/write) 146936 146936 0 0.0
.bss 88584 88584 0 0.0
.data 972 972 0 0.0
.text 510180 510172 -8 -0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38512 38512 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 840826 840810 -16 -0.0
bss 87316 87316 0 0.0
noinit 37160 37160 0 0.0
text 587790 587778 -12 -0.0

@github-actions
Copy link

github-actions bot commented Jan 17, 2022

PR #13637: Size comparison from 1c2091b to 133f419

Increases (2 builds for linux)
platform target config section 1c2091b 133f419 change % change
linux chip-tool-ipv6only arm64 (read only) 8049492 8049556 64 0.0
.text 6841076 6841140 64 0.0
thermostat-no-ble arm64 (read only) 2042812 2042860 48 0.0
.text 1698336 1698384 48 0.0
Decreases (17 builds for esp32, k32w, mbed, nrfconnect, qpg, telink)
platform target config section 1c2091b 133f419 change % change
esp32 all-clusters-app c3devkit (read only) 912384 912372 -12 -0.0
.flash.text 912384 912372 -12 -0.0
k32w light k32w061+release (read/write) 659080 659064 -16 -0.0
.text 574292 574276 -16 -0.0
lock k32w061+release (read/write) 661812 661796 -16 -0.0
.text 576708 576692 -16 -0.0
mbed lighting-app CY8CPROTO_062_4343W+release (read/write) 2334568 2334504 -64 -0.0
.text 1297168 1297104 -64 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 text 637388 637380 -8 -0.0
nrf52840dk_nrf52840+rpc (read/write) 928899 928883 -16 -0.0
text 632784 632776 -8 -0.0
nrf52840dongle_nrf52840 text 669588 669580 -8 -0.0
nrf5340dk_nrf5340_cpuapp text 554312 554304 -8 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 912779 912763 -16 -0.0
text 612836 612828 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822846 822830 -16 -0.0
text 529796 529788 -8 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 915643 915627 -16 -0.0
text 615492 615484 -8 -0.0
pump-controller-app nrf52840dk_nrf52840 text 611416 611408 -8 -0.0
shell nrf52840dk_nrf52840 text 533992 533984 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711470 711454 -16 -0.0
text 451668 451660 -8 -0.0
qpg lighting-app qpg6105+debug (read only) 565088 565080 -8 -0.0
.text 559768 559760 -8 -0.0
lock-app qpg6105+debug (read only) 515500 515492 -8 -0.0
.text 510180 510172 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 840826 840810 -16 -0.0
text 587790 587778 -12 -0.0
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 1c2091b 133f419 change % change
efr32 lighting-app BRD4161A (read only) 834868 834868 0 0.0
(read/write) 127628 127628 0 0.0
.bss 125744 125744 0 0.0
.data 1884 1884 0 0.0
.text 834860 834860 0 0.0
BRD4161A+rpc (read only) 822264 822264 0 0.0
(read/write) 144288 144288 0 0.0
.bss 142304 142304 0 0.0
.data 1984 1984 0 0.0
.text 822256 822256 0 0.0
window-app BRD4161A (read only) 805456 805456 0 0.0
(read/write) 126320 126320 0 0.0
.bss 124480 124480 0 0.0
.data 1836 1836 0 0.0
.text 805448 805448 0 0.0
esp32 all-clusters-app c3devkit (read only) 912384 912372 -12 -0.0
(read/write) 1316682 1316682 0 0.0
.dram0.bss 70528 70528 0 0.0
.dram0.data 14284 14284 0 0.0
.flash.rodata 178384 178384 0 0.0
.flash.text 912384 912372 -12 -0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 961223 961223 0 0.0
(read/write) 448848 448848 0 0.0
.dram0.bss 74984 74984 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207672 207672 0 0.0
.flash.text 955839 955839 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 659080 659064 -16 -0.0
.bss 77136 77136 0 0.0
.data 1852 1852 0 0.0
.text 574292 574276 -16 -0.0
lock k32w061+release (read/write) 661812 661796 -16 -0.0
.bss 77432 77432 0 0.0
.data 1872 1872 0 0.0
.text 576708 576692 -16 -0.0
linux chip-tool-ipv6only arm64 (read only) 8049492 8049556 64 0.0
(read/write) 370641 370641 0 0.0
.bss 55217 55217 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 245856 245856 0 0.0
.dynamic 560 560 0 0.0
.got 64776 64776 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 419420 419420 0 0.0
.text 6841076 6841140 64 0.0
thermostat-no-ble arm64 (read only) 2042812 2042860 48 0.0
(read/write) 145969 145969 0 0.0
.bss 65089 65089 0 0.0
.data 880 880 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129884 129884 0 0.0
.text 1698336 1698384 48 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2350112 2350112 0 0.0
.bss 189220 189220 0 0.0
.data 5320 5320 0 0.0
.text 1312688 1312688 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2334568 2334504 -64 -0.0
.bss 180760 180760 0 0.0
.data 5568 5568 0 0.0
.text 1297168 1297104 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304912 2304912 0 0.0
.bss 179768 179768 0 0.0
.data 5544 5544 0 0.0
.text 1267512 1267512 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) 2054464 2054464 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1017064 1017064 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 943419 943419 0 0.0
bss 119628 119628 0 0.0
rodata 108824 108824 0 0.0
text 637388 637380 -8 -0.0
nrf52840dk_nrf52840+rpc (read/write) 928899 928883 -16 -0.0
bss 116672 116672 0 0.0
rodata 101272 101272 0 0.0
text 632784 632776 -8 -0.0
nrf52840dongle_nrf52840 (read/write) 994095 994095 0 0.0
bss 122472 122472 0 0.0
rodata 113576 113576 0 0.0
text 669588 669580 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 853242 853242 0 0.0
bss 116416 116416 0 0.0
rodata 101996 101996 0 0.0
text 554312 554304 -8 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 912779 912763 -16 -0.0
bss 118784 118784 0 0.0
rodata 103792 103792 0 0.0
text 612836 612828 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822846 822830 -16 -0.0
bss 115600 115600 0 0.0
rodata 97016 97016 0 0.0
text 529796 529788 -8 -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) 915643 915627 -16 -0.0
bss 118548 118548 0 0.0
rodata 104152 104152 0 0.0
text 615492 615484 -8 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910715 910715 0 0.0
bss 118572 118572 0 0.0
rodata 103264 103264 0 0.0
text 611416 611408 -8 -0.0
shell nrf52840dk_nrf52840 (read/write) 798655 798655 0 0.0
bss 109776 109776 0 0.0
rodata 78388 78388 0 0.0
text 533992 533984 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711470 711454 -16 -0.0
bss 107664 107664 0 0.0
rodata 72688 72688 0 0.0
text 451668 451660 -8 -0.0
p6 all-clusters-app default (read/write) 2405224 2405224 0 0.0
.bss 117556 117556 0 0.0
.data 2600 2600 0 0.0
.text 1363488 1363488 0 0.0
light-app default (read/write) 2330080 2330080 0 0.0
.bss 106128 106128 0 0.0
.data 2392 2392 0 0.0
.text 1288344 1288344 0 0.0
lock-app default (read/write) 2299104 2299104 0 0.0
.bss 104976 104976 0 0.0
.data 2344 2344 0 0.0
.text 1257368 1257368 0 0.0
qpg lighting-app qpg6105+debug (read only) 565088 565080 -8 -0.0
(read/write) 146940 146940 0 0.0
.bss 89960 89960 0 0.0
.data 1048 1048 0 0.0
.text 559768 559760 -8 -0.0
lock-app qpg6105+debug (read only) 515500 515492 -8 -0.0
(read/write) 146936 146936 0 0.0
.bss 88584 88584 0 0.0
.data 972 972 0 0.0
.text 510180 510172 -8 -0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38512 38512 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 840826 840810 -16 -0.0
bss 87316 87316 0 0.0
noinit 37160 37160 0 0.0
text 587790 587778 -12 -0.0

@andy31415
Copy link
Contributor

/rebase

tcarmelveilleux and others added 3 commits January 18, 2022 18:54
- Move tracing from SecureMessageCodec to SessionManager
  to allow covering both received and sent messages
- Add received message tracing
- Update trace handling to be flexible to receiving a context
  pointer.
- Refactor trace handling logic in common/tracing to be more
  flexible to
- Add bookend FinishEvent to the TraceStream interface to assist
  in event flushing.

Testing done:
- Integration tests pass, unit tests all pass
- Validated manually through several runs that with chip-tool
  (using `--trace_log 1`) that dumped received/sent message traces
  match the outer higher-level (but less detailed) logs around them
@woody-apple woody-apple force-pushed the cleanup-secure-message-processing2 branch from 133f419 to 17c0a1d Compare January 18, 2022 18:54
@andy31415
Copy link
Contributor

fast track: this has been up sufficiently for cross timezone review. Functionality is mostly concerning tests/debug rather than functionality. Already has a few checkmarks without open concerns.

@github-actions
Copy link

github-actions bot commented Jan 18, 2022

PR #13637: Size comparison from 78a6636 to 17c0a1d

Increases (3 builds for linux, p6)
platform target config section 78a6636 17c0a1d change % change
linux chip-tool-ipv6only arm64 (read only) 8090660 8090724 64 0.0
.text 6873764 6873828 64 0.0
thermostat-no-ble arm64 (read only) 2044156 2044220 64 0.0
.text 1699616 1699680 64 0.0
p6 lock-app default (read/write) 2299168 2299184 16 0.0
.text 1257432 1257448 16 0.0
Decreases (14 builds for esp32, nrfconnect, qpg, telink)
platform target config section 78a6636 17c0a1d change % change
esp32 all-clusters-app c3devkit (read only) 912452 912440 -12 -0.0
.flash.text 912452 912440 -12 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 text 637456 637448 -8 -0.0
nrf52840dk_nrf52840+rpc text 632852 632844 -8 -0.0
nrf52840dongle_nrf52840 text 669656 669648 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 853334 853318 -16 -0.0
text 554380 554372 -8 -0.0
lock-app nrf52840dk_nrf52840 text 612904 612896 -8 -0.0
nrf5340dk_nrf5340_cpuapp text 529864 529856 -8 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 915719 915703 -16 -0.0
text 615556 615548 -8 -0.0
pump-controller-app nrf52840dk_nrf52840 text 611480 611472 -8 -0.0
shell nrf52840dk_nrf52840 text 533992 533984 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711470 711454 -16 -0.0
text 451668 451660 -8 -0.0
qpg lighting-app qpg6105+debug (read only) 565160 565152 -8 -0.0
.text 559840 559832 -8 -0.0
lock-app qpg6105+debug (read only) 515572 515564 -8 -0.0
.text 510252 510244 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 840902 840886 -16 -0.0
text 587854 587842 -12 -0.0
Full report (27 builds for efr32, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
platform target config section 78a6636 17c0a1d change % change
efr32 lighting-app BRD4161A (read only) 834948 834948 0 0.0
(read/write) 127636 127636 0 0.0
.bss 125744 125744 0 0.0
.data 1892 1892 0 0.0
.text 834940 834940 0 0.0
BRD4161A+rpc (read only) 822352 822352 0 0.0
(read/write) 144296 144296 0 0.0
.bss 142304 142304 0 0.0
.data 1992 1992 0 0.0
.text 822344 822344 0 0.0
window-app BRD4161A (read only) 805536 805536 0 0.0
(read/write) 126328 126328 0 0.0
.bss 124480 124480 0 0.0
.data 1844 1844 0 0.0
.text 805528 805528 0 0.0
esp32 all-clusters-app c3devkit (read only) 912452 912440 -12 -0.0
(read/write) 1316698 1316698 0 0.0
.dram0.bss 70528 70528 0 0.0
.dram0.data 14292 14292 0 0.0
.flash.rodata 178384 178384 0 0.0
.flash.text 912452 912440 -12 -0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 961295 961295 0 0.0
(read/write) 448856 448856 0 0.0
.dram0.bss 74984 74984 0 0.0
.dram0.data 34072 34072 0 0.0
.flash.rodata 207672 207672 0 0.0
.flash.text 955911 955911 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 659156 659156 0 0.0
.bss 77136 77136 0 0.0
.data 1860 1860 0 0.0
.text 574360 574360 0 0.0
lock k32w061+release (read/write) 661888 661888 0 0.0
.bss 77432 77432 0 0.0
.data 1880 1880 0 0.0
.text 576776 576776 0 0.0
linux chip-tool-ipv6only arm64 (read only) 8090660 8090724 64 0.0
(read/write) 373409 373409 0 0.0
.bss 55217 55217 0 0.0
.data 1112 1112 0 0.0
.data.rel.ro 248088 248088 0 0.0
.dynamic 560 560 0 0.0
.got 65296 65296 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 421100 421100 0 0.0
.text 6873764 6873828 64 0.0
thermostat-no-ble arm64 (read only) 2044156 2044220 64 0.0
(read/write) 145985 145985 0 0.0
.bss 65089 65089 0 0.0
.data 896 896 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129932 129932 0 0.0
.text 1699616 1699680 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 943491 943491 0 0.0
bss 119628 119628 0 0.0
rodata 108824 108824 0 0.0
text 637456 637448 -8 -0.0
nrf52840dk_nrf52840+rpc (read/write) 928975 928975 0 0.0
bss 116672 116672 0 0.0
rodata 101276 101276 0 0.0
text 632852 632844 -8 -0.0
nrf52840dongle_nrf52840 (read/write) 994171 994171 0 0.0
bss 122472 122472 0 0.0
rodata 113580 113580 0 0.0
text 669656 669648 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 853334 853318 -16 -0.0
bss 116416 116416 0 0.0
rodata 102000 102000 0 0.0
text 554380 554372 -8 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 912851 912851 0 0.0
bss 118784 118784 0 0.0
rodata 103792 103792 0 0.0
text 612904 612896 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822922 822922 0 0.0
bss 115600 115600 0 0.0
rodata 97020 97020 0 0.0
text 529864 529856 -8 -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) 915719 915703 -16 -0.0
bss 118548 118548 0 0.0
rodata 104156 104156 0 0.0
text 615556 615548 -8 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910787 910787 0 0.0
bss 118572 118572 0 0.0
rodata 103264 103264 0 0.0
text 611480 611472 -8 -0.0
shell nrf52840dk_nrf52840 (read/write) 798655 798655 0 0.0
bss 109776 109776 0 0.0
rodata 78388 78388 0 0.0
text 533992 533984 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711470 711454 -16 -0.0
bss 107664 107664 0 0.0
rodata 72688 72688 0 0.0
text 451668 451660 -8 -0.0
p6 all-clusters-app default (read/write) 2405304 2405304 0 0.0
.bss 117556 117556 0 0.0
.data 2608 2608 0 0.0
.text 1363568 1363568 0 0.0
light-app default (read/write) 2330160 2330160 0 0.0
.bss 106128 106128 0 0.0
.data 2400 2400 0 0.0
.text 1288424 1288424 0 0.0
lock-app default (read/write) 2299168 2299184 16 0.0
.bss 104976 104976 0 0.0
.data 2352 2352 0 0.0
.text 1257432 1257448 16 0.0
qpg lighting-app qpg6105+debug (read only) 565160 565152 -8 -0.0
(read/write) 146940 146940 0 0.0
.bss 89960 89960 0 0.0
.data 1056 1056 0 0.0
.text 559840 559832 -8 -0.0
lock-app qpg6105+debug (read only) 515572 515564 -8 -0.0
(read/write) 146936 146936 0 0.0
.bss 88584 88584 0 0.0
.data 980 980 0 0.0
.text 510252 510244 -8 -0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38512 38512 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 840902 840886 -16 -0.0
bss 87316 87316 0 0.0
noinit 37160 37160 0 0.0
text 587854 587842 -12 -0.0

@andy31415 andy31415 merged commit a04bf54 into project-chip:master Jan 19, 2022
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
* Add message receive and send tracing to chip-tool

- Move tracing from SecureMessageCodec to SessionManager
  to allow covering both received and sent messages
- Add received message tracing
- Update trace handling to be flexible to receiving a context
  pointer.
- Refactor trace handling logic in common/tracing to be more
  flexible to
- Add bookend FinishEvent to the TraceStream interface to assist
  in event flushing.

Testing done:
- Integration tests pass, unit tests all pass
- Validated manually through several runs that with chip-tool
  (using `--trace_log 1`) that dumped received/sent message traces
  match the outer higher-level (but less detailed) logs around them

* Restyled by clang-format

* Address review comments

Co-authored-by: Restyled.io <[email protected]>
@nmtoan91
Copy link

Hi @tcarmelveilleux,
Can you teach me how to convert the payload_hex string into json for other data types that I can use to read the data from the chip-tool please?

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