tools: fix: mtrace timestamp convertion#1342
Conversation
d15d154 to
6aa732f
Compare
kv2019i
left a comment
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
d5eb9eb to
bcabae3
Compare
|
change commit message, first place should be area where you apply changes : tools: fix: etc |
bcabae3 to
898b839
Compare
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>
898b839 to
ae0cc7c
Compare
Support for different timestamp format in mtrace file. This fix makes sof_per_analyzer.py handle CONFIG_LOG_OUTPUT_FORMAT_TIME_TIMESTAMP format correctly.