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