trace_msm_bus.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM msm_bus
  14. #if !defined(_TRACE_MSM_BUS_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_MSM_BUS_H
  16. #include <linux/tracepoint.h>
  17. TRACE_EVENT(bus_update_request,
  18. TP_PROTO(int sec, int nsec, const char *name, int src, int dest,
  19. unsigned long long ab, unsigned long long ib),
  20. TP_ARGS(sec, nsec, name, src, dest, ab, ib),
  21. TP_STRUCT__entry(
  22. __field(int, sec)
  23. __field(int, nsec)
  24. __string(name, name)
  25. __field(int, src)
  26. __field(int, dest)
  27. __field(u64, ab)
  28. __field(u64, ib)
  29. ),
  30. TP_fast_assign(
  31. __entry->sec = sec;
  32. __entry->nsec = nsec;
  33. __assign_str(name, name);
  34. __entry->src = src;
  35. __entry->dest = dest;
  36. __entry->ab = ab;
  37. __entry->ib = ib;
  38. ),
  39. TP_printk("time= %u.%09u name=%s src=%d dest=%d ab=%llu ib=%llu",
  40. __entry->sec,
  41. __entry->nsec,
  42. __get_str(name),
  43. __entry->src,
  44. __entry->dest,
  45. (unsigned long long)__entry->ab,
  46. (unsigned long long)__entry->ib)
  47. );
  48. TRACE_EVENT(bus_update_request_end,
  49. TP_PROTO(const char *name),
  50. TP_ARGS(name),
  51. TP_STRUCT__entry(
  52. __string(name, name)
  53. ),
  54. TP_fast_assign(
  55. __assign_str(name, name);
  56. ),
  57. TP_printk("client-name=%s", __get_str(name))
  58. );
  59. TRACE_EVENT(bus_bimc_config_limiter,
  60. TP_PROTO(int mas_id, unsigned long long cur_lim_bw),
  61. TP_ARGS(mas_id, cur_lim_bw),
  62. TP_STRUCT__entry(
  63. __field(int, mas_id)
  64. __field(u64, cur_lim_bw)
  65. ),
  66. TP_fast_assign(
  67. __entry->mas_id = mas_id;
  68. __entry->cur_lim_bw = cur_lim_bw;
  69. ),
  70. TP_printk("Master=%d cur_lim_bw=%llu",
  71. __entry->mas_id,
  72. (unsigned long long)__entry->cur_lim_bw)
  73. );
  74. TRACE_EVENT(bus_avail_bw,
  75. TP_PROTO(unsigned long long cur_bimc_bw, unsigned long long cur_mdp_bw),
  76. TP_ARGS(cur_bimc_bw, cur_mdp_bw),
  77. TP_STRUCT__entry(
  78. __field(u64, cur_bimc_bw)
  79. __field(u64, cur_mdp_bw)
  80. ),
  81. TP_fast_assign(
  82. __entry->cur_bimc_bw = cur_bimc_bw;
  83. __entry->cur_mdp_bw = cur_mdp_bw;
  84. ),
  85. TP_printk("cur_bimc_bw = %llu cur_mdp_bw = %llu",
  86. (unsigned long long)__entry->cur_bimc_bw,
  87. (unsigned long long)__entry->cur_mdp_bw)
  88. );
  89. TRACE_EVENT(bus_rules_matches,
  90. TP_PROTO(int node_id, int rule_id, unsigned long long node_ab,
  91. unsigned long long node_ib, unsigned long long node_clk),
  92. TP_ARGS(node_id, rule_id, node_ab, node_ib, node_clk),
  93. TP_STRUCT__entry(
  94. __field(int, node_id)
  95. __field(int, rule_id)
  96. __field(u64, node_ab)
  97. __field(u64, node_ib)
  98. __field(u64, node_clk)
  99. ),
  100. TP_fast_assign(
  101. __entry->node_id = node_id;
  102. __entry->rule_id = rule_id;
  103. __entry->node_ab = node_ab;
  104. __entry->node_ib = node_ib;
  105. __entry->node_clk = node_clk;
  106. ),
  107. TP_printk("Rule match node%d rule%d node-ab%llu:ib%llu:clk%llu",
  108. __entry->node_id, __entry->rule_id,
  109. (unsigned long long)__entry->node_ab,
  110. (unsigned long long)__entry->node_ib,
  111. (unsigned long long)__entry->node_clk)
  112. );
  113. TRACE_EVENT(bus_bke_params,
  114. TP_PROTO(u32 gc, u32 gp, u32 thl, u32 thm, u32 thh),
  115. TP_ARGS(gc, gp, thl, thm, thh),
  116. TP_STRUCT__entry(
  117. __field(u32, gc)
  118. __field(u32, gp)
  119. __field(u32, thl)
  120. __field(u32, thm)
  121. __field(u32, thh)
  122. ),
  123. TP_fast_assign(
  124. __entry->gc = gc;
  125. __entry->gp = gp;
  126. __entry->thl = thl;
  127. __entry->thm = thm;
  128. __entry->thh = thh;
  129. ),
  130. TP_printk("BKE Params GC=0x%x GP=0x%x THL=0x%x THM=0x%x THH=0x%x",
  131. __entry->gc, __entry->gp, __entry->thl, __entry->thm,
  132. __entry->thh)
  133. );
  134. TRACE_EVENT(bus_client_status,
  135. TP_PROTO(const char *name, int src, int dest,
  136. unsigned long long ab, unsigned long long ib, int active_only),
  137. TP_ARGS(name, src, dest, ab, ib, active_only),
  138. TP_STRUCT__entry(
  139. __string(name, name)
  140. __field(int, src)
  141. __field(int, dest)
  142. __field(u64, ab)
  143. __field(u64, ib)
  144. __field(int, active_only)
  145. ),
  146. TP_fast_assign(
  147. __assign_str(name, name);
  148. __entry->src = src;
  149. __entry->dest = dest;
  150. __entry->ab = ab;
  151. __entry->ib = ib;
  152. __entry->active_only = active_only;
  153. ),
  154. TP_printk("name=%s src=%d dest=%d ab=%llu ib=%llu active_only=%d",
  155. __get_str(name),
  156. __entry->src,
  157. __entry->dest,
  158. (unsigned long long)__entry->ab,
  159. (unsigned long long)__entry->ib,
  160. __entry->active_only)
  161. );
  162. TRACE_EVENT(bus_agg_bw,
  163. TP_PROTO(unsigned int node_id, int rpm_id, int ctx_set,
  164. unsigned long long agg_ab),
  165. TP_ARGS(node_id, rpm_id, ctx_set, agg_ab),
  166. TP_STRUCT__entry(
  167. __field(unsigned int, node_id)
  168. __field(int, rpm_id)
  169. __field(int, ctx_set)
  170. __field(u64, agg_ab)
  171. ),
  172. TP_fast_assign(
  173. __entry->node_id = node_id;
  174. __entry->rpm_id = rpm_id;
  175. __entry->ctx_set = ctx_set;
  176. __entry->agg_ab = agg_ab;
  177. ),
  178. TP_printk("node_id:%u rpm_id:%d rpm_ctx:%d agg_ab:%llu",
  179. __entry->node_id,
  180. __entry->rpm_id,
  181. __entry->ctx_set,
  182. (unsigned long long)__entry->agg_ab)
  183. );
  184. #endif
  185. #define TRACE_INCLUDE_FILE trace_msm_bus
  186. #include <trace/define_trace.h>