fix: tools: sof_perf_analyzer: ignore errors when decoding mtrace file#1357
Merged
ekurdybx merged 1 commit intothesofproject:mainfrom Apr 9, 2026
Merged
Conversation
72ec037 to
0189a9b
Compare
marc-hb
reviewed
Apr 7, 2026
Collaborator
marc-hb
left a comment
There was a problem hiding this comment.
A commit message would not hurt?
| # pylint: disable=C0103 | ||
| ts_shift = 0 | ||
| with open(args.filename, 'r', encoding='utf8') as file: | ||
| with open(args.filename, 'r', encoding='utf8', errors='ignore') as file: |
Collaborator
There was a problem hiding this comment.
Suggested change
| with open(args.filename, 'r', encoding='utf8', errors='ignore') as file: | |
| with open(args.filename, 'r', encoding='utf8', errors='backslashreplace') as file: |
ignore = "ignore bugs".
Contributor
Author
There was a problem hiding this comment.
backslashreplace is only supported for writing to the file
Collaborator
There was a problem hiding this comment.
backslashreplace is only supported for writing to the file
I just tried it and it worked4me. There is also replace and a few others that don't hide corrupted input -> much more time-consuming if something goes wrong.
case-lib/hijack.sh
Outdated
| if ! perf_analyze; then | ||
| exit_status=1 | ||
| fi | ||
| perf_analyze |
Collaborator
There was a problem hiding this comment.
Suggested change
| perf_analyze | |
| perf_analyze || dlogw 'perf_analyze failed in exit handler' |
| eval "$perf_cmd" || { | ||
| dloge "SOF component performace analysis tool exit with error" | ||
| return 1 | ||
| dlogw "SOF component performace analysis tool exit with error" |
Collaborator
There was a problem hiding this comment.
It's more flexible and future-proof to leave that decision to the caller.
0189a9b to
838989c
Compare
Ignore faulty lines in mtrace file when analyzing it with sof_perf_analyzer.py script Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
838989c to
b127ff9
Compare
redzynix
approved these changes
Apr 9, 2026
PLangowski
approved these changes
Apr 9, 2026
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.
Add ignore errors option when decoding mtrace file in sof_perf_analyzer.py script.