objagg.h 4.6 KB

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