-
Notifications
You must be signed in to change notification settings - Fork 59
tools: sof-ipc-timer.py: Timings of module init and config IPC loggings #1255
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
Conversation
marc-hb
left a comment
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 didn't look at any of the logic, just some general Python advice.
lgirdwood
left a comment
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.
Just needs some more readability for me.
|
I am actually thinking of turning this PR to draft, as it does not produce the accuracy needed to to show the DRAM offloading impact, so I do not think its worth my time to polish this to the merge-able quality. Or maybe I come up with something extra to this script parsing FW logs too with some extra lines for the purpose, that can be turned on with a kcontrol option. |
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.
PR Overview
A new tool, sof-ipc-timer.py, has been added to collect and report initialization and configuration timings from kernel log output when SOF IPC debug is enabled.
- Introduces a Component class for mapping widget IDs to components.
- Implements parsing of journalctl log messages for kernel debug information and computes timing differences.
- Provides command-line options for controlling output details such as reply timings, module id, and pipeline id.
Reviewed Changes
| File | Description |
|---|---|
| tools/sof-ipc-timer.py | New tool to extract timing information from kernel logs for SOF IPC debug. |
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
|
@jsarha ping |
There has been some further development since this version. I'll finish those developments first and then update and clean up everything according to comments here. |
The sof-ipc-timer collects module initialization and configuration timings, and set pipeline state timings from 'journalctl -k -o short-precise' output if SOF IPC debug is enabled. Different kind of outputs can be generated with different flags. Adding just -s gives a summary like this: host-copier.0.playback init min 196 us max 456 us average 322 us of 100 gain.1.1 init min 192 us max 552 us average 327 us of 100 gain.1.1 conf min 197 us max 494 us average 325 us of 100 mixin.1.1 init min 193 us max 8219 us average 406 us of 100 mixout.2.1 init min 197 us max 573 us average 327 us of 100 gain.2.1 init min 197 us max 484 us average 324 us of 100 gain.2.1 conf min 193 us max 418 us average 322 us of 100 smart_amp.2.1 init min 194 us max 526 us average 326 us of 100 smart_amp.2.1 conf min 197 us max 1826 us average 393 us of 100 dai-copier.SSP.NoCodec-0.playback init min 202 us max 2135 us average 479 us of 100 pipeline.1: host-copier.0.playback, gain.1.1, mixin.1.1, pipeline.1 3 min 200 us max 2592 us average 553 us of 200 pipeline.1 4 min 228 us max 3202 us average 673 us of 100 pipeline.1 2 min 208 us max 1867 us average 565 us of 100 pipeline.2: mixout.2.1, gain.2.1, smart_amp.2.1, dai-copier.SSP.NoCodec-0.playback, pipeline.2 3 min 199 us max 2667 us average 863 us of 200 pipeline.2 4 min 205 us max 8656 us average 794 us of 100 Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> sof-ipc-timer.py: Fix summary only functionality
c33652a to
54df69f
Compare
|
There has now been almost complete rewrite with added features. I took advice on the most of the suggestions where applicable, but on several places I restructured the code heavily to make it more maintainable. I'll resolve all the past comments because its unlikely they are applicable any more. |
Have you considered a fresh new PR and closing this one? We can still refer to this one when needed. |
Sure, done: |
The sof-ipc-timer collects module initialization and configuration timings from 'journalctl -k -o short-precise' output if SOF IPC debug is enabled.