aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-04 00:07:02 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-11 09:54:31 -0500
commit84e909303dbd3c8d882f152c17d1319f2873e147 (patch)
tree6ee9db7f42423282bbe9b17233eff20b8cddacbc /include/trace
parenta8b1d34f3ee1bc139ac5fbe3f84f6d16c90136bb (diff)
ASoC: Add DAPM trace events
Trace events for DAPM allow us to monitor the performance and behaviour of DAPM with logging which can be built into the kernel permanantly, is more suited to automated analysis and display and less likely to suffer interference from other logging activity. Currently trace events are generated for: - Start and stop of DAPM processing - Start and stop of bias level changes - Power decisions for widgets - Widget event execution start and stop giving some view as to what is happening and where latencies occur. Actual changes in widget power can be seen via the register write trace in soc-core. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/asoc.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 93c3371daaca..9978856d5897 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -8,6 +8,8 @@
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9 9
10struct snd_soc_codec; 10struct snd_soc_codec;
11struct snd_soc_card;
12struct snd_soc_dapm_widget;
11 13
12/* 14/*
13 * Log register events 15 * Log register events
@@ -56,7 +58,117 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
56 58
57); 59);
58 60
61DECLARE_EVENT_CLASS(snd_soc_card,
59 62
63 TP_PROTO(struct snd_soc_card *card, int val),
64
65 TP_ARGS(card, val),
66
67 TP_STRUCT__entry(
68 __string( name, card->name )
69 __field( int, val )
70 ),
71
72 TP_fast_assign(
73 __assign_str(name, card->name);
74 __entry->val = val;
75 ),
76
77 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
78);
79
80DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
81
82 TP_PROTO(struct snd_soc_card *card, int val),
83
84 TP_ARGS(card, val)
85
86);
87
88DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
89
90 TP_PROTO(struct snd_soc_card *card, int val),
91
92 TP_ARGS(card, val)
93
94);
95
96DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
97
98 TP_PROTO(struct snd_soc_card *card),
99
100 TP_ARGS(card),
101
102 TP_STRUCT__entry(
103 __string( name, card->name )
104 ),
105
106 TP_fast_assign(
107 __assign_str(name, card->name);
108 ),
109
110 TP_printk("card=%s", __get_str(name))
111);
112
113DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
114
115 TP_PROTO(struct snd_soc_card *card),
116
117 TP_ARGS(card)
118
119);
120
121DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
122
123 TP_PROTO(struct snd_soc_card *card),
124
125 TP_ARGS(card)
126
127);
128
129DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
130
131 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
132
133 TP_ARGS(w, val),
134
135 TP_STRUCT__entry(
136 __string( name, w->name )
137 __field( int, val )
138 ),
139
140 TP_fast_assign(
141 __assign_str(name, w->name);
142 __entry->val = val;
143 ),
144
145 TP_printk("widget=%s val=%d", __get_str(name),
146 (int)__entry->val)
147);
148
149DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
150
151 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
152
153 TP_ARGS(w, val)
154
155);
156
157DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
158
159 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
160
161 TP_ARGS(w, val)
162
163);
164
165DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
166
167 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
168
169 TP_ARGS(w, val)
170
171);
60 172
61#endif /* _TRACE_ASOC_H */ 173#endif /* _TRACE_ASOC_H */
62 174