Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions case-lib/hijack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ function func_exit_handler()

# Only do performance analysis on test passed
[ "x$exit_status" != "x0" ] || {
# On performance analysis return error, set exit code
if ! perf_analyze; then
exit_status=1
fi
perf_analyze || dlogw 'perf_analyze failed in exit handler'
}

# Only run when changing topology was initiated during the test
Expand Down
4 changes: 2 additions & 2 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1496,11 +1496,11 @@ perf_analyze()
fi
dlogc "$perf_cmd"
eval "$perf_cmd" || {
dloge "SOF component performace analysis tool exit with error"
dlogw "SOF component performace analysis tool exit with error"
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done

return 1
}
else
dloge "Firmware trace file not found"
dlogw "Firmware trace file not found"
return 1
fi
}
Expand Down
2 changes: 1 addition & 1 deletion tools/sof_perf_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backslashreplace is only supported for writing to the file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

trace_item_gen = make_trace_item(file)
trace_prev = None
try:
Expand Down
Loading