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