fix: tools: faulty mtrace lines do not fail script#1343
Open
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
Open
fix: tools: faulty mtrace lines do not fail script#1343ekurdybx wants to merge 1 commit intothesofproject:mainfrom
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
Conversation
85f5396 to
8f5f5a3
Compare
8f5f5a3 to
e24b25e
Compare
In case of a faulty line in mtrace, the sof_perf_analyzer.py script will log a warning and move on, instead of failing. Signed-off-by: Emilia Kurdybelska <[email protected]>
e24b25e to
0fcba1f
Compare
marc-hb
reviewed
Feb 3, 2026
| ctx, func = rest[0:2] | ||
| msg = ': '.join(rest[2:]).strip() | ||
| yield TraceItem(timestamp, trace_lvl, ctx, func, msg) | ||
| except Exception as e: # pylint: disable=W0718 |
Collaborator
There was a problem hiding this comment.
Ironic how W0718 warns about precisely the type of "green failure" issues that this PR is trying to fix... Why not simply catch the specific parsing exception?
| hours=int(h), | ||
| minutes=int(m), | ||
| seconds=float(s) | ||
| ).total_seconds() |
Collaborator
There was a problem hiding this comment.
I think the timestamp parsing has become long enough to deserve its own, separate function. The nesting of try blocks and the significant indentation make the code less readable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case of a faulty mtrace line the sof_perf_analyzer.py script will log warning and move on, instead of failing the script (and the test).