[DEBUG] dtrace position and copy #3526
Closed
ujfalusi wants to merge 6 commits intothesofproject:topic/sof-devfrom
Closed
[DEBUG] dtrace position and copy #3526ujfalusi wants to merge 6 commits intothesofproject:topic/sof-devfrom
ujfalusi wants to merge 6 commits intothesofproject:topic/sof-devfrom
Conversation
4882528 to
32e30a2
Compare
Collaborator
Author
|
SOFCI TEST |
With the new state we can make sure we are not missing the first host_offset update. In case the dtrace is small, the DMA copy will be fast and depending on the moonphase it might be done before we set the sdev->dtrace_state to SOF_DTRACE_ENABLED. The DMA will start the copy as soon as the host starts the DMA. Set the dtrace to enabled before we let the DMA to run in order to avoid missing the position update. The new state is needed to cover architectures where the host side snd_sof_dma_trace_trigger() is a NOP and the dtrace in the firmware is ready as soon as the IPC message has been processed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
We are using the READ_ONCE() on the debugfs read path for accessing sdev->host_offset, but the set is not atomic or protected in any way. Add a small helper to do the host_offset update and be really paranoid about the a possible race in update Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…lable If no new trace data is available then return immediately, there is no need to continue with the execution of the trace_read() function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Printing out the host_offset can help tracking the progress and can provide insights of anything suspicious going on with the dtrace. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To see what is actually going on. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To see of the sof-logger is opening the file in the first place... Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
82d82e1 to
83f74b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.