File Index
Files and directories
Sign in
FILE

qcom_glink_trace.h

File preview with syntax highlighting.

linux-6.19.14/drivers/rpmsg/qcom_glink_trace.h C
  1/* SPDX-License-Identifier: GPL-2.0 */
  2
  3#undef TRACE_SYSTEM
  4#define TRACE_SYSTEM qcom_glink
  5
  6#if !defined(__QCOM_GLINK_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
  7#define __QCOM_GLINK_TRACE_H__
  8
  9#include <linux/tracepoint.h>
 10#include "qcom_glink_native.h"
 11
 12
 13TRACE_EVENT(qcom_glink_cmd_version,
 14	TP_PROTO(const char *remote, unsigned int version, unsigned int features, bool tx),
 15	TP_ARGS(remote, version, features, tx),
 16	TP_STRUCT__entry(
 17		__string(remote, remote)
 18		__field(u32, version)
 19		__field(u32, features)
 20		__field(bool, tx)
 21	),
 22	TP_fast_assign(
 23		__assign_str(remote);
 24		__entry->version = version;
 25		__entry->features = features;
 26		__entry->tx = tx;
 27	),
 28	TP_printk("%s remote: %s version: %u features: %#x",
 29		  __entry->tx ? "tx" : "rx",
 30		  __get_str(remote),
 31		  __entry->version,
 32		  __entry->features
 33	)
 34);
 35#define trace_qcom_glink_cmd_version_tx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, true)
 36#define trace_qcom_glink_cmd_version_rx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, false)
 37
 38TRACE_EVENT(qcom_glink_cmd_version_ack,
 39	TP_PROTO(const char *remote, unsigned int version, unsigned int features, bool tx),
 40	TP_ARGS(remote, version, features, tx),
 41	TP_STRUCT__entry(
 42		__string(remote, remote)
 43		__field(u32, version)
 44		__field(u32, features)
 45		__field(bool, tx)
 46	),
 47	TP_fast_assign(
 48		__assign_str(remote);
 49		__entry->version = version;
 50		__entry->features = features;
 51		__entry->tx = tx;
 52	),
 53	TP_printk("%s remote: %s version: %u features: %#x",
 54		  __entry->tx ? "tx" : "rx",
 55		  __get_str(remote),
 56		  __entry->version,
 57		  __entry->features
 58	)
 59);
 60#define trace_qcom_glink_cmd_version_ack_tx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, true)
 61#define trace_qcom_glink_cmd_version_ack_rx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, false)
 62
 63TRACE_EVENT(qcom_glink_cmd_open,
 64	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),
 65	TP_ARGS(remote, channel, lcid, rcid, tx),
 66	TP_STRUCT__entry(
 67		__string(remote, remote)
 68		__string(channel, channel)
 69		__field(u16, lcid)
 70		__field(u16, rcid)
 71		__field(bool, tx)
 72	),
 73	TP_fast_assign(
 74		__assign_str(remote);
 75		__assign_str(channel);
 76		__entry->lcid = lcid;
 77		__entry->rcid = rcid;
 78		__entry->tx = tx;
 79	),
 80	TP_printk("%s remote: %s channel: %s[%u/%u]",
 81		  __entry->tx ? "tx" : "rx",
 82		  __get_str(remote),
 83		  __get_str(channel),
 84		  __entry->lcid,
 85		  __entry->rcid
 86	)
 87);
 88#define trace_qcom_glink_cmd_open_tx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, true)
 89#define trace_qcom_glink_cmd_open_rx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, false)
 90
 91TRACE_EVENT(qcom_glink_cmd_close,
 92	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),
 93	TP_ARGS(remote, channel, lcid, rcid, tx),
 94	TP_STRUCT__entry(
 95		__string(remote, remote)
 96		__string(channel, channel)
 97		__field(u16, lcid)
 98		__field(u16, rcid)
 99		__field(bool, tx)
100	),
101	TP_fast_assign(
102		__assign_str(remote);
103		__assign_str(channel);
104		__entry->lcid = lcid;
105		__entry->rcid = rcid;
106		__entry->tx = tx;
107	),
108	TP_printk("%s remote: %s channel: %s[%u/%u]",
109		  __entry->tx ? "tx" : "rx",
110		  __get_str(remote),
111		  __get_str(channel),
112		  __entry->lcid,
113		  __entry->rcid
114	)
115);
116#define trace_qcom_glink_cmd_close_tx(...) trace_qcom_glink_cmd_close(__VA_ARGS__, true)
117#define trace_qcom_glink_cmd_close_rx(...) trace_qcom_glink_cmd_close(__VA_ARGS__, false)
118
119TRACE_EVENT(qcom_glink_cmd_open_ack,
120	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),
121	TP_ARGS(remote, channel, lcid, rcid, tx),
122	TP_STRUCT__entry(
123		__string(remote, remote)
124		__string(channel, channel)
125		__field(u16, lcid)
126		__field(u16, rcid)
127		__field(bool, tx)
128	),
129	TP_fast_assign(
130		__assign_str(remote);
131		__assign_str(channel);
132		__entry->lcid = lcid;
133		__entry->rcid = rcid;
134		__entry->tx = tx;
135	),
136	TP_printk("%s remote: %s channel: %s[%u/%u]",
137		  __entry->tx ? "tx" : "rx",
138		  __get_str(remote),
139		  __get_str(channel),
140		  __entry->lcid,
141		  __entry->rcid
142	)
143);
144#define trace_qcom_glink_cmd_open_ack_tx(...) trace_qcom_glink_cmd_open_ack(__VA_ARGS__, true)
145#define trace_qcom_glink_cmd_open_ack_rx(...) trace_qcom_glink_cmd_open_ack(__VA_ARGS__, false)
146
147TRACE_EVENT(qcom_glink_cmd_intent,
148	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, size_t count, size_t size, u32 liid, bool tx),
149	TP_ARGS(remote, channel, lcid, rcid, count, size, liid, tx),
150	TP_STRUCT__entry(
151		__string(remote, remote)
152		__string(channel, channel)
153		__field(u16, lcid)
154		__field(u16, rcid)
155		__field(u32, count)
156		__field(u32, size)
157		__field(u32, liid)
158		__field(bool, tx)
159	),
160	TP_fast_assign(
161		__assign_str(remote);
162		__assign_str(channel);
163		__entry->lcid = lcid;
164		__entry->rcid = rcid;
165		__entry->count = count;
166		__entry->size = size;
167		__entry->liid = liid;
168		__entry->tx = tx;
169	),
170	TP_printk("%s remote: %s channel: %s[%u/%u] count: %d [size: %d liid: %d]",
171		  __entry->tx ? "tx" : "rx",
172		  __get_str(remote),
173		  __get_str(channel),
174		  __entry->lcid,
175		  __entry->rcid,
176		  __entry->count,
177		  __entry->size,
178		  __entry->liid
179	)
180);
181#define trace_qcom_glink_cmd_intent_tx(...) trace_qcom_glink_cmd_intent(__VA_ARGS__, true)
182#define trace_qcom_glink_cmd_intent_rx(...) trace_qcom_glink_cmd_intent(__VA_ARGS__, false)
183
184TRACE_EVENT(qcom_glink_cmd_rx_done,
185	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, u32 iid, bool reuse, bool tx),
186	TP_ARGS(remote, channel, lcid, rcid, iid, reuse, tx),
187	TP_STRUCT__entry(
188		__string(remote, remote)
189		__string(channel, channel)
190		__field(u16, lcid)
191		__field(u16, rcid)
192		__field(u32, iid)
193		__field(bool, reuse)
194		__field(bool, tx)
195	),
196	TP_fast_assign(
197		__assign_str(remote);
198		__assign_str(channel);
199		__entry->lcid = lcid;
200		__entry->rcid = rcid;
201		__entry->iid = iid;
202		__entry->reuse = reuse;
203		__entry->tx = tx;
204	),
205	TP_printk("%s remote: %s channel: %s[%u/%u] iid: %d reuse: %d",
206		  __entry->tx ? "tx" : "rx",
207		  __get_str(remote),
208		  __get_str(channel),
209		  __entry->lcid,
210		  __entry->rcid,
211		  __entry->iid,
212		  __entry->reuse
213	)
214);
215#define trace_qcom_glink_cmd_rx_done_tx(...) trace_qcom_glink_cmd_rx_done(__VA_ARGS__, true)
216#define trace_qcom_glink_cmd_rx_done_rx(...) trace_qcom_glink_cmd_rx_done(__VA_ARGS__, false)
217
218TRACE_EVENT(qcom_glink_cmd_rx_intent_req,
219	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, size_t size, bool tx),
220	TP_ARGS(remote, channel, lcid, rcid, size, tx),
221	TP_STRUCT__entry(
222		__string(remote, remote)
223		__string(channel, channel)
224		__field(u16, lcid)
225		__field(u16, rcid)
226		__field(u32, size)
227		__field(bool, tx)
228	),
229	TP_fast_assign(
230		__assign_str(remote);
231		__assign_str(channel);
232		__entry->lcid = lcid;
233		__entry->rcid = rcid;
234		__entry->size = size;
235		__entry->tx = tx;
236	),
237	TP_printk("%s remote: %s channel: %s[%u/%u] size: %d",
238		  __entry->tx ? "tx" : "rx",
239		  __get_str(remote),
240		  __get_str(channel),
241		  __entry->lcid,
242		  __entry->rcid,
243		  __entry->size
244	)
245);
246#define trace_qcom_glink_cmd_rx_intent_req_tx(...) trace_qcom_glink_cmd_rx_intent_req(__VA_ARGS__, true)
247#define trace_qcom_glink_cmd_rx_intent_req_rx(...) trace_qcom_glink_cmd_rx_intent_req(__VA_ARGS__, false)
248
249TRACE_EVENT(qcom_glink_cmd_rx_intent_req_ack,
250	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool granted, bool tx),
251	TP_ARGS(remote, channel, lcid, rcid, granted, tx),
252	TP_STRUCT__entry(
253		__string(remote, remote)
254		__string(channel, channel)
255		__field(u16, lcid)
256		__field(u16, rcid)
257		__field(bool, granted)
258		__field(bool, tx)
259	),
260	TP_fast_assign(
261		__assign_str(remote);
262		__assign_str(channel);
263		__entry->lcid = lcid;
264		__entry->rcid = rcid;
265		__entry->granted = granted;
266		__entry->tx = tx;
267	),
268	TP_printk("%s remote: %s channel: %s[%u/%u] granted: %d",
269		  __entry->tx ? "tx" : "rx",
270		  __get_str(remote),
271		  __get_str(channel),
272		  __entry->lcid,
273		  __entry->rcid,
274		  __entry->granted
275	)
276);
277#define trace_qcom_glink_cmd_rx_intent_req_ack_tx(...) trace_qcom_glink_cmd_rx_intent_req_ack(__VA_ARGS__, true)
278#define trace_qcom_glink_cmd_rx_intent_req_ack_rx(...) trace_qcom_glink_cmd_rx_intent_req_ack(__VA_ARGS__, false)
279
280TRACE_EVENT(qcom_glink_cmd_tx_data,
281	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, u32 iid, u32 chunk_size, u32 left_size, bool cont, bool tx),
282	TP_ARGS(remote, channel, lcid, rcid, iid, chunk_size, left_size, cont, tx),
283	TP_STRUCT__entry(
284		__string(remote, remote)
285		__string(channel, channel)
286		__field(u16, lcid)
287		__field(u16, rcid)
288		__field(u32, iid)
289		__field(u32, chunk_size)
290		__field(u32, left_size)
291		__field(bool, cont)
292		__field(bool, tx)
293	),
294	TP_fast_assign(
295		__assign_str(remote);
296		__assign_str(channel);
297		__entry->lcid = lcid;
298		__entry->rcid = rcid;
299		__entry->iid = iid;
300		__entry->chunk_size = chunk_size;
301		__entry->left_size = left_size;
302		__entry->cont = cont;
303		__entry->tx = tx;
304	),
305	TP_printk("%s remote: %s channel: %s[%u/%u] iid: %d chunk_size: %d left_size: %d cont: %d",
306		  __entry->tx ? "tx" : "rx",
307		  __get_str(remote),
308		  __get_str(channel),
309		  __entry->lcid,
310		  __entry->rcid,
311		  __entry->iid,
312		  __entry->chunk_size,
313		  __entry->left_size,
314		  __entry->cont
315	)
316);
317#define trace_qcom_glink_cmd_tx_data_tx(...) trace_qcom_glink_cmd_tx_data(__VA_ARGS__, true)
318#define trace_qcom_glink_cmd_tx_data_rx(...) trace_qcom_glink_cmd_tx_data(__VA_ARGS__, false)
319
320TRACE_EVENT(qcom_glink_cmd_close_ack,
321	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),
322	TP_ARGS(remote, channel, lcid, rcid, tx),
323	TP_STRUCT__entry(
324		__string(remote, remote)
325		__string(channel, channel)
326		__field(u16, lcid)
327		__field(u16, rcid)
328		__field(bool, tx)
329	),
330	TP_fast_assign(
331		__assign_str(remote);
332		__assign_str(channel);
333		__entry->lcid = lcid;
334		__entry->rcid = rcid;
335		__entry->tx = tx;
336	),
337	TP_printk("%s remote: %s channel: %s[%u/%u]",
338		  __entry->tx ? "tx" : "rx",
339		  __get_str(remote),
340		  __get_str(channel),
341		  __entry->lcid,
342		  __entry->rcid
343	)
344);
345#define trace_qcom_glink_cmd_close_ack_tx(...) trace_qcom_glink_cmd_close_ack(__VA_ARGS__, true)
346#define trace_qcom_glink_cmd_close_ack_rx(...) trace_qcom_glink_cmd_close_ack(__VA_ARGS__, false)
347
348TRACE_EVENT(qcom_glink_cmd_read_notif,
349	TP_PROTO(const char *remote, bool tx),
350	TP_ARGS(remote, tx),
351	TP_STRUCT__entry(
352		__string(remote, remote)
353		__field(bool, tx)
354	),
355	TP_fast_assign(
356		__assign_str(remote);
357		__entry->tx = tx;
358	),
359	TP_printk("%s remote: %s",
360		  __entry->tx ? "tx" : "rx",
361		  __get_str(remote)
362	)
363);
364#define trace_qcom_glink_cmd_read_notif_tx(...) trace_qcom_glink_cmd_read_notif(__VA_ARGS__, true)
365#define trace_qcom_glink_cmd_read_notif_rx(...) trace_qcom_glink_cmd_read_notif(__VA_ARGS__, false)
366
367TRACE_EVENT(qcom_glink_cmd_signal,
368	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, unsigned int signals, bool tx),
369	TP_ARGS(remote, channel, lcid, rcid, signals, tx),
370	TP_STRUCT__entry(
371		__string(remote, remote)
372		__string(channel, channel)
373		__field(u16, lcid)
374		__field(u16, rcid)
375		__field(u32, signals)
376		__field(bool, tx)
377	),
378	TP_fast_assign(
379		__assign_str(remote);
380		__assign_str(channel);
381		__entry->lcid = lcid;
382		__entry->rcid = rcid;
383		__entry->signals = signals;
384		__entry->tx = tx;
385	),
386	TP_printk("%s remote: %s channel: %s[%u/%u] signals: %#x",
387		  __entry->tx ? "tx" : "rx",
388		  __get_str(remote),
389		  __get_str(channel),
390		  __entry->lcid,
391		  __entry->rcid,
392		  __entry->signals
393	)
394);
395#define trace_qcom_glink_cmd_signal_tx(...) trace_qcom_glink_cmd_signal(__VA_ARGS__, true)
396#define trace_qcom_glink_cmd_signal_rx(...) trace_qcom_glink_cmd_signal(__VA_ARGS__, false)
397
398#endif
399
400#undef TRACE_INCLUDE_PATH
401#define TRACE_INCLUDE_PATH .
402
403#undef TRACE_INCLUDE_FILE
404#define TRACE_INCLUDE_FILE qcom_glink_trace
405
406#include <trace/define_trace.h>
~/ Read-only file preview.