ASoC: trace: track dapm type in snd_soc_dapm_widget
PATCH 1/1 ASoC: trace: track dapm type in snd_soc_dapm_widget
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.
include/trace/events/asoc.h +4 -2
@@ -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,
Signature · 1 line
2.7.4
Steven Rostedt
maintainerQuoted 18 lines · Changcheng
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 <[email protected]>include/trace/events/asoc.h +1
-0@@ -92,16 +92,18 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,TP_STRUCT__entry ( __string( name, w->name ) + __field( int, id )__field ( int, val ) ),
include/trace/events/asoc.h DECLARE_EVENT_CLASS(snd_soc_dapm_widget, · line 106
Quoted 10 lines
include/trace/events/asoc.h +3
-2TP_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
Quoted 3 lines
include/trace/events/asoc.h +0
-0); DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
Quoted 36 lines · Steven Rostedt
Quoted 18 lines · Changcheng
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 <[email protected]>include/trace/events/asoc.h +1
-0@@ -92,16 +92,18 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,TP_STRUCT__entry ( __string( name, w->name ) + __field( int, id )__field ( int, val ) ),include/trace/events/asoc.h DECLARE_EVENT_CLASS(snd_soc_dapm_widget, · line 106
Quoted 10 lines
include/trace/events/asoc.h +3
-2TP_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->valof type int. Same for id.
Quoted 1 line
-- 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
Quoted 5 lines
Quoted 4 lines
include/trace/events/asoc.h +0
-0); DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
Steven Rostedt
maintainerQuoted 9 lines · Changcheng
Quoted 9 lines
include/trace/events/asoc.h DECLARE_EVENT_CLASS(snd_soc_dapm_widget, · line 106
Quoted 4 lines
include/trace/events/asoc.h +2
-2-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->valof type int. Same for id.
Quoted 5 lines
Quoted 1 line
-- 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
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
Quoted 26 lines · Steven Rostedt
Quoted 9 lines · Changcheng
Quoted 9 lines
include/trace/events/asoc.h DECLARE_EVENT_CLASS(snd_soc_dapm_widget, · line 106
Quoted 4 lines
include/trace/events/asoc.h +2
-2-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->valof type int. Same for id.Quoted 5 lines
Quoted 1 line
-- 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