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 | /* |
| 10 | * Tracepoint for calling rcu_do_batch, performed to start callback invocation: |
| 11 | */ |
| 12 | TRACE_EVENT(rcu_batch_start, |
| 13 | |
| 14 | TP_PROTO(long callbacks_ready, int blimit), |
| 15 | |
| 16 | TP_ARGS(callbacks_ready, blimit), |
| 17 | |
| 18 | TP_STRUCT__entry( |
| 19 | __field( long, callbacks_ready ) |
| 20 | __field( int, blimit ) |
| 21 | ), |
| 22 | |
| 23 | TP_fast_assign( |
| 24 | __entry->callbacks_ready = callbacks_ready; |
| 25 | __entry->blimit = blimit; |
| 26 | ), |
| 27 | |
| 28 | TP_printk("CBs=%ld bl=%d", __entry->callbacks_ready, __entry->blimit) |
| 29 | ); |
| 30 | |
| 31 | /* |
| 32 | * Tracepoint for the invocation of a single RCU callback |
| 33 | */ |
| 34 | TRACE_EVENT(rcu_invoke_callback, |
| 35 | |
| 36 | TP_PROTO(struct rcu_head *rhp), |
| 37 | |
| 38 | TP_ARGS(rhp), |
| 39 | |
| 40 | TP_STRUCT__entry( |
| 41 | __field( void *, rhp ) |
| 42 | __field( void *, func ) |
| 43 | ), |
| 44 | |
| 45 | TP_fast_assign( |
| 46 | __entry->rhp = rhp; |
| 47 | __entry->func = rhp->func; |
| 48 | ), |
| 49 | |
| 50 | TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func) |
| 51 | ); |
| 52 | |
| 53 | /* |
| 54 | * Tracepoint for the invocation of a single RCU kfree callback |
| 55 | */ |
| 56 | TRACE_EVENT(rcu_invoke_kfree_callback, |
| 57 | |
| 58 | TP_PROTO(struct rcu_head *rhp, unsigned long offset), |
| 59 | |
| 60 | TP_ARGS(rhp, offset), |
| 61 | |
| 62 | TP_STRUCT__entry( |
| 63 | __field(void *, rhp ) |
| 64 | __field(unsigned long, offset ) |
| 65 | ), |
| 66 | |
| 67 | TP_fast_assign( |
| 68 | __entry->rhp = rhp; |
| 69 | __entry->offset = offset; |
| 70 | ), |
| 71 | |
| 72 | TP_printk("rhp=%p func=%ld", __entry->rhp, __entry->offset) |
| 73 | ); |
| 74 | |
| 75 | /* |
| 76 | * Tracepoint for leaving rcu_do_batch, performed after callback invocation: |
| 77 | */ |
| 78 | TRACE_EVENT(rcu_batch_end, |
| 79 | |
| 80 | TP_PROTO(int callbacks_invoked), |
| 81 | |
| 82 | TP_ARGS(callbacks_invoked), |
| 83 | |
| 84 | TP_STRUCT__entry( |
| 85 | __field( int, callbacks_invoked ) |
| 86 | ), |
| 87 | |
| 88 | TP_fast_assign( |
| 89 | __entry->callbacks_invoked = callbacks_invoked; |
| 90 | ), |
| 91 | |
| 92 | TP_printk("CBs-invoked=%d", __entry->callbacks_invoked) |
| 93 | ); |
| 94 | |
| 95 | #endif /* _TRACE_RCU_H */ |
| 96 | |
| 97 | /* This part must be outside protection */ |
| 98 | #include <trace/define_trace.h> |