public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget
@ 2018-08-08  9:29 Liu, Changcheng
  2018-08-08 12:24 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Changcheng @ 2018-08-08  9:29 UTC (permalink / raw)
  To: broonie, Steven Rostedt, Ingo Molnar; +Cc: linux-kernel, akpm, changcheng.liu

Track snd_soc_dapm_widget:id which is used as dapm
sequence index in dapm_down_seq/dapm_up_seq. It's
useful for checking dapm seq after tracking it.

Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>

diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 40c300f..0bc935b 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -92,16 +92,18 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
 
 	TP_STRUCT__entry(
 		__string(	name,	w->name		)
+		__field(	int,	id		)
 		__field(	int,	val		)
 	),
 
 	TP_fast_assign(
 		__assign_str(name, w->name);
+		__entry->id = w->id;
 		__entry->val = val;
 	),
 
-	TP_printk("widget=%s val=%d", __get_str(name),
-		  (int)__entry->val)
+	TP_printk("widget=%s dapm_id=%d val=%d", __get_str(name),
+		  (int)__entry->id, (int)__entry->val)
 );
 
 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget
  2018-08-08  9:29 [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget Liu, Changcheng
@ 2018-08-08 12:24 ` Steven Rostedt
  2018-08-08 12:39   ` Liu, Changcheng
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2018-08-08 12:24 UTC (permalink / raw)
  To: Liu, Changcheng; +Cc: broonie, Ingo Molnar, linux-kernel, akpm

On Wed, 8 Aug 2018 17:29:27 +0800
"Liu, Changcheng" <changcheng.liu@intel.com> wrote:

> Track snd_soc_dapm_widget:id which is used as dapm
> sequence index in dapm_down_seq/dapm_up_seq. It's
> useful for checking dapm seq after tracking it.
> 
> Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
> 
> diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
> index 40c300f..0bc935b 100644
> --- a/include/trace/events/asoc.h
> +++ b/include/trace/events/asoc.h
> @@ -92,16 +92,18 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
>  
>  	TP_STRUCT__entry(
>  		__string(	name,	w->name		)
> +		__field(	int,	id		)
>  		__field(	int,	val		)
>  	),
>  
>  	TP_fast_assign(
>  		__assign_str(name, w->name);
> +		__entry->id = w->id;
>  		__entry->val = val;
>  	),
>  
> -	TP_printk("widget=%s val=%d", __get_str(name),
> -		  (int)__entry->val)
> +	TP_printk("widget=%s dapm_id=%d val=%d", __get_str(name),
> +		  (int)__entry->id, (int)__entry->val)

Not sure why it was there before, but the (int) typecast isn't needed
in either case. __field(int, val) makes __entry->val of type int. Same
for id.

-- Steve

>  );
>  
>  DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget
  2018-08-08 12:24 ` Steven Rostedt
@ 2018-08-08 12:39   ` Liu, Changcheng
  2018-08-08 12:53     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Changcheng @ 2018-08-08 12:39 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: broonie, mingo, linux-kernel, akpm

On 08:24 Wed 08 Aug, Steven Rostedt wrote:
> On Wed, 8 Aug 2018 17:29:27 +0800
> "Liu, Changcheng" <changcheng.liu@intel.com> wrote:
> 
> > Track snd_soc_dapm_widget:id which is used as dapm
> > sequence index in dapm_down_seq/dapm_up_seq. It's
> > useful for checking dapm seq after tracking it.
> > 
> > Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
> > 
> > diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
> > index 40c300f..0bc935b 100644
> > --- a/include/trace/events/asoc.h
> > +++ b/include/trace/events/asoc.h
> > @@ -92,16 +92,18 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
> >  
> >  	TP_STRUCT__entry(
> >  		__string(	name,	w->name		)
> > +		__field(	int,	id		)
> >  		__field(	int,	val		)
> >  	),
> >  
> >  	TP_fast_assign(
> >  		__assign_str(name, w->name);
> > +		__entry->id = w->id;
> >  		__entry->val = val;
> >  	),
> >  
> > -	TP_printk("widget=%s val=%d", __get_str(name),
> > -		  (int)__entry->val)
> > +	TP_printk("widget=%s dapm_id=%d val=%d", __get_str(name),
> > +		  (int)__entry->id, (int)__entry->val)
> 
> Not sure why it was there before, but the (int) typecast isn't needed
> in either case. __field(int, val) makes __entry->val of type int. Same
> for id.
> 
> -- Steve

