xref: /openbmc/linux/include/trace/events/objagg.h (revision 20e2fc42)
1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */
3 
4 #undef TRACE_SYSTEM
5 #define TRACE_SYSTEM objagg
6 
7 #if !defined(__TRACE_OBJAGG_H) || defined(TRACE_HEADER_MULTI_READ)
8 #define __TRACE_OBJAGG_H
9 
10 #include <linux/tracepoint.h>
11 
12 struct objagg;
13 struct objagg_obj;
14 
15 TRACE_EVENT(objagg_create,
16 	TP_PROTO(const struct objagg *objagg),
17 
18 	TP_ARGS(objagg),
19 
20 	TP_STRUCT__entry(
21 		__field(const void *, objagg)
22 	),
23 
24 	TP_fast_assign(
25 		__entry->objagg = objagg;
26 	),
27 
28 	TP_printk("objagg %p", __entry->objagg)
29 );
30 
31 TRACE_EVENT(objagg_destroy,
32 	TP_PROTO(const struct objagg *objagg),
33 
34 	TP_ARGS(objagg),
35 
36 	TP_STRUCT__entry(
37 		__field(const void *, objagg)
38 	),
39 
40 	TP_fast_assign(
41 		__entry->objagg = objagg;
42 	),
43 
44 	TP_printk("objagg %p", __entry->objagg)
45 );
46 
47 TRACE_EVENT(objagg_obj_create,
48 	TP_PROTO(const struct objagg *objagg,
49 		 const struct objagg_obj *obj),
50 
51 	TP_ARGS(objagg, obj),
52 
53 	TP_STRUCT__entry(
54 		__field(const void *, objagg)
55 		__field(const void *, obj)
56 	),
57 
58 	TP_fast_assign(
59 		__entry->objagg = objagg;
60 		__entry->obj = obj;
61 	),
62 
63 	TP_printk("objagg %p, obj %p", __entry->objagg, __entry->obj)
64 );
65 
66 TRACE_EVENT(objagg_obj_destroy,
67 	TP_PROTO(const struct objagg *objagg,
68 		 const struct objagg_obj *obj),
69 
70 	TP_ARGS(objagg, obj),
71 
72 	TP_STRUCT__entry(
73 		__field(const void *, objagg)
74 		__field(const void *, obj)
75 	),
76 
77 	TP_fast_assign(
78 		__entry->objagg = objagg;
79 		__entry->obj = obj;
80 	),
81 
82 	TP_printk("objagg %p, obj %p", __entry->objagg, __entry->obj)
83 );
84 
85 TRACE_EVENT(objagg_obj_get,
86 	TP_PROTO(const struct objagg *objagg,
87 		 const struct objagg_obj *obj,
88 		 unsigned int refcount),
89 
90 	TP_ARGS(objagg, obj, refcount),
91 
92 	TP_STRUCT__entry(
93 		__field(const void *, objagg)
94 		__field(const void *, obj)
95 		__field(unsigned int, refcount)
96 	),
97 
98 	TP_fast_assign(
99 		__entry->objagg = objagg;
100 		__entry->obj = obj;
101 		__entry->refcount = refcount;
102 	),
103 
104 	TP_printk("objagg %p, obj %p, refcount %u",
105 		  __entry->objagg, __entry->obj, __entry->refcount)
106 );
107 
108 TRACE_EVENT(objagg_obj_put,
109 	TP_PROTO(const struct objagg *objagg,
110 		 const struct objagg_obj *obj,
111 		 unsigned int refcount),
112 
113 	TP_ARGS(objagg, obj, refcount),
114 
115 	TP_STRUCT__entry(
116 		__field(const void *, objagg)
117 		__field(const void *, obj)
118 		__field(unsigned int, refcount)
119 	),
120 
121 	TP_fast_assign(
122 		__entry->objagg = objagg;
123 		__entry->obj = obj;
124 		__entry->refcount = refcount;
125 	),
126 
127 	TP_printk("objagg %p, obj %p, refcount %u",
128 		  __entry->objagg, __entry->obj, __entry->refcount)
129 );
130 
131 TRACE_EVENT(objagg_obj_parent_assign,
132 	TP_PROTO(const struct objagg *objagg,
133 		 const struct objagg_obj *obj,
134 		 const struct objagg_obj *parent,
135 		 unsigned int parent_refcount),
136 
137 	TP_ARGS(objagg, obj, parent, parent_refcount),
138 
139 	TP_STRUCT__entry(
140 		__field(const void *, objagg)
141 		__field(const void *, obj)
142 		__field(const void *, parent)
143 		__field(unsigned int, parent_refcount)
144 	),
145 
146 	TP_fast_assign(
147 		__entry->objagg = objagg;
148 		__entry->obj = obj;
149 		__entry->parent = parent;
150 		__entry->parent_refcount = parent_refcount;
151 	),
152 
153 	TP_printk("objagg %p, obj %p, parent %p, parent_refcount %u",
154 		  __entry->objagg, __entry->obj,
155 		  __entry->parent, __entry->parent_refcount)
156 );
157 
158 TRACE_EVENT(objagg_obj_parent_unassign,
159 	TP_PROTO(const struct objagg *objagg,
160 		 const struct objagg_obj *obj,
161 		 const struct objagg_obj *parent,
162 		 unsigned int parent_refcount),
163 
164 	TP_ARGS(objagg, obj, parent, parent_refcount),
165 
166 	TP_STRUCT__entry(
167 		__field(const void *, objagg)
168 		__field(const void *, obj)
169 		__field(const void *, parent)
170 		__field(unsigned int, parent_refcount)
171 	),
172 
173 	TP_fast_assign(
174 		__entry->objagg = objagg;
175 		__entry->obj = obj;
176 		__entry->parent = parent;
177 		__entry->parent_refcount = parent_refcount;
178 	),
179 
180 	TP_printk("objagg %p, obj %p, parent %p, parent_refcount %u",
181 		  __entry->objagg, __entry->obj,
182 		  __entry->parent, __entry->parent_refcount)
183 );
184 
185 TRACE_EVENT(objagg_obj_root_create,
186 	TP_PROTO(const struct objagg *objagg,
187 		 const struct objagg_obj *obj),
188 
189 	TP_ARGS(objagg, obj),
190 
191 	TP_STRUCT__entry(
192 		__field(const void *, objagg)
193 		__field(const void *, obj)
194 	),
195 
196 	TP_fast_assign(
197 		__entry->objagg = objagg;
198 		__entry->obj = obj;
199 	),
200 
201 	TP_printk("objagg %p, obj %p",
202 		  __entry->objagg, __entry->obj)
203 );
204 
205 TRACE_EVENT(objagg_obj_root_destroy,
206 	TP_PROTO(const struct objagg *objagg,
207 		 const struct objagg_obj *obj),
208 
209 	TP_ARGS(objagg, obj),
210 
211 	TP_STRUCT__entry(
212 		__field(const void *, objagg)
213 		__field(const void *, obj)
214 	),
215 
216 	TP_fast_assign(
217 		__entry->objagg = objagg;
218 		__entry->obj = obj;
219 	),
220 
221 	TP_printk("objagg %p, obj %p",
222 		  __entry->objagg, __entry->obj)
223 );
224 
225 #endif /* __TRACE_OBJAGG_H */
226 
227 /* This part must be outside protection */
228 #include <trace/define_trace.h>
229