diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/rcu.h | 122 | ||||
-rw-r--r-- | include/trace/events/writeback.h | 15 |
2 files changed, 122 insertions, 15 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 669fbd62ec25..d2d88bed891b 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -241,24 +241,73 @@ TRACE_EVENT(rcu_fqs, | |||
241 | 241 | ||
242 | /* | 242 | /* |
243 | * Tracepoint for dyntick-idle entry/exit events. These take a string | 243 | * Tracepoint for dyntick-idle entry/exit events. These take a string |
244 | * as argument: "Start" for entering dyntick-idle mode and "End" for | 244 | * as argument: "Start" for entering dyntick-idle mode, "End" for |
245 | * leaving it. | 245 | * leaving it, "--=" for events moving towards idle, and "++=" for events |
246 | * moving away from idle. "Error on entry: not idle task" and "Error on | ||
247 | * exit: not idle task" indicate that a non-idle task is erroneously | ||
248 | * toying with the idle loop. | ||
249 | * | ||
250 | * These events also take a pair of numbers, which indicate the nesting | ||
251 | * depth before and after the event of interest. Note that task-related | ||
252 | * events use the upper bits of each number, while interrupt-related | ||
253 | * events use the lower bits. | ||
246 | */ | 254 | */ |
247 | TRACE_EVENT(rcu_dyntick, | 255 | TRACE_EVENT(rcu_dyntick, |
248 | 256 | ||
249 | TP_PROTO(char *polarity), | 257 | TP_PROTO(char *polarity, long long oldnesting, long long newnesting), |
250 | 258 | ||
251 | TP_ARGS(polarity), | 259 | TP_ARGS(polarity, oldnesting, newnesting), |
252 | 260 | ||
253 | TP_STRUCT__entry( | 261 | TP_STRUCT__entry( |
254 | __field(char *, polarity) | 262 | __field(char *, polarity) |
263 | __field(long long, oldnesting) | ||
264 | __field(long long, newnesting) | ||
255 | ), | 265 | ), |
256 | 266 | ||
257 | TP_fast_assign( | 267 | TP_fast_assign( |
258 | __entry->polarity = polarity; | 268 | __entry->polarity = polarity; |
269 | __entry->oldnesting = oldnesting; | ||
270 | __entry->newnesting = newnesting; | ||
271 | ), | ||
272 | |||
273 | TP_printk("%s %llx %llx", __entry->polarity, | ||
274 | __entry->oldnesting, __entry->newnesting) | ||
275 | ); | ||
276 | |||
277 | /* | ||
278 | * Tracepoint for RCU preparation for idle, the goal being to get RCU | ||
279 | * processing done so that the current CPU can shut off its scheduling | ||
280 | * clock and enter dyntick-idle mode. One way to accomplish this is | ||
281 | * to drain all RCU callbacks from this CPU, and the other is to have | ||
282 | * done everything RCU requires for the current grace period. In this | ||
283 | * latter case, the CPU will be awakened at the end of the current grace | ||
284 | * period in order to process the remainder of its callbacks. | ||
285 | * | ||
286 | * These tracepoints take a string as argument: | ||
287 | * | ||
288 | * "No callbacks": Nothing to do, no callbacks on this CPU. | ||
289 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. | ||
290 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. | ||
291 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. | ||
292 | * "More callbacks": Still more callbacks, try again to clear them out. | ||
293 | * "Callbacks drained": All callbacks processed, off to dyntick idle! | ||
294 | * "Timer": Timer fired to cause CPU to continue processing callbacks. | ||
295 | */ | ||
296 | TRACE_EVENT(rcu_prep_idle, | ||
297 | |||
298 | TP_PROTO(char *reason), | ||
299 | |||
300 | TP_ARGS(reason), | ||
301 | |||
302 | TP_STRUCT__entry( | ||
303 | __field(char *, reason) | ||
304 | ), | ||
305 | |||
306 | TP_fast_assign( | ||
307 | __entry->reason = reason; | ||
259 | ), | 308 | ), |
260 | 309 | ||
261 | TP_printk("%s", __entry->polarity) | 310 | TP_printk("%s", __entry->reason) |
262 | ); | 311 | ); |
263 | 312 | ||
264 | /* | 313 | /* |
@@ -412,27 +461,71 @@ TRACE_EVENT(rcu_invoke_kfree_callback, | |||
412 | 461 | ||
413 | /* | 462 | /* |
414 | * Tracepoint for exiting rcu_do_batch after RCU callbacks have been | 463 | * Tracepoint for exiting rcu_do_batch after RCU callbacks have been |
415 | * invoked. The first argument is the name of the RCU flavor and | 464 | * invoked. The first argument is the name of the RCU flavor, |
416 | * the second argument is number of callbacks actually invoked. | 465 | * the second argument is number of callbacks actually invoked, |
466 | * the third argument (cb) is whether or not any of the callbacks that | ||
467 | * were ready to invoke at the beginning of this batch are still | ||
468 | * queued, the fourth argument (nr) is the return value of need_resched(), | ||
469 | * the fifth argument (iit) is 1 if the current task is the idle task, | ||
470 | * and the sixth argument (risk) is the return value from | ||
471 | * rcu_is_callbacks_kthread(). | ||
417 | */ | 472 | */ |
418 | TRACE_EVENT(rcu_batch_end, | 473 | TRACE_EVENT(rcu_batch_end, |
419 | 474 | ||
420 | TP_PROTO(char *rcuname, int callbacks_invoked), | 475 | TP_PROTO(char *rcuname, int callbacks_invoked, |
476 | bool cb, bool nr, bool iit, bool risk), | ||
421 | 477 | ||
422 | TP_ARGS(rcuname, callbacks_invoked), | 478 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), |
423 | 479 | ||
424 | TP_STRUCT__entry( | 480 | TP_STRUCT__entry( |
425 | __field(char *, rcuname) | 481 | __field(char *, rcuname) |
426 | __field(int, callbacks_invoked) | 482 | __field(int, callbacks_invoked) |
483 | __field(bool, cb) | ||
484 | __field(bool, nr) | ||
485 | __field(bool, iit) | ||
486 | __field(bool, risk) | ||
427 | ), | 487 | ), |
428 | 488 | ||
429 | TP_fast_assign( | 489 | TP_fast_assign( |
430 | __entry->rcuname = rcuname; | 490 | __entry->rcuname = rcuname; |
431 | __entry->callbacks_invoked = callbacks_invoked; | 491 | __entry->callbacks_invoked = callbacks_invoked; |
492 | __entry->cb = cb; | ||
493 | __entry->nr = nr; | ||
494 | __entry->iit = iit; | ||
495 | __entry->risk = risk; | ||
496 | ), | ||
497 | |||
498 | TP_printk("%s CBs-invoked=%d idle=%c%c%c%c", | ||
499 | __entry->rcuname, __entry->callbacks_invoked, | ||
500 | __entry->cb ? 'C' : '.', | ||
501 | __entry->nr ? 'S' : '.', | ||
502 | __entry->iit ? 'I' : '.', | ||
503 | __entry->risk ? 'R' : '.') | ||
504 | ); | ||
505 | |||
506 | /* | ||
507 | * Tracepoint for rcutorture readers. The first argument is the name | ||
508 | * of the RCU flavor from rcutorture's viewpoint and the second argument | ||
509 | * is the callback address. | ||
510 | */ | ||
511 | TRACE_EVENT(rcu_torture_read, | ||
512 | |||
513 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp), | ||
514 | |||
515 | TP_ARGS(rcutorturename, rhp), | ||
516 | |||
517 | TP_STRUCT__entry( | ||
518 | __field(char *, rcutorturename) | ||
519 | __field(struct rcu_head *, rhp) | ||
520 | ), | ||
521 | |||
522 | TP_fast_assign( | ||
523 | __entry->rcutorturename = rcutorturename; | ||
524 | __entry->rhp = rhp; | ||
432 | ), | 525 | ), |
433 | 526 | ||
434 | TP_printk("%s CBs-invoked=%d", | 527 | TP_printk("%s torture read %p", |
435 | __entry->rcuname, __entry->callbacks_invoked) | 528 | __entry->rcutorturename, __entry->rhp) |
436 | ); | 529 | ); |
437 | 530 | ||
438 | #else /* #ifdef CONFIG_RCU_TRACE */ | 531 | #else /* #ifdef CONFIG_RCU_TRACE */ |
@@ -443,13 +536,16 @@ TRACE_EVENT(rcu_batch_end, | |||
443 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | 536 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) |
444 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks) do { } while (0) | 537 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks) do { } while (0) |
445 | #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) | 538 | #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) |
446 | #define trace_rcu_dyntick(polarity) do { } while (0) | 539 | #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) |
540 | #define trace_rcu_prep_idle(reason) do { } while (0) | ||
447 | #define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0) | 541 | #define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0) |
448 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0) | 542 | #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0) |
449 | #define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) | 543 | #define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0) |
450 | #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) | 544 | #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) |
451 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) | 545 | #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) |
452 | #define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0) | 546 | #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ |
547 | do { } while (0) | ||
548 | #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) | ||
453 | 549 | ||
454 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ | 550 | #endif /* #else #ifdef CONFIG_RCU_TRACE */ |
455 | 551 | ||
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index b99caa8b780c..99d1d0decf88 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -21,6 +21,16 @@ | |||
21 | {I_REFERENCED, "I_REFERENCED"} \ | 21 | {I_REFERENCED, "I_REFERENCED"} \ |
22 | ) | 22 | ) |
23 | 23 | ||
24 | #define WB_WORK_REASON \ | ||
25 | {WB_REASON_BACKGROUND, "background"}, \ | ||
26 | {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ | ||
27 | {WB_REASON_SYNC, "sync"}, \ | ||
28 | {WB_REASON_PERIODIC, "periodic"}, \ | ||
29 | {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ | ||
30 | {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ | ||
31 | {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ | ||
32 | {WB_REASON_FORKER_THREAD, "forker_thread"} | ||
33 | |||
24 | struct wb_writeback_work; | 34 | struct wb_writeback_work; |
25 | 35 | ||
26 | DECLARE_EVENT_CLASS(writeback_work_class, | 36 | DECLARE_EVENT_CLASS(writeback_work_class, |
@@ -55,7 +65,7 @@ DECLARE_EVENT_CLASS(writeback_work_class, | |||
55 | __entry->for_kupdate, | 65 | __entry->for_kupdate, |
56 | __entry->range_cyclic, | 66 | __entry->range_cyclic, |
57 | __entry->for_background, | 67 | __entry->for_background, |
58 | wb_reason_name[__entry->reason] | 68 | __print_symbolic(__entry->reason, WB_WORK_REASON) |
59 | ) | 69 | ) |
60 | ); | 70 | ); |
61 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ | 71 | #define DEFINE_WRITEBACK_WORK_EVENT(name) \ |
@@ -184,7 +194,8 @@ TRACE_EVENT(writeback_queue_io, | |||
184 | __entry->older, /* older_than_this in jiffies */ | 194 | __entry->older, /* older_than_this in jiffies */ |
185 | __entry->age, /* older_than_this in relative milliseconds */ | 195 | __entry->age, /* older_than_this in relative milliseconds */ |
186 | __entry->moved, | 196 | __entry->moved, |
187 | wb_reason_name[__entry->reason]) | 197 | __print_symbolic(__entry->reason, WB_WORK_REASON) |
198 | ) | ||
188 | ); | 199 | ); |
189 | 200 | ||
190 | TRACE_EVENT(global_dirty_state, | 201 | TRACE_EVENT(global_dirty_state, |