-
Notifications
You must be signed in to change notification settings - Fork 61
fix: tools: sof_perf_analyzer: ignore errors when decoding mtrace file #1357
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -173,7 +173,7 @@ def process_trace_file(): | |||||
| # | ||||||
| # 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. backslashreplace is only supported for writing to the file
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I just tried it and it worked4me. There is also |
||||||
| trace_item_gen = make_trace_item(file) | ||||||
| trace_prev = None | ||||||
| try: | ||||||
|
|
||||||
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.
It's more flexible and future-proof to leave that decision to the caller.
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.
Ok, done