Skip to content

dump IPC message payload to dmesg #118

Closed

Description

@xiulipan

Dump IPC message payload to help debug and reproduce IPC message.

Activity

  1. added
    enhancement
    on Sep 10, 2018
  2. wenqingfu commented on Feb 2, 2019

    @wenqingfu

    Do we still need this feature? @xiulipan

  3. ranj063 commented on Feb 2, 2019

    @ranj063
    Collaborator

    @wenqingfu yes we do need this feature. This will be very helpful in making sure the IPC payload isnt tainted before it is sent to the DSP

  4. lyakh commented on Feb 2, 2019

    @lyakh
    Collaborator

    I actually wanted to have a "dump IPC" feature but for a completely different reason - to use a live system to record topology IPC messages to then create an object from those messages to be integrated with the DSP firmware image for the host-less mode. But I would actually use something different than the kernel logging for that. Something like debugfs / /proc / netlink or even a new ioctl to an existing device node... But I'm not sure how IPCs can be tainted - don't we have a much larger problem if IPC messages can be tainted on a system? @ranj063 could you clarify?

  5. ranj063 commented on Feb 2, 2019

    @ranj063
    Collaborator

    @lyakh I do not think they are. This is related to the issue thesofproject/sof#766.

  6. xiulipan commented on Feb 10, 2019

    @xiulipan
    Author

    @lyakh
    Actually this feature originally is about reproduce some bug on host-less DSP on QEMU or some other simulator. And I think that is just what you think?
    @ranj063
    Good point! I think this will also have benefit about this kind of bugs. To help us make sure the payload is what we expect.

  7. lyakh commented on Feb 11, 2019

    @lyakh
    Collaborator

    @ranj063 @xiulipan @wenqingfu what if we do this as a debugfs file with a blocking read? I'm not a huge fan of polluting the kernel log with potentially many (dozens? hundreds?) messages per second.

  8. xiulipan commented on Feb 14, 2019

    @xiulipan
    Author

    @lyakh
    The point is that, we could not know when to read the payload from debugfs. The IPC is pretty quick to send.
    Or you suggest we have another debugfs to store all IPC message in history order?

  9. lyakh commented on Feb 14, 2019

    @lyakh
    Collaborator

    @xiulipan it would be a different debugfs file, sure, similar to the logger. Yes, you would have to capture it explicitly, it wouldn't be saved automatically, and it would be more difficult to synchronise IPC messages with the rest of debugging output. So, we have to weigh the pros and the cons.

  10. xiulipan commented on Feb 14, 2019

    @xiulipan
    Author

    @lyakh
    That sound reasonable.
    And if we could know what is the input date format for the host-less DSP system, then we can directly output in that format.

  11. plbossart commented on Mar 24, 2019

    @plbossart
    Member

    @lyakh can you confirm you are working on this? there's been no update since Feb 14. I believe this is needed to help our firmware colleagues reproduce issues with the scripts.

  12. lyakh commented on Mar 25, 2019

    @lyakh
    Collaborator

    @plbossart @lgirdwood I'd like to have some more opinions on my proposal to implement this as a debugfs file in addition to @xiulipan's comment

  13. plbossart commented on Mar 25, 2019

    @plbossart
    Member

    @lyakh I don't see any problems with saving the IPC payload with an appropriate format and time stamping in a debugfs file. We already have too many logs in dmesg, and adding all the content in dmesg isn't scalable/usable.

  14. lgirdwood commented on Mar 25, 2019

    @lgirdwood
    Member

    @plbossart Mark had preference for this going via trace as ASCII hex data.

  15. plbossart commented on Mar 25, 2019

    @plbossart
    Member

    @lgirdwood i was indicating my preference for a solution that doesn't rely on dmesg - as described in the title. we could do the debugfs first and then add the integration in the Linux trace. The latter would also need to be done for the sof-logger DSP trace btw if we want to be consistent.

  16. tlauda commented on Mar 25, 2020

    @tlauda

    @plbossart @lgirdwood @wenqingfu @lbetlej Could we prioritize this feature? By parsing dumped payload we could recreate many sequences using our slim driver, which would speed up the process of debugging issues. The similar mechanism worked great for Windows. Of course to recreate the correct sequence the log would need to also have some additional information, like host stream buffer info, stream trigger etc.

  17. plbossart commented on Mar 25, 2020

    @plbossart
    Member

    @tlauda what do you mean with additional information? If we dump the IPC payload in debugfs you'll get the IPC payload. If you want more context for this to be useful, then we'd have to instrument all IPC usages and define a syntax for what you want.

  18. added a commit that references this issue on May 4, 2020
  19. added a commit that references this issue on May 6, 2021
  20. ujfalusi commented on Jan 14, 2025

    @ujfalusi
    Collaborator

    Implemented for IPC3 and IPC4
    d498a3b, c3d275e and d01c763

    Bit 11 in sof_debug command line parameter

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

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions