diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:20 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:28 -0400 |
| commit | 37eca0d64a2dbeece25969ec0698e1ff72bdcf39 (patch) | |
| tree | 54ba70f0428f586f4fe28d8b429b9f9e0799a17a /include/trace | |
| parent | 277b199800ac90811ac86d215063df1984f51619 (diff) | |
| parent | 3c06806e690885ce978ef180c8f8b6f8c17fb4b4 (diff) | |
Merge branch 'linus' into core/locking
Reason: Pull in the semaphore related changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/timer.h | 8 | ||||
| -rw-r--r-- | include/trace/events/workqueue.h | 62 |
2 files changed, 68 insertions, 2 deletions
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index c624126a9c8a..425bcfe56c62 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h | |||
| @@ -81,14 +81,16 @@ TRACE_EVENT(timer_expire_entry, | |||
| 81 | TP_STRUCT__entry( | 81 | TP_STRUCT__entry( |
| 82 | __field( void *, timer ) | 82 | __field( void *, timer ) |
| 83 | __field( unsigned long, now ) | 83 | __field( unsigned long, now ) |
| 84 | __field( void *, function) | ||
| 84 | ), | 85 | ), |
| 85 | 86 | ||
| 86 | TP_fast_assign( | 87 | TP_fast_assign( |
| 87 | __entry->timer = timer; | 88 | __entry->timer = timer; |
| 88 | __entry->now = jiffies; | 89 | __entry->now = jiffies; |
| 90 | __entry->function = timer->function; | ||
| 89 | ), | 91 | ), |
| 90 | 92 | ||
| 91 | TP_printk("timer=%p now=%lu", __entry->timer, __entry->now) | 93 | TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now) |
| 92 | ); | 94 | ); |
| 93 | 95 | ||
| 94 | /** | 96 | /** |
| @@ -200,14 +202,16 @@ TRACE_EVENT(hrtimer_expire_entry, | |||
| 200 | TP_STRUCT__entry( | 202 | TP_STRUCT__entry( |
| 201 | __field( void *, hrtimer ) | 203 | __field( void *, hrtimer ) |
| 202 | __field( s64, now ) | 204 | __field( s64, now ) |
| 205 | __field( void *, function) | ||
| 203 | ), | 206 | ), |
| 204 | 207 | ||
| 205 | TP_fast_assign( | 208 | TP_fast_assign( |
| 206 | __entry->hrtimer = hrtimer; | 209 | __entry->hrtimer = hrtimer; |
| 207 | __entry->now = now->tv64; | 210 | __entry->now = now->tv64; |
| 211 | __entry->function = hrtimer->function; | ||
| 208 | ), | 212 | ), |
| 209 | 213 | ||
| 210 | TP_printk("hrtimer=%p now=%llu", __entry->hrtimer, | 214 | TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, |
| 211 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) | 215 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) |
| 212 | ); | 216 | ); |
| 213 | 217 | ||
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h new file mode 100644 index 000000000000..49682d7e9d60 --- /dev/null +++ b/include/trace/events/workqueue.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM workqueue | ||
| 3 | |||
| 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_WORKQUEUE_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | #include <linux/workqueue.h> | ||
| 9 | |||
| 10 | /** | ||
| 11 | * workqueue_execute_start - called immediately before the workqueue callback | ||
| 12 | * @work: pointer to struct work_struct | ||
| 13 | * | ||
| 14 | * Allows to track workqueue execution. | ||
| 15 | */ | ||
| 16 | TRACE_EVENT(workqueue_execute_start, | ||
| 17 | |||
| 18 | TP_PROTO(struct work_struct *work), | ||
| 19 | |||
| 20 | TP_ARGS(work), | ||
| 21 | |||
| 22 | TP_STRUCT__entry( | ||
| 23 | __field( void *, work ) | ||
| 24 | __field( void *, function) | ||
| 25 | ), | ||
| 26 | |||
| 27 | TP_fast_assign( | ||
| 28 | __entry->work = work; | ||
| 29 | __entry->function = work->func; | ||
| 30 | ), | ||
| 31 | |||
| 32 | TP_printk("work struct %p: function %pf", __entry->work, __entry->function) | ||
| 33 | ); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * workqueue_execute_end - called immediately before the workqueue callback | ||
| 37 | * @work: pointer to struct work_struct | ||
| 38 | * | ||
| 39 | * Allows to track workqueue execution. | ||
| 40 | */ | ||
| 41 | TRACE_EVENT(workqueue_execute_end, | ||
| 42 | |||
| 43 | TP_PROTO(struct work_struct *work), | ||
| 44 | |||
| 45 | TP_ARGS(work), | ||
| 46 | |||
| 47 | TP_STRUCT__entry( | ||
| 48 | __field( void *, work ) | ||
| 49 | ), | ||
| 50 | |||
| 51 | TP_fast_assign( | ||
| 52 | __entry->work = work; | ||
| 53 | ), | ||
| 54 | |||
| 55 | TP_printk("work struct %p", __entry->work) | ||
| 56 | ); | ||
| 57 | |||
| 58 | |||
| 59 | #endif /* _TRACE_WORKQUEUE_H */ | ||
| 60 | |||
| 61 | /* This part must be outside protection */ | ||
| 62 | #include <trace/define_trace.h> | ||