@Steve: This patch aims at tracking the dapm up/down sequence. For the
(int) typecast format problem, what do you think of using another
seperate patch to resolve it?

-- Changcheng
> 
> >  );
> >  
> >  DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget
  2018-08-08 12:39   ` Liu, Changcheng
@ 2018-08-08 12:53     ` Steven Rostedt
  2018-08-08 12:59       ` Liu, Changcheng
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2018-08-08 12:53 UTC (permalink / raw)
  To: Liu, Changcheng; +Cc: broonie, mingo, linux-kernel, akpm

On Wed, 8 Aug 2018 20:39:22 +0800
"Liu, Changcheng" <changcheng.liu@intel.com> wrote:

> > > -	TP_printk("widget=%s val=%d", __get_str(name),
> > > -		  (int)__entry->val)
> > > +	TP_printk("widget=%s dapm_id=%d val=%d", __get_str(name),
> > > +		  (int)__entry->id, (int)__entry->val)  
> > 
> > Not sure why it was there before, but the (int) typecast isn't needed
> > in either case. __field(int, val) makes __entry->val of type int. Same
> > for id.
> > 
> > -- Steve  
> 
> @Steve: This patch aims at tracking the dapm up/down sequence. For the
> (int) typecast format problem, what do you think of using another
> seperate patch to resolve it?

Yeah, I was just commenting on that as a general comment. It doesn't
affect the actual patch, which I don't see anything wrong with it from
a tracing point of view.

I agree the typecast removal should be done in a separate clean-up
patch.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget
  2018-08-08 12:53     ` Steven Rostedt
@ 2018-08-08 12:59       ` Liu, Changcheng
  0 siblings, 0 replies; 5+ messages in thread
From: Liu, Changcheng @ 2018-08-08 12:59 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: broonie, mingo, linux-kernel, akpm

Thanks Steven for the suggestion.
I'll write two patches. One is for cleaning the format issue. The other
is for tracking the dapm up/down sequence in trace events.

B.R.
Changcheng

On 08:53 Wed 08 Aug, Steven Rostedt wrote:
> On Wed, 8 Aug 2018 20:39:22 +0800
> "Liu, Changcheng" <changcheng.liu@intel.com> wrote:
> 
> > > > -	TP_printk("widget=%s val=%d", __get_str(name),
> > > > -		  (int)__entry->val)
> > > > +	TP_printk("widget=%s dapm_id=%d val=%d", __get_str(name),
> > > > +		  (int)__entry->id, (int)__entry->val)  
> > > 
> > > Not sure why it was there before, but the (int) typecast isn't needed
> > > in either case. __field(int, val) makes __entry->val of type int. Same
> > > for id.
> > > 
> > > -- Steve  
> > 
> > @Steve: This patch aims at tracking the dapm up/down sequence. For the
> > (int) typecast format problem, what do you think of using another
> > seperate patch to resolve it?
> 
> Yeah, I was just commenting on that as a general comment. It doesn't
> affect the actual patch, which I don't see anything wrong with it from
> a tracing point of view.
> 
> I agree the typecast removal should be done in a separate clean-up
> patch.
> 
> -- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-08 13:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08  9:29 [PATCH] ASoC: trace: track dapm type in snd_soc_dapm_widget Liu, Changcheng
2018-08-08 12:24 ` Steven Rostedt
2018-08-08 12:39   ` Liu, Changcheng
2018-08-08 12:53     ` Steven Rostedt
2018-08-08 12:59       ` Liu, Changcheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox