Skip to content
Open
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
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
perf_analyze
perf_analyze || dlogw 'perf_analyze failed in exit handler'

}

# Only run when changing topology was initiated during the test
Expand Down
6 changes: 2 additions & 4 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1496,12 +1496,10 @@ perf_analyze()
fi
dlogc "$perf_cmd"
eval "$perf_cmd" || {
dloge "SOF component performace analysis tool exit with error"
return 1
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.

}
else
dloge "Firmware trace file not found"
return 1
dlogw "Firmware trace file not found"
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".

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