Skip to content

add tracing POC - #3482

Merged
plbossart merged 7 commits into
thesofproject:topic/sof-devfrom
nklayman:add-tracing
Apr 20, 2022
Merged

plbossart merged 7 commits into
thesofproject:topic/sof-devfrom
nklayman:add-tracing

Conversation

@nklayman

@nklayman nklayman commented Mar 5, 2022 •

Copy link
Copy Markdown

Adds tracepoints for widget setup/free and hda irq events. See this article for information on how kernel tracepoints are defined.

Comment thread sound/soc/sof/sof-audio.c Outdated
Comment thread sound/soc/sof/sof-audio.c Outdated

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks @nklayman see comments below

Comment thread include/trace/events/sof.h
Comment thread sound/soc/sof/sof-audio.c
Comment thread sound/soc/sof/sof-audio.c
Comment thread include/trace/events/sof_intel.h
Comment thread sound/soc/sof/intel/hda.c Outdated
@plbossart

Copy link
Copy Markdown
Member

@nklayman you have a set of conflicts, need to rebase this branch

@nklayman
nklayman force-pushed the add-tracing branch 3 times, most recently from 06ef86a to 72450a7 Compare March 29, 2022 20:26
Comment thread sound/soc/sof/intel/hda-ipc.c Outdated
Comment thread sound/soc/sof/intel/hda-stream.c
Comment thread sound/soc/sof/ipc4-loader.c
Comment thread include/trace/events/sof.h Outdated
@ranj063

ranj063 commented Mar 29, 2022

Copy link
Copy Markdown
Collaborator

@ujfalusi do you mind taking a look at this one too?

@nklayman
nklayman force-pushed the add-tracing branch 4 times, most recently from 157d89e to 7fbb3fa Compare March 29, 2022 22:29
@nklayman
nklayman marked this pull request as ready for review March 30, 2022 00:03
Enables tracking of use_count during widget setup and free routines.
Useful for debugging unbalanced use_counts during suspend/resume.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
@nklayman
nklayman force-pushed the add-tracing branch 2 times, most recently from 3062e2c to 0b56cc8 Compare April 8, 2022 05:20
ujfalusi
ujfalusi previously approved these changes Apr 8, 2022
Comment thread include/trace/events/sof.h

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks very good @nklayman, see below a couple of nit-picks to make the upstream reviews easier. Both @ranj063 and @ujfalusi had the same type of comments so chances are others will ask why we removed logs without replacing them with a tracepoint, and "pierre asked for it" should become a formal removal patch applied earlier than the tracepoint conversion.

One more round and we should be good to go. Happy Friday!

Comment thread sound/soc/sof/intel/hda.c
Comment thread sound/soc/sof/intel/hda-stream.c
Comment thread sound/soc/sof/sof-utils.c
Comment thread sound/soc/sof/topology.c
Comment thread sound/soc/sof/topology.c
Comment thread include/trace/events/sof.h
plbossart
plbossart previously approved these changes Apr 13, 2022

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM @nklayman, thanks!

@plbossart
plbossart requested review from marc-hb and ranj063 April 13, 2022 18:21
Comment thread sound/soc/sof/intel/hda.c Outdated
The Intel HDaudio controller relies on a single interrupt line which
wire-ORs multiple interrupt sources, such as stream, IPC, SoundWire and
wakes. This patch adds the ability to trace each event occurrence.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
This patch removes an unneeded dev_vdbg call in hda-stream.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
This patch removes some unneeded dev_vdbg calls.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
This patch replaces all dev_vdbg calls with tracepoints to reduce
overhead and enable use of trace collection and analysis tools.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
This patch removes unneeded dev_vdbg calls and replaces remaining ones
with tracepoints to reduce overhead and enable use of trace collection
and analysis tools.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
This patch replaces dev_vdbg with tracepoints in new ipc4-loader code.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
@plbossart

Copy link
Copy Markdown
Member

@bardliao @ujfalusi @marc-hb can you take one last look? This looks ready to merge IMHO

@plbossart
plbossart requested a review from ujfalusi April 19, 2022 15:51
@marc-hb

marc-hb commented Apr 19, 2022

Copy link
Copy Markdown
Collaborator

I'm not familiar with this part of the code sorry. I spent a fair amount of time reviewing the user space part of this in thesofproject/sof-test#877 so I believe I've done my fair share :-)

@bardliao bardliao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM Thanks

@ujfalusi ujfalusi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@nklayman, looks nice, thank you!

@plbossart
plbossart merged commit dd46748 into thesofproject:topic/sof-dev Apr 20, 2022
@plbossart

Copy link
Copy Markdown
Member

Congratulations @nklayman, all your tracing patches will be in the Linux kernel 6.1.

https://lore.kernel.org/alsa-devel/166362902112.3419825.5579029076965625073.b4-ty@kernel.org/T/#t

Yay!

@nklayman

Copy link
Copy Markdown
Author

Awesome! Thanks everyone for the help with this!

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