Skip to content

Conversation

@ekurdybx
Copy link
Contributor

New OS has different timestamp format in mtrace file. This fix makes sof_per_analyzer.py handle both formats correctly.

@ekurdybx ekurdybx requested review from a team, golowanow, lgirdwood and marc-hb as code owners January 27, 2026 13:43
@ekurdybx ekurdybx force-pushed the fix-mtrace-timestamp-convertion branch from 9c9eca3 to d15d154 Compare January 27, 2026 13:58
New OS has different timestamp format in mtrace file. This fix makes
sof_per_analyzer.py handle both formats correctly.

Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
@ekurdybx ekurdybx force-pushed the fix-mtrace-timestamp-convertion branch from d15d154 to 6aa732f Compare January 27, 2026 13:59
Copy link
Contributor

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Change looks good, but maybe add a reference to CONFIG_LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP and CONFIG_LOG_OUTPUT_FORMAT_TIME_TIMESTAMP. This PR adds support for the latter.

span_end_pos = match_obj.span()[1]
trace_lvl = line[span_end_pos - 4: span_end_pos - 1]
timestamp = float(line[span_end_pos - 19: span_end_pos - 7].strip())
try:
Copy link
Contributor

Choose a reason for hiding this comment

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

The difference is caused by the Zephyr log timestamp format. It seems in some new targets, the time format is not set (default Zephyr format is used) and this breaks test. I now submitted a pull request to make the Linux format the default in Linux overlay thesofproject/sof#10501 .

I think it's still ok to have support for both widely used Zephyr timestamp formats in sof-test, but maybe a comment either in a comment or in the git commit would be good that the difference is caused by Zephyr build options and whether CONFIG_LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP is set or not.

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