Skip to content

fix: tools: sof_perf_analyzer: ignore errors when decoding mtrace file#1357

Open
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
ekurdybx:fix-sof-perf-analyzer
Open

fix: tools: sof_perf_analyzer: ignore errors when decoding mtrace file#1357
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
ekurdybx:fix-sof-perf-analyzer

Conversation

@ekurdybx
Copy link
Copy Markdown
Contributor

@ekurdybx ekurdybx commented Apr 7, 2026

Add ignore errors option when decoding mtrace file in sof_perf_analyzer.py script.

@ekurdybx ekurdybx force-pushed the fix-sof-perf-analyzer branch from 36d69d3 to 72ec037 Compare April 7, 2026 11:48
Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
@ekurdybx ekurdybx force-pushed the fix-sof-perf-analyzer branch from 72ec037 to 0189a9b Compare April 7, 2026 11:50
@ekurdybx ekurdybx marked this pull request as ready for review April 7, 2026 13:05
@ekurdybx ekurdybx requested review from a team, golowanow, lgirdwood and marc-hb as code owners April 7, 2026 13:05
Copy link
Copy Markdown
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

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

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'

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants