Fix: update sched instrumentation for kernel 4.12
[lttng-modules.git] / instrumentation / events / lttng-module / asoc.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM asoc
3
4 #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_ASOC_H
6
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/ktime.h>
9 #include <linux/version.h>
10
11 #define DAPM_DIRECT "(direct)"
12
13 #ifndef _TRACE_ASOC_DEF
14 #define _TRACE_ASOC_DEF
15 struct snd_soc_jack;
16 struct snd_soc_codec;
17 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
18 struct snd_soc_platform;
19 #endif
20 struct snd_soc_card;
21 struct snd_soc_dapm_widget;
22 #endif
23
24 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) \
25 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,514,0,0, 3,11,0,0,0,0))
26 #define CODEC_NAME_FIELD component.name
27 #define CODEC_ID_FIELD component.id
28 #else
29 #define CODEC_NAME_FIELD name
30 #define CODEC_ID_FIELD id
31 #endif
32
33 /*
34 * Log register events
35 */
36 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_reg,
37
38 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
39 unsigned int val),
40
41 TP_ARGS(codec, reg, val),
42
43 TP_FIELDS(
44 ctf_string(name, codec->CODEC_NAME_FIELD)
45 ctf_integer(int, id, codec->CODEC_ID_FIELD)
46 ctf_integer(unsigned int, reg, reg)
47 ctf_integer(unsigned int, val, val)
48 )
49 )
50
51 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_write,
52
53 asoc_snd_soc_reg_write,
54
55 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
56 unsigned int val),
57
58 TP_ARGS(codec, reg, val)
59
60 )
61
62 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_read,
63
64 asoc_snd_soc_reg_read,
65
66 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
67 unsigned int val),
68
69 TP_ARGS(codec, reg, val)
70
71 )
72
73 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
74 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg,
75
76 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
77 unsigned int val),
78
79 TP_ARGS(platform, reg, val),
80
81 TP_FIELDS(
82 ctf_string(name, platform->CODEC_NAME_FIELD)
83 ctf_integer(int, id, platform->CODEC_ID_FIELD)
84 ctf_integer(unsigned int, reg, reg)
85 ctf_integer(unsigned int, val, val)
86 )
87 )
88
89 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_write,
90
91 asoc_snd_soc_preg_write,
92
93 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
94 unsigned int val),
95
96 TP_ARGS(platform, reg, val)
97
98 )
99
100 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_read,
101
102 asoc_snd_soc_preg_read,
103
104 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
105 unsigned int val),
106
107 TP_ARGS(platform, reg, val)
108
109 )
110 #endif
111
112 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card,
113
114 TP_PROTO(struct snd_soc_card *card, int val),
115
116 TP_ARGS(card, val),
117
118 TP_FIELDS(
119 ctf_string(name, card->name)
120 ctf_integer(int, val, val)
121 )
122 )
123
124 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_start,
125
126 asoc_snd_soc_bias_level_start,
127
128 TP_PROTO(struct snd_soc_card *card, int val),
129
130 TP_ARGS(card, val)
131
132 )
133
134 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_done,
135
136 asoc_snd_soc_bias_level_done,
137
138 TP_PROTO(struct snd_soc_card *card, int val),
139
140 TP_ARGS(card, val)
141
142 )
143
144 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic,
145
146 TP_PROTO(struct snd_soc_card *card),
147
148 TP_ARGS(card),
149
150 TP_FIELDS(
151 ctf_string(name, card->name)
152 )
153 )
154
155 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start,
156
157 asoc_snd_soc_dapm_start,
158
159 TP_PROTO(struct snd_soc_card *card),
160
161 TP_ARGS(card)
162
163 )
164
165 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done,
166
167 asoc_snd_soc_dapm_done,
168
169 TP_PROTO(struct snd_soc_card *card),
170
171 TP_ARGS(card)
172
173 )
174
175 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget,
176
177 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
178
179 TP_ARGS(w, val),
180
181 TP_FIELDS(
182 ctf_string(name, w->name)
183 ctf_integer(int, val, val)
184 )
185 )
186
187 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_power,
188
189 asoc_snd_soc_dapm_widget_power,
190
191 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
192
193 TP_ARGS(w, val)
194
195 )
196
197 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
198
199 asoc_snd_soc_dapm_widget_event_start,
200
201 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
202
203 TP_ARGS(w, val)
204
205 )
206
207 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
208
209 asoc_snd_soc_dapm_widget_event_done,
210
211 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
212
213 TP_ARGS(w, val)
214
215 )
216
217 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
218 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done,
219
220 asoc_snd_soc_dapm_walk_done,
221
222 TP_PROTO(struct snd_soc_card *card),
223
224 TP_ARGS(card),
225
226 TP_FIELDS(
227 ctf_string(name, card->name)
228 ctf_integer(int, power_checks, card->dapm_stats.power_checks)
229 ctf_integer(int, path_checks, card->dapm_stats.path_checks)
230 ctf_integer(int, neighbour_checks, card->dapm_stats.neighbour_checks)
231 )
232 )
233 #endif
234
235 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
236 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path,
237
238 asoc_snd_soc_dapm_output_path,
239
240 TP_PROTO(struct snd_soc_dapm_widget *widget,
241 struct snd_soc_dapm_path *path),
242
243 TP_ARGS(widget, path),
244
245 TP_FIELDS(
246 ctf_string(wname, widget->name)
247 ctf_string(pname, path->name ? path->name : DAPM_DIRECT)
248 ctf_string(psname, path->sink->name)
249 ctf_integer(int, path_sink, (long) path->sink)
250 ctf_integer(int, path_connect, path->connect)
251 )
252 )
253
254 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path,
255
256 asoc_snd_soc_dapm_input_path,
257
258 TP_PROTO(struct snd_soc_dapm_widget *widget,
259 struct snd_soc_dapm_path *path),
260
261 TP_ARGS(widget, path),
262
263 TP_FIELDS(
264 ctf_string(wname, widget->name)
265 ctf_string(pname,path->name ? path->name : DAPM_DIRECT)
266 ctf_string(psname, path->source->name)
267 ctf_integer(int, path_source, (long) path->source)
268 ctf_integer(int, path_connect, path->connect)
269 )
270 )
271
272 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected,
273
274 asoc_snd_soc_dapm_connected,
275
276 TP_PROTO(int paths, int stream),
277
278 TP_ARGS(paths, stream),
279
280 TP_FIELDS(
281 ctf_integer(int, paths, paths)
282 ctf_integer(int, stream, stream)
283 )
284 )
285 #endif
286
287 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq,
288
289 asoc_snd_soc_jack_irq,
290
291 TP_PROTO(const char *name),
292
293 TP_ARGS(name),
294
295 TP_FIELDS(
296 ctf_string(name, name)
297 )
298 )
299
300 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report,
301
302 asoc_snd_soc_jack_report,
303
304 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
305
306 TP_ARGS(jack, mask, val),
307
308 TP_FIELDS(
309 ctf_string(name, jack->jack->name)
310 ctf_integer(int, mask, mask)
311 ctf_integer(int, val, val)
312 )
313 )
314
315 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify,
316
317 asoc_snd_soc_jack_notify,
318
319 TP_PROTO(struct snd_soc_jack *jack, int val),
320
321 TP_ARGS(jack, val),
322
323 TP_FIELDS(
324 ctf_string(name, jack->jack->name)
325 ctf_integer(int, val, val)
326 )
327 )
328
329 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync,
330
331 asoc_snd_soc_cache_sync,
332
333 TP_PROTO(struct snd_soc_codec *codec, const char *type,
334 const char *status),
335
336 TP_ARGS(codec, type, status),
337
338 TP_FIELDS(
339 ctf_string(name, codec->CODEC_NAME_FIELD)
340 ctf_string(status, status)
341 ctf_string(type, type)
342 ctf_integer(int, id, codec->CODEC_ID_FIELD)
343 )
344 )
345
346 #endif /* LTTNG_TRACE_ASOC_H */
347
348 /* This part must be outside protection */
349 #include <probes/define_trace.h>
This page took 0.038961 seconds and 4 git commands to generate.