Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM rcu |
| 3 | |
| 4 | #if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_RCU_H |
| 6 | |
| 7 | #include <linux/tracepoint.h> |
| 8 | |
| 9 | /* |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 10 | * Tracepoint for start/end markers used for utilization calculations. |
| 11 | * By convention, the string is of the following forms: |
| 12 | * |
| 13 | * "Start <activity>" -- Mark the start of the specified activity, |
| 14 | * such as "context switch". Nesting is permitted. |
| 15 | * "End <activity>" -- Mark the end of the specified activity. |
Paul E. McKenney | 385680a | 2011-06-21 22:43:26 -0700 | [diff] [blame] | 16 | * |
| 17 | * An "@" character within "<activity>" is a comment character: Data |
| 18 | * reduction scripts will ignore the "@" and the remainder of the line. |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 19 | */ |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 20 | TRACE_EVENT(rcu_utilization, |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 21 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 22 | TP_PROTO(const char *s), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 23 | |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 24 | TP_ARGS(s), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 25 | |
| 26 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 27 | __field(const char *, s) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 28 | ), |
| 29 | |
| 30 | TP_fast_assign( |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 31 | __entry->s = s; |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 32 | ), |
| 33 | |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 34 | TP_printk("%s", __entry->s) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 35 | ); |
| 36 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 37 | #ifdef CONFIG_RCU_TRACE |
| 38 | |
| 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
| 40 | |
| 41 | /* |
| 42 | * Tracepoint for grace-period events: starting and ending a grace |
| 43 | * period ("start" and "end", respectively), a CPU noting the start |
| 44 | * of a new grace period or the end of an old grace period ("cpustart" |
| 45 | * and "cpuend", respectively), a CPU passing through a quiescent |
| 46 | * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" |
Paul E. McKenney | 6d4b418 | 2012-11-27 16:55:44 -0800 | [diff] [blame] | 47 | * and "cpuofl", respectively), a CPU being kicked for being too |
| 48 | * long in dyntick-idle mode ("kick"), a CPU accelerating its new |
| 49 | * callbacks to RCU_NEXT_READY_TAIL ("AccReadyCB"), and a CPU |
| 50 | * accelerating its new callbacks to RCU_WAIT_TAIL ("AccWaitCB"). |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 51 | */ |
| 52 | TRACE_EVENT(rcu_grace_period, |
| 53 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 54 | TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 55 | |
| 56 | TP_ARGS(rcuname, gpnum, gpevent), |
| 57 | |
| 58 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 59 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 60 | __field(unsigned long, gpnum) |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 61 | __field(const char *, gpevent) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 62 | ), |
| 63 | |
| 64 | TP_fast_assign( |
| 65 | __entry->rcuname = rcuname; |
| 66 | __entry->gpnum = gpnum; |
| 67 | __entry->gpevent = gpevent; |
| 68 | ), |
| 69 | |
| 70 | TP_printk("%s %lu %s", |
| 71 | __entry->rcuname, __entry->gpnum, __entry->gpevent) |
| 72 | ); |
| 73 | |
| 74 | /* |
Paul E. McKenney | bd9f068 | 2012-12-29 21:51:20 -0800 | [diff] [blame] | 75 | * Tracepoint for future grace-period events, including those for no-callbacks |
| 76 | * CPUs. The caller should pull the data from the rcu_node structure, |
| 77 | * other than rcuname, which comes from the rcu_state structure, and event, |
| 78 | * which is one of the following: |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 79 | * |
| 80 | * "Startleaf": Request a nocb grace period based on leaf-node data. |
| 81 | * "Startedleaf": Leaf-node start proved sufficient. |
| 82 | * "Startedleafroot": Leaf-node start proved sufficient after checking root. |
| 83 | * "Startedroot": Requested a nocb grace period based on root-node data. |
| 84 | * "StartWait": Start waiting for the requested grace period. |
| 85 | * "ResumeWait": Resume waiting after signal. |
| 86 | * "EndWait": Complete wait. |
| 87 | * "Cleanup": Clean up rcu_node structure after previous GP. |
| 88 | * "CleanupMore": Clean up, and another no-CB GP is needed. |
| 89 | */ |
Paul E. McKenney | bd9f068 | 2012-12-29 21:51:20 -0800 | [diff] [blame] | 90 | TRACE_EVENT(rcu_future_grace_period, |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 91 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 92 | TP_PROTO(const char *rcuname, unsigned long gpnum, unsigned long completed, |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 93 | unsigned long c, u8 level, int grplo, int grphi, |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 94 | const char *gpevent), |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 95 | |
| 96 | TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), |
| 97 | |
| 98 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 99 | __field(const char *, rcuname) |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 100 | __field(unsigned long, gpnum) |
| 101 | __field(unsigned long, completed) |
| 102 | __field(unsigned long, c) |
| 103 | __field(u8, level) |
| 104 | __field(int, grplo) |
| 105 | __field(int, grphi) |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 106 | __field(const char *, gpevent) |
Paul E. McKenney | 09c7b89 | 2013-02-08 15:55:02 -0800 | [diff] [blame] | 107 | ), |
| 108 | |
| 109 | TP_fast_assign( |
| 110 | __entry->rcuname = rcuname; |
| 111 | __entry->gpnum = gpnum; |
| 112 | __entry->completed = completed; |
| 113 | __entry->c = c; |
| 114 | __entry->level = level; |
| 115 | __entry->grplo = grplo; |
| 116 | __entry->grphi = grphi; |
| 117 | __entry->gpevent = gpevent; |
| 118 | ), |
| 119 | |
| 120 | TP_printk("%s %lu %lu %lu %u %d %d %s", |
| 121 | __entry->rcuname, __entry->gpnum, __entry->completed, |
| 122 | __entry->c, __entry->level, __entry->grplo, __entry->grphi, |
| 123 | __entry->gpevent) |
| 124 | ); |
| 125 | |
| 126 | /* |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 127 | * Tracepoint for grace-period-initialization events. These are |
| 128 | * distinguished by the type of RCU, the new grace-period number, the |
| 129 | * rcu_node structure level, the starting and ending CPU covered by the |
| 130 | * rcu_node structure, and the mask of CPUs that will be waited for. |
| 131 | * All but the type of RCU are extracted from the rcu_node structure. |
| 132 | */ |
| 133 | TRACE_EVENT(rcu_grace_period_init, |
| 134 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 135 | TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level, |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 136 | int grplo, int grphi, unsigned long qsmask), |
| 137 | |
| 138 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), |
| 139 | |
| 140 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 141 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 142 | __field(unsigned long, gpnum) |
| 143 | __field(u8, level) |
| 144 | __field(int, grplo) |
| 145 | __field(int, grphi) |
| 146 | __field(unsigned long, qsmask) |
| 147 | ), |
| 148 | |
| 149 | TP_fast_assign( |
| 150 | __entry->rcuname = rcuname; |
| 151 | __entry->gpnum = gpnum; |
| 152 | __entry->level = level; |
| 153 | __entry->grplo = grplo; |
| 154 | __entry->grphi = grphi; |
| 155 | __entry->qsmask = qsmask; |
| 156 | ), |
| 157 | |
| 158 | TP_printk("%s %lu %u %d %d %lx", |
| 159 | __entry->rcuname, __entry->gpnum, __entry->level, |
| 160 | __entry->grplo, __entry->grphi, __entry->qsmask) |
| 161 | ); |
| 162 | |
| 163 | /* |
| 164 | * Tracepoint for tasks blocking within preemptible-RCU read-side |
| 165 | * critical sections. Track the type of RCU (which one day might |
| 166 | * include SRCU), the grace-period number that the task is blocking |
| 167 | * (the current or the next), and the task's PID. |
| 168 | */ |
| 169 | TRACE_EVENT(rcu_preempt_task, |
| 170 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 171 | TP_PROTO(const char *rcuname, int pid, unsigned long gpnum), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 172 | |
| 173 | TP_ARGS(rcuname, pid, gpnum), |
| 174 | |
| 175 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 176 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 177 | __field(unsigned long, gpnum) |
| 178 | __field(int, pid) |
| 179 | ), |
| 180 | |
| 181 | TP_fast_assign( |
| 182 | __entry->rcuname = rcuname; |
| 183 | __entry->gpnum = gpnum; |
| 184 | __entry->pid = pid; |
| 185 | ), |
| 186 | |
| 187 | TP_printk("%s %lu %d", |
| 188 | __entry->rcuname, __entry->gpnum, __entry->pid) |
| 189 | ); |
| 190 | |
| 191 | /* |
| 192 | * Tracepoint for tasks that blocked within a given preemptible-RCU |
| 193 | * read-side critical section exiting that critical section. Track the |
| 194 | * type of RCU (which one day might include SRCU) and the task's PID. |
| 195 | */ |
| 196 | TRACE_EVENT(rcu_unlock_preempted_task, |
| 197 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 198 | TP_PROTO(const char *rcuname, unsigned long gpnum, int pid), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 199 | |
| 200 | TP_ARGS(rcuname, gpnum, pid), |
| 201 | |
| 202 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 203 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 204 | __field(unsigned long, gpnum) |
| 205 | __field(int, pid) |
| 206 | ), |
| 207 | |
| 208 | TP_fast_assign( |
| 209 | __entry->rcuname = rcuname; |
| 210 | __entry->gpnum = gpnum; |
| 211 | __entry->pid = pid; |
| 212 | ), |
| 213 | |
| 214 | TP_printk("%s %lu %d", __entry->rcuname, __entry->gpnum, __entry->pid) |
| 215 | ); |
| 216 | |
| 217 | /* |
| 218 | * Tracepoint for quiescent-state-reporting events. These are |
| 219 | * distinguished by the type of RCU, the grace-period number, the |
| 220 | * mask of quiescent lower-level entities, the rcu_node structure level, |
| 221 | * the starting and ending CPU covered by the rcu_node structure, and |
| 222 | * whether there are any blocked tasks blocking the current grace period. |
| 223 | * All but the type of RCU are extracted from the rcu_node structure. |
| 224 | */ |
| 225 | TRACE_EVENT(rcu_quiescent_state_report, |
| 226 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 227 | TP_PROTO(const char *rcuname, unsigned long gpnum, |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 228 | unsigned long mask, unsigned long qsmask, |
| 229 | u8 level, int grplo, int grphi, int gp_tasks), |
| 230 | |
| 231 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), |
| 232 | |
| 233 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 234 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 235 | __field(unsigned long, gpnum) |
| 236 | __field(unsigned long, mask) |
| 237 | __field(unsigned long, qsmask) |
| 238 | __field(u8, level) |
| 239 | __field(int, grplo) |
| 240 | __field(int, grphi) |
| 241 | __field(u8, gp_tasks) |
| 242 | ), |
| 243 | |
| 244 | TP_fast_assign( |
| 245 | __entry->rcuname = rcuname; |
| 246 | __entry->gpnum = gpnum; |
| 247 | __entry->mask = mask; |
| 248 | __entry->qsmask = qsmask; |
| 249 | __entry->level = level; |
| 250 | __entry->grplo = grplo; |
| 251 | __entry->grphi = grphi; |
| 252 | __entry->gp_tasks = gp_tasks; |
| 253 | ), |
| 254 | |
| 255 | TP_printk("%s %lu %lx>%lx %u %d %d %u", |
| 256 | __entry->rcuname, __entry->gpnum, |
| 257 | __entry->mask, __entry->qsmask, __entry->level, |
| 258 | __entry->grplo, __entry->grphi, __entry->gp_tasks) |
| 259 | ); |
| 260 | |
| 261 | /* |
| 262 | * Tracepoint for quiescent states detected by force_quiescent_state(). |
| 263 | * These trace events include the type of RCU, the grace-period number |
| 264 | * that was blocked by the CPU, the CPU itself, and the type of quiescent |
| 265 | * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline, |
| 266 | * or "kick" when kicking a CPU that has been in dyntick-idle mode for |
| 267 | * too long. |
| 268 | */ |
| 269 | TRACE_EVENT(rcu_fqs, |
| 270 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 271 | TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 272 | |
| 273 | TP_ARGS(rcuname, gpnum, cpu, qsevent), |
| 274 | |
| 275 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 276 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 277 | __field(unsigned long, gpnum) |
| 278 | __field(int, cpu) |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 279 | __field(const char *, qsevent) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 280 | ), |
| 281 | |
| 282 | TP_fast_assign( |
| 283 | __entry->rcuname = rcuname; |
| 284 | __entry->gpnum = gpnum; |
| 285 | __entry->cpu = cpu; |
| 286 | __entry->qsevent = qsevent; |
| 287 | ), |
| 288 | |
| 289 | TP_printk("%s %lu %d %s", |
| 290 | __entry->rcuname, __entry->gpnum, |
| 291 | __entry->cpu, __entry->qsevent) |
| 292 | ); |
| 293 | |
| 294 | #endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */ |
| 295 | |
| 296 | /* |
| 297 | * Tracepoint for dyntick-idle entry/exit events. These take a string |
Paul E. McKenney | 045fb93 | 2011-11-22 12:13:03 -0800 | [diff] [blame] | 298 | * as argument: "Start" for entering dyntick-idle mode, "End" for |
| 299 | * leaving it, "--=" for events moving towards idle, and "++=" for events |
| 300 | * moving away from idle. "Error on entry: not idle task" and "Error on |
| 301 | * exit: not idle task" indicate that a non-idle task is erroneously |
| 302 | * toying with the idle loop. |
| 303 | * |
| 304 | * These events also take a pair of numbers, which indicate the nesting |
| 305 | * depth before and after the event of interest. Note that task-related |
| 306 | * events use the upper bits of each number, while interrupt-related |
| 307 | * events use the lower bits. |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 308 | */ |
| 309 | TRACE_EVENT(rcu_dyntick, |
| 310 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 311 | TP_PROTO(const char *polarity, long long oldnesting, long long newnesting), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 312 | |
Paul E. McKenney | 4145fa7 | 2011-10-31 15:01:54 -0700 | [diff] [blame] | 313 | TP_ARGS(polarity, oldnesting, newnesting), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 314 | |
| 315 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 316 | __field(const char *, polarity) |
Paul E. McKenney | 4145fa7 | 2011-10-31 15:01:54 -0700 | [diff] [blame] | 317 | __field(long long, oldnesting) |
| 318 | __field(long long, newnesting) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 319 | ), |
| 320 | |
| 321 | TP_fast_assign( |
| 322 | __entry->polarity = polarity; |
Paul E. McKenney | 4145fa7 | 2011-10-31 15:01:54 -0700 | [diff] [blame] | 323 | __entry->oldnesting = oldnesting; |
| 324 | __entry->newnesting = newnesting; |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 325 | ), |
| 326 | |
Paul E. McKenney | 4145fa7 | 2011-10-31 15:01:54 -0700 | [diff] [blame] | 327 | TP_printk("%s %llx %llx", __entry->polarity, |
| 328 | __entry->oldnesting, __entry->newnesting) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 329 | ); |
| 330 | |
| 331 | /* |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 332 | * Tracepoint for RCU preparation for idle, the goal being to get RCU |
| 333 | * processing done so that the current CPU can shut off its scheduling |
| 334 | * clock and enter dyntick-idle mode. One way to accomplish this is |
| 335 | * to drain all RCU callbacks from this CPU, and the other is to have |
| 336 | * done everything RCU requires for the current grace period. In this |
| 337 | * latter case, the CPU will be awakened at the end of the current grace |
| 338 | * period in order to process the remainder of its callbacks. |
| 339 | * |
| 340 | * These tracepoints take a string as argument: |
| 341 | * |
| 342 | * "No callbacks": Nothing to do, no callbacks on this CPU. |
| 343 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 344 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. |
Paul E. McKenney | 7cb9249 | 2011-11-28 12:28:34 -0800 | [diff] [blame] | 345 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. |
Paul E. McKenney | fd4b352 | 2012-05-05 19:10:35 -0700 | [diff] [blame] | 346 | * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 347 | * "More callbacks": Still more callbacks, try again to clear them out. |
| 348 | * "Callbacks drained": All callbacks processed, off to dyntick idle! |
Paul E. McKenney | 7cb9249 | 2011-11-28 12:28:34 -0800 | [diff] [blame] | 349 | * "Timer": Timer fired to cause CPU to continue processing callbacks. |
Paul E. McKenney | 21e52e1 | 2012-04-30 14:16:19 -0700 | [diff] [blame] | 350 | * "Demigrate": Timer fired on wrong CPU, woke up correct CPU. |
Paul E. McKenney | 2fdbb31 | 2012-02-23 15:58:29 -0800 | [diff] [blame] | 351 | * "Cleanup after idle": Idle exited, timer canceled. |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 352 | */ |
| 353 | TRACE_EVENT(rcu_prep_idle, |
| 354 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 355 | TP_PROTO(const char *reason), |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 356 | |
| 357 | TP_ARGS(reason), |
| 358 | |
| 359 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 360 | __field(const char *, reason) |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 361 | ), |
| 362 | |
| 363 | TP_fast_assign( |
| 364 | __entry->reason = reason; |
| 365 | ), |
| 366 | |
| 367 | TP_printk("%s", __entry->reason) |
| 368 | ); |
| 369 | |
| 370 | /* |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 371 | * Tracepoint for the registration of a single RCU callback function. |
| 372 | * The first argument is the type of RCU, the second argument is |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 373 | * a pointer to the RCU callback itself, the third element is the |
| 374 | * number of lazy callbacks queued, and the fourth element is the |
| 375 | * total number of callbacks queued. |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 376 | */ |
| 377 | TRACE_EVENT(rcu_callback, |
| 378 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 379 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy, |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 380 | long qlen), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 381 | |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 382 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 383 | |
| 384 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 385 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 386 | __field(void *, rhp) |
| 387 | __field(void *, func) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 388 | __field(long, qlen_lazy) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 389 | __field(long, qlen) |
| 390 | ), |
| 391 | |
| 392 | TP_fast_assign( |
| 393 | __entry->rcuname = rcuname; |
| 394 | __entry->rhp = rhp; |
| 395 | __entry->func = rhp->func; |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 396 | __entry->qlen_lazy = qlen_lazy; |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 397 | __entry->qlen = qlen; |
| 398 | ), |
| 399 | |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 400 | TP_printk("%s rhp=%p func=%pf %ld/%ld", |
| 401 | __entry->rcuname, __entry->rhp, __entry->func, |
| 402 | __entry->qlen_lazy, __entry->qlen) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 403 | ); |
| 404 | |
| 405 | /* |
| 406 | * Tracepoint for the registration of a single RCU callback of the special |
| 407 | * kfree() form. The first argument is the RCU type, the second argument |
| 408 | * is a pointer to the RCU callback, the third argument is the offset |
| 409 | * of the callback within the enclosing RCU-protected data structure, |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 410 | * the fourth argument is the number of lazy callbacks queued, and the |
| 411 | * fifth argument is the total number of callbacks queued. |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 412 | */ |
| 413 | TRACE_EVENT(rcu_kfree_callback, |
| 414 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 415 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 416 | long qlen_lazy, long qlen), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 417 | |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 418 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 419 | |
| 420 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 421 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 422 | __field(void *, rhp) |
| 423 | __field(unsigned long, offset) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 424 | __field(long, qlen_lazy) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 425 | __field(long, qlen) |
| 426 | ), |
| 427 | |
| 428 | TP_fast_assign( |
| 429 | __entry->rcuname = rcuname; |
| 430 | __entry->rhp = rhp; |
| 431 | __entry->offset = offset; |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 432 | __entry->qlen_lazy = qlen_lazy; |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 433 | __entry->qlen = qlen; |
| 434 | ), |
| 435 | |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 436 | TP_printk("%s rhp=%p func=%ld %ld/%ld", |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 437 | __entry->rcuname, __entry->rhp, __entry->offset, |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 438 | __entry->qlen_lazy, __entry->qlen) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 439 | ); |
| 440 | |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 441 | /* |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 442 | * Tracepoint for marking the beginning rcu_do_batch, performed to start |
Paul E. McKenney | 72fe701 | 2011-06-21 01:14:54 -0700 | [diff] [blame] | 443 | * RCU callback invocation. The first argument is the RCU flavor, |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 444 | * the second is the number of lazy callbacks queued, the third is |
| 445 | * the total number of callbacks queued, and the fourth argument is |
| 446 | * the current RCU-callback batch limit. |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 447 | */ |
| 448 | TRACE_EVENT(rcu_batch_start, |
| 449 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 450 | TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit), |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 451 | |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 452 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 453 | |
| 454 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 455 | __field(const char *, rcuname) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 456 | __field(long, qlen_lazy) |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 457 | __field(long, qlen) |
Paul E. McKenney | 3aac7a8 | 2012-11-14 14:37:29 -0800 | [diff] [blame] | 458 | __field(long, blimit) |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 459 | ), |
| 460 | |
| 461 | TP_fast_assign( |
Paul E. McKenney | 72fe701 | 2011-06-21 01:14:54 -0700 | [diff] [blame] | 462 | __entry->rcuname = rcuname; |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 463 | __entry->qlen_lazy = qlen_lazy; |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 464 | __entry->qlen = qlen; |
| 465 | __entry->blimit = blimit; |
| 466 | ), |
| 467 | |
Paul E. McKenney | 3aac7a8 | 2012-11-14 14:37:29 -0800 | [diff] [blame] | 468 | TP_printk("%s CBs=%ld/%ld bl=%ld", |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 469 | __entry->rcuname, __entry->qlen_lazy, __entry->qlen, |
| 470 | __entry->blimit) |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 471 | ); |
| 472 | |
| 473 | /* |
| 474 | * Tracepoint for the invocation of a single RCU callback function. |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 475 | * The first argument is the type of RCU, and the second argument is |
| 476 | * a pointer to the RCU callback itself. |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 477 | */ |
| 478 | TRACE_EVENT(rcu_invoke_callback, |
| 479 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 480 | TP_PROTO(const char *rcuname, struct rcu_head *rhp), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 481 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 482 | TP_ARGS(rcuname, rhp), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 483 | |
| 484 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 485 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 486 | __field(void *, rhp) |
| 487 | __field(void *, func) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 488 | ), |
| 489 | |
| 490 | TP_fast_assign( |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 491 | __entry->rcuname = rcuname; |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 492 | __entry->rhp = rhp; |
| 493 | __entry->func = rhp->func; |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 494 | ), |
| 495 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 496 | TP_printk("%s rhp=%p func=%pf", |
| 497 | __entry->rcuname, __entry->rhp, __entry->func) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 498 | ); |
| 499 | |
| 500 | /* |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 501 | * Tracepoint for the invocation of a single RCU callback of the special |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 502 | * kfree() form. The first argument is the RCU flavor, the second |
| 503 | * argument is a pointer to the RCU callback, and the third argument |
| 504 | * is the offset of the callback within the enclosing RCU-protected |
| 505 | * data structure. |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 506 | */ |
| 507 | TRACE_EVENT(rcu_invoke_kfree_callback, |
| 508 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 509 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 510 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 511 | TP_ARGS(rcuname, rhp, offset), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 512 | |
| 513 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 514 | __field(const char *, rcuname) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 515 | __field(void *, rhp) |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 516 | __field(unsigned long, offset) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 517 | ), |
| 518 | |
| 519 | TP_fast_assign( |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 520 | __entry->rcuname = rcuname; |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 521 | __entry->rhp = rhp; |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 522 | __entry->offset = offset; |
| 523 | ), |
| 524 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 525 | TP_printk("%s rhp=%p func=%ld", |
| 526 | __entry->rcuname, __entry->rhp, __entry->offset) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 527 | ); |
| 528 | |
| 529 | /* |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 530 | * Tracepoint for exiting rcu_do_batch after RCU callbacks have been |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 531 | * invoked. The first argument is the name of the RCU flavor, |
| 532 | * the second argument is number of callbacks actually invoked, |
| 533 | * the third argument (cb) is whether or not any of the callbacks that |
| 534 | * were ready to invoke at the beginning of this batch are still |
| 535 | * queued, the fourth argument (nr) is the return value of need_resched(), |
| 536 | * the fifth argument (iit) is 1 if the current task is the idle task, |
| 537 | * and the sixth argument (risk) is the return value from |
| 538 | * rcu_is_callbacks_kthread(). |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 539 | */ |
| 540 | TRACE_EVENT(rcu_batch_end, |
| 541 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 542 | TP_PROTO(const char *rcuname, int callbacks_invoked, |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 543 | bool cb, bool nr, bool iit, bool risk), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 544 | |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 545 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 546 | |
| 547 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 548 | __field(const char *, rcuname) |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 549 | __field(int, callbacks_invoked) |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 550 | __field(bool, cb) |
| 551 | __field(bool, nr) |
| 552 | __field(bool, iit) |
| 553 | __field(bool, risk) |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 554 | ), |
| 555 | |
| 556 | TP_fast_assign( |
Paul E. McKenney | 72fe701 | 2011-06-21 01:14:54 -0700 | [diff] [blame] | 557 | __entry->rcuname = rcuname; |
Paul E. McKenney | 300df91 | 2011-06-18 22:26:31 -0700 | [diff] [blame] | 558 | __entry->callbacks_invoked = callbacks_invoked; |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 559 | __entry->cb = cb; |
| 560 | __entry->nr = nr; |
| 561 | __entry->iit = iit; |
| 562 | __entry->risk = risk; |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 563 | ), |
| 564 | |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 565 | TP_printk("%s CBs-invoked=%d idle=%c%c%c%c", |
| 566 | __entry->rcuname, __entry->callbacks_invoked, |
| 567 | __entry->cb ? 'C' : '.', |
| 568 | __entry->nr ? 'S' : '.', |
| 569 | __entry->iit ? 'I' : '.', |
| 570 | __entry->risk ? 'R' : '.') |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 571 | ); |
| 572 | |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 573 | /* |
| 574 | * Tracepoint for rcutorture readers. The first argument is the name |
| 575 | * of the RCU flavor from rcutorture's viewpoint and the second argument |
| 576 | * is the callback address. |
| 577 | */ |
| 578 | TRACE_EVENT(rcu_torture_read, |
| 579 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 580 | TP_PROTO(const char *rcutorturename, struct rcu_head *rhp, |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 581 | unsigned long secs, unsigned long c_old, unsigned long c), |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 582 | |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 583 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 584 | |
| 585 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 586 | __field(const char *, rcutorturename) |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 587 | __field(struct rcu_head *, rhp) |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 588 | __field(unsigned long, secs) |
| 589 | __field(unsigned long, c_old) |
| 590 | __field(unsigned long, c) |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 591 | ), |
| 592 | |
| 593 | TP_fast_assign( |
| 594 | __entry->rcutorturename = rcutorturename; |
| 595 | __entry->rhp = rhp; |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 596 | __entry->secs = secs; |
| 597 | __entry->c_old = c_old; |
| 598 | __entry->c = c; |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 599 | ), |
| 600 | |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 601 | TP_printk("%s torture read %p %luus c: %lu %lu", |
| 602 | __entry->rcutorturename, __entry->rhp, |
| 603 | __entry->secs, __entry->c_old, __entry->c) |
Paul E. McKenney | 91afaf3 | 2011-10-02 07:44:32 -0700 | [diff] [blame] | 604 | ); |
| 605 | |
Paul E. McKenney | a83eff0 | 2012-05-23 18:47:05 -0700 | [diff] [blame] | 606 | /* |
| 607 | * Tracepoint for _rcu_barrier() execution. The string "s" describes |
| 608 | * the _rcu_barrier phase: |
| 609 | * "Begin": rcu_barrier_callback() started. |
| 610 | * "Check": rcu_barrier_callback() checking for piggybacking. |
| 611 | * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. |
| 612 | * "Inc1": rcu_barrier_callback() piggyback check counter incremented. |
| 613 | * "Offline": rcu_barrier_callback() found offline CPU |
Paul E. McKenney | 3fbfbf7 | 2012-08-19 21:35:53 -0700 | [diff] [blame] | 614 | * "OnlineNoCB": rcu_barrier_callback() found online no-CBs CPU. |
Paul E. McKenney | a83eff0 | 2012-05-23 18:47:05 -0700 | [diff] [blame] | 615 | * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. |
| 616 | * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. |
| 617 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. |
| 618 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. |
| 619 | * "LastCB": An rcu_barrier_callback() invoked the last callback. |
| 620 | * "Inc2": rcu_barrier_callback() piggyback check counter incremented. |
| 621 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument |
| 622 | * is the count of remaining callbacks, and "done" is the piggybacking count. |
| 623 | */ |
| 624 | TRACE_EVENT(rcu_barrier, |
| 625 | |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 626 | TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done), |
Paul E. McKenney | a83eff0 | 2012-05-23 18:47:05 -0700 | [diff] [blame] | 627 | |
| 628 | TP_ARGS(rcuname, s, cpu, cnt, done), |
| 629 | |
| 630 | TP_STRUCT__entry( |
Steven Rostedt (Red Hat) | e66c33d | 2013-07-12 16:50:28 -0400 | [diff] [blame^] | 631 | __field(const char *, rcuname) |
| 632 | __field(const char *, s) |
Paul E. McKenney | a83eff0 | 2012-05-23 18:47:05 -0700 | [diff] [blame] | 633 | __field(int, cpu) |
| 634 | __field(int, cnt) |
| 635 | __field(unsigned long, done) |
| 636 | ), |
| 637 | |
| 638 | TP_fast_assign( |
| 639 | __entry->rcuname = rcuname; |
| 640 | __entry->s = s; |
| 641 | __entry->cpu = cpu; |
| 642 | __entry->cnt = cnt; |
| 643 | __entry->done = done; |
| 644 | ), |
| 645 | |
| 646 | TP_printk("%s %s cpu %d remaining %d # %lu", |
| 647 | __entry->rcuname, __entry->s, __entry->cpu, __entry->cnt, |
| 648 | __entry->done) |
| 649 | ); |
| 650 | |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 651 | #else /* #ifdef CONFIG_RCU_TRACE */ |
| 652 | |
| 653 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 654 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ |
| 655 | qsmask) do { } while (0) |
Paul E. McKenney | bd9f068 | 2012-12-29 21:51:20 -0800 | [diff] [blame] | 656 | #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \ |
| 657 | level, grplo, grphi, event) \ |
| 658 | do { } while (0) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 659 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) |
| 660 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 661 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ |
| 662 | grplo, grphi, gp_tasks) do { } \ |
| 663 | while (0) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 664 | #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) |
Paul E. McKenney | 4145fa7 | 2011-10-31 15:01:54 -0700 | [diff] [blame] | 665 | #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) |
Paul E. McKenney | 433cddd | 2011-11-22 14:58:03 -0800 | [diff] [blame] | 666 | #define trace_rcu_prep_idle(reason) do { } while (0) |
Paul E. McKenney | 486e259 | 2012-01-06 14:11:30 -0800 | [diff] [blame] | 667 | #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0) |
| 668 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \ |
| 669 | do { } while (0) |
| 670 | #define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \ |
| 671 | do { } while (0) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 672 | #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) |
| 673 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) |
Paul E. McKenney | 4968c30 | 2011-12-07 16:32:40 -0800 | [diff] [blame] | 674 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ |
| 675 | do { } while (0) |
Paul E. McKenney | 5249453 | 2012-11-14 16:26:40 -0800 | [diff] [blame] | 676 | #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ |
| 677 | do { } while (0) |
Paul E. McKenney | a83eff0 | 2012-05-23 18:47:05 -0700 | [diff] [blame] | 678 | #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) |
Paul E. McKenney | d4c08f2 | 2011-06-25 06:36:56 -0700 | [diff] [blame] | 679 | |
| 680 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ |
| 681 | |
Paul E. McKenney | 29c00b4 | 2011-06-17 15:53:19 -0700 | [diff] [blame] | 682 | #endif /* _TRACE_RCU_H */ |
| 683 | |
| 684 | /* This part must be outside protection */ |
| 685 | #include <trace/define_trace.h> |