1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */
5 #define TRACE_SYSTEM objagg
7 #if !defined(__TRACE_OBJAGG_H) || defined(TRACE_HEADER_MULTI_READ)
8 #define __TRACE_OBJAGG_H
10 #include <linux/tracepoint.h>
15 TRACE_EVENT(objagg_create,
16 TP_PROTO(const struct objagg *objagg),
21 __field(const void *, objagg)
25 __entry->objagg = objagg;
28 TP_printk("objagg %p", __entry->objagg)
31 TRACE_EVENT(objagg_destroy,
32 TP_PROTO(const struct objagg *objagg),
37 __field(const void *, objagg)
41 __entry->objagg = objagg;
44 TP_printk("objagg %p", __entry->objagg)
47 TRACE_EVENT(objagg_obj_create,
48 TP_PROTO(const struct objagg *objagg,
49 const struct objagg_obj *obj),
54 __field(const void *, objagg)
55 __field(const void *, obj)
59 __entry->objagg = objagg;
63 TP_printk("objagg %p, obj %p", __entry->objagg, __entry->obj)
66 TRACE_EVENT(objagg_obj_destroy,
67 TP_PROTO(const struct objagg *objagg,
68 const struct objagg_obj *obj),
73 __field(const void *, objagg)
74 __field(const void *, obj)
78 __entry->objagg = objagg;
82 TP_printk("objagg %p, obj %p", __entry->objagg, __entry->obj)
85 TRACE_EVENT(objagg_obj_get,
86 TP_PROTO(const struct objagg *objagg,
87 const struct objagg_obj *obj,
88 unsigned int refcount),
90 TP_ARGS(objagg, obj, refcount),
93 __field(const void *, objagg)
94 __field(const void *, obj)
95 __field(unsigned int, refcount)
99 __entry->objagg = objagg;
101 __entry->refcount = refcount;
104 TP_printk("objagg %p, obj %p, refcount %u",
105 __entry->objagg, __entry->obj, __entry->refcount)
108 TRACE_EVENT(objagg_obj_put,
109 TP_PROTO(const struct objagg *objagg,
110 const struct objagg_obj *obj,
111 unsigned int refcount),
113 TP_ARGS(objagg, obj, refcount),
116 __field(const void *, objagg)
117 __field(const void *, obj)
118 __field(unsigned int, refcount)
122 __entry->objagg = objagg;
124 __entry->refcount = refcount;
127 TP_printk("objagg %p, obj %p, refcount %u",
128 __entry->objagg, __entry->obj, __entry->refcount)
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),
137 TP_ARGS(objagg, obj, parent, parent_refcount),
140 __field(const void *, objagg)
141 __field(const void *, obj)
142 __field(const void *, parent)
143 __field(unsigned int, parent_refcount)
147 __entry->objagg = objagg;
149 __entry->parent = parent;
150 __entry->parent_refcount = parent_refcount;
153 TP_printk("objagg %p, obj %p, parent %p, parent_refcount %u",
154 __entry->objagg, __entry->obj,
155 __entry->parent, __entry->parent_refcount)
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),
164 TP_ARGS(objagg, obj, parent, parent_refcount),
167 __field(const void *, objagg)
168 __field(const void *, obj)
169 __field(const void *, parent)
170 __field(unsigned int, parent_refcount)
174 __entry->objagg = objagg;
176 __entry->parent = parent;
177 __entry->parent_refcount = parent_refcount;
180 TP_printk("objagg %p, obj %p, parent %p, parent_refcount %u",
181 __entry->objagg, __entry->obj,
182 __entry->parent, __entry->parent_refcount)
185 TRACE_EVENT(objagg_obj_root_create,
186 TP_PROTO(const struct objagg *objagg,
187 const struct objagg_obj *obj),
189 TP_ARGS(objagg, obj),
192 __field(const void *, objagg)
193 __field(const void *, obj)
197 __entry->objagg = objagg;
201 TP_printk("objagg %p, obj %p",
202 __entry->objagg, __entry->obj)
205 TRACE_EVENT(objagg_obj_root_destroy,
206 TP_PROTO(const struct objagg *objagg,
207 const struct objagg_obj *obj),
209 TP_ARGS(objagg, obj),
212 __field(const void *, objagg)
213 __field(const void *, obj)
217 __entry->objagg = objagg;
221 TP_printk("objagg %p, obj %p",
222 __entry->objagg, __entry->obj)
225 #endif /* __TRACE_OBJAGG_H */
227 /* This part must be outside protection */
228 #include <trace/define_trace.h>