Skip to content

Conversation

@ekurdybx
Copy link
Contributor

@ekurdybx ekurdybx commented Jan 27, 2026

Support for different timestamp format in mtrace file. This fix makes sof_per_analyzer.py handle CONFIG_LOG_OUTPUT_FORMAT_TIME_TIMESTAMP format 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 2 times, most recently 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.

@ekurdybx ekurdybx force-pushed the fix-mtrace-timestamp-convertion branch 2 times, most recently from d5eb9eb to bcabae3 Compare January 29, 2026 09:42
@majunkier
Copy link
Contributor

change commit message, first place should be area where you apply changes : tools: fix: etc

@ekurdybx ekurdybx force-pushed the fix-mtrace-timestamp-convertion branch from bcabae3 to 898b839 Compare January 29, 2026 09:50
Support for the default Zephyr timestamp format in mtrace file. This fix makes
sof_per_analyzer.py handle CONFIG_LOG_OUTPUT_FORMAT_TIME_TIMESTAMP
format correctly.

Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
@ekurdybx ekurdybx force-pushed the fix-mtrace-timestamp-convertion branch from 898b839 to ae0cc7c Compare January 29, 2026 10:19
@ekurdybx ekurdybx changed the title fix: mtrace timestamp convertion tools: fix: mtrace timestamp convertion Jan 29, 2026
@ekurdybx ekurdybx merged commit 6c1908c into thesofproject:main Jan 29, 2026
3 checks passed
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.

3 participants