-
Notifications
You must be signed in to change notification settings - Fork 46
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
tools: Initial version of IPC4 tx message logger using eBPF #1205
base: main
Are you sure you want to change the base?
tools: Initial version of IPC4 tx message logger using eBPF #1205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know BPF but this seems readable so LGTM. Some kernel developer should review.
Could you move this to a new subdirectory? The tools/
directory (one of the common, meaningless names...) is getting too crowded. How about tools/BPF/ipc4-msg-trace.bt
? We already know it's SOF from the repo name.
Perfect for a |
ce80292
to
6a574da
Compare
Changes since v1:
|
6a574da
to
61031d7
Compare
Changes since v2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone else must review the actual BPF code
"Big string" support submitted: |
Merged. |
Thanks for the heads up. I think the big string is still short for us (payload can be 4096 bytes) and the bigstring (if I read it right) tops at 1024. |
Ping? PS: LNL had a very bad day on June 10th, let's run things again even if this script is not used anywhere yet. |
SOFCI TEST |
61031d7
to
7800e11
Compare
Changes since v3:
|
7800e11
to
2013acb
Compare
The ipc4-msg-trace.bt script will tap into the entry of sof_ipc4_log_header() which is always called but only prints if dynamic debugging is enabled. It's parameter list is not expected to be changed. The bpftrace must be installed to be able to use the script sudo pacman -S bpftrace sudo emerge -a bpftrace sudo apt install bpftrace sudo dnf install bpftrace To use the script: sudo ./tools/sof-ipc4-msg-trace.bt or sudo bpftrace tools/sof-ipc4-msg-trace.bt It will start logging the sent messages (including payloads) and received notification with exception of 0x1b060000 - trace update. To stop the logging, just terminate the script with CTRL+C Signed-off-by: Peter Ujfalusi <[email protected]>
Changes since v4:
|
The bpftrace script will tap into the entry of sof_ipc4_log_header() which is always called but only prints if dynamic debugging is enabled. It's parameter list is not expected to be changed.
The bpftrace must be installed to be able to use the script
sudo pacman -S bpftrace
sudo emerge -a bpftrace
sudo apt install bpftrace
sudo dnf install bpftrace
To use the script:
sudo ./tools/sof-ipc4-msg-trace.bt
or
sudo bpftrace tools/sof-ipc4-msg-trace.bt
It will start logging the sent messages (including payloads) and received notification with exception of 0x1b060000 - trace update.
To stop the logging, just terminate the script with CTRL+C