-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 chip-trace-decoder program and get more messages logging from chip-tool and application based on examples/platform/linux #18893
Add chip-trace-decoder program and get more messages logging from chip-tool and application based on examples/platform/linux #18893
Conversation
PR #18893: Size comparison from 8ef608d to d99598b Increases above 0.2%:
Increases (13 builds for linux)
Full report (39 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, p6, telink)
|
d99598b
to
51837c3
Compare
51837c3
to
e554491
Compare
/rebase |
e554491
to
9a71146
Compare
PR #18893: Size comparison from fd5e78d to 9a71146 Increases above 0.2%:
Increases (13 builds for linux)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
9a71146
to
b57132c
Compare
b57132c
to
f158e3c
Compare
PR #18893: Size comparison from 55ab764 to f158e3c Increases above 0.2%:
Increases (2 builds for linux)
Decreases (1 build for linux)
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
It seems like the IM output text format is different from the others. The spec defines a fairly robust text format for converting TLV payloads to a human-readable format - shouldn't we just be using that to standardize uniformly? (for at least, the TLV payloads). |
…p-tool and application based on examples/platform/linux (project-chip#18893) * [chip-tool] Get kLogCategory_Automation to be logged when using trace_log=true * Add a missing #pragma once instructions in TraceHandlers.h * Make CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE configurable when building * Add support to multiple tracing streams to TraceHandlers.cpp * Add chip-trace-decoder program * Add chip-tool tracing decoder support * Add tracing decoder support to example applications based on examples/platform/linux
Problem
For some of the test plans, the information that is sent onto the wire or retrieve is not obviously visible.
Ideally one would compile the application that should emits logs with
chip_log_message_max_size=2048
since I noticed that some messages just don't work otherwise. The application keeps logging if it fails though, but logs an error.Change overview
This PR relies on the tracing feature from
examples/common/tracing
. It adds a program to decode the trace file generated when using--trace_file <filepath>
as well as a "live" trace decoder instead of dumping the raw data in the logs when using--trace_log 1
.The tracing decoding works in
chip-tool
and all applications usingexamples/platform/linux
for emitted/received messages for "Secure Channel" messages and "Interaction Model" messages. It also try to not duplicate the output of interaction model messages that are received by the device currently.The PR also contains all the boiler plates for the others protocols that are not decoded yet (BDX, UserDirectedCommissioning/Echo).
Testing
I have tested live in chip-tool and the all-clusters-app for pairing operations as well as random commands/attributes reads.
I have also tested it onto the same things but when the tracing has been dumped to a file.
./out/debug/standalone/chip-tool pairing code 0x12344321 MT:-24J029Q00KA0648G00 --trace_file /tmp/trace.log
./out/debug/standalone/chip-tool pairing code 0x12344321 MT:-24J029Q00KA0648G00 --trace_log 1
./out/debug/standalone/chip-all-clusters-app --trace_log 1
./out/debug/standalone/chip-trace-decoder --source /tmp/foo.log