xref: /openbmc/linux/include/trace/events/qrtr.h (revision cd6d421e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM qrtr
4 
5 #if !defined(_TRACE_QRTR_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_QRTR_H
7 
8 #include <linux/qrtr.h>
9 #include <linux/tracepoint.h>
10 
11 TRACE_EVENT(qrtr_ns_service_announce_new,
12 
13 	TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port),
14 
15 	TP_ARGS(service, instance, node, port),
16 
17 	TP_STRUCT__entry(
18 		__field(__le32, service)
19 		__field(__le32, instance)
20 		__field(__le32, node)
21 		__field(__le32, port)
22 	),
23 
24 	TP_fast_assign(
25 		__entry->service = service;
26 		__entry->instance = instance;
27 		__entry->node = node;
28 		__entry->port = port;
29 	),
30 
31 	TP_printk("advertising new server [%d:%x]@[%d:%d]",
32 		  __entry->service, __entry->instance, __entry->node,
33 		  __entry->port
34 	)
35 );
36 
37 TRACE_EVENT(qrtr_ns_service_announce_del,
38 
39 	TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port),
40 
41 	TP_ARGS(service, instance, node, port),
42 
43 	TP_STRUCT__entry(
44 		__field(__le32, service)
45 		__field(__le32, instance)
46 		__field(__le32, node)
47 		__field(__le32, port)
48 	),
49 
50 	TP_fast_assign(
51 		__entry->service = service;
52 		__entry->instance = instance;
53 		__entry->node = node;
54 		__entry->port = port;
55 	),
56 
57 	TP_printk("advertising removal of server [%d:%x]@[%d:%d]",
58 		  __entry->service, __entry->instance, __entry->node,
59 		  __entry->port
60 	)
61 );
62 
63 TRACE_EVENT(qrtr_ns_server_add,
64 
65 	TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port),
66 
67 	TP_ARGS(service, instance, node, port),
68 
69 	TP_STRUCT__entry(
70 		__field(__le32, service)
71 		__field(__le32, instance)
72 		__field(__le32, node)
73 		__field(__le32, port)
74 	),
75 
76 	TP_fast_assign(
77 		__entry->service = service;
78 		__entry->instance = instance;
79 		__entry->node = node;
80 		__entry->port = port;
81 	),
82 
83 	TP_printk("add server [%d:%x]@[%d:%d]",
84 		  __entry->service, __entry->instance, __entry->node,
85 		  __entry->port
86 	)
87 );
88 
89 TRACE_EVENT(qrtr_ns_message,
90 
91 	TP_PROTO(const char * const ctrl_pkt_str, __u32 sq_node, __u32 sq_port),
92 
93 	TP_ARGS(ctrl_pkt_str, sq_node, sq_port),
94 
95 	TP_STRUCT__entry(
96 		__string(ctrl_pkt_str, ctrl_pkt_str)
97 		__field(__u32, sq_node)
98 		__field(__u32, sq_port)
99 	),
100 
101 	TP_fast_assign(
102 		__assign_str(ctrl_pkt_str, ctrl_pkt_str);
103 		__entry->sq_node = sq_node;
104 		__entry->sq_port = sq_port;
105 	),
106 
107 	TP_printk("%s from %d:%d",
108 		  __get_str(ctrl_pkt_str), __entry->sq_node, __entry->sq_port
109 	)
110 );
111 
112 #endif /* _TRACE_QRTR_H */
113 
114 /* This part must be outside protection */
115 #include <trace/define_trace.h>
116