Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Apr 24, 2019

If logger reads an end-of-file from trace node, reopen the file
to ensure trace read position is in sync between host and DSP.

This allows to avoid duplicate/misordered traces at suspend/resume cycles when used together with PR781 thesofproject/linux#781

This patch can be merged independently of PR781, there is no hard dependency.

If logger reads an end-of-file from trace node, reopen the file
to ensure trace read position is in sync between host and DSP.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Copy link
Contributor

@keyonjie keyonjie left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for addressing this.

@lgirdwood
Copy link
Member

lgirdwood commented Apr 25, 2019

@zrombel not sure why CI test would fail as this PR is for a python script used to view trace.

@zrombel
Copy link

zrombel commented Apr 25, 2019

PR was rebuild and all tests pass. It was a server issue.

@jajanusz jajanusz merged commit 6a84b4e into thesofproject:master Apr 25, 2019
if (!ret) {
if (config->trace)
if (config->trace && !ferror(config->in_fd)) {
freopen(NULL, "r", config->in_fd);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ignored returned value reported by gcc 9.3 -Werr, fixed in #3412

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.

6 participants