diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-10-23 14:05:43 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-10-23 14:05:43 -0400 |
| commit | b8ecad8b2f8757d51632b1ea6d602c1f7b9760a2 (patch) | |
| tree | 5a03029dbf02df606fa48a82525eb321e59b5c33 | |
| parent | eea4a0b19a2719e3e23b5450dd9fbe97789d2a57 (diff) | |
| parent | 8bfb5e7d6a14b29cffddd113f4b0be7d9aafc1e8 (diff) | |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
| -rw-r--r-- | include/linux/interrupt.h | 2 | ||||
| -rw-r--r-- | include/trace/events/irq.h | 54 | ||||
| -rw-r--r-- | kernel/softirq.c | 16 | ||||
| -rw-r--r-- | tools/perf/Documentation/perf-probe.txt | 18 | ||||
| -rw-r--r-- | tools/perf/builtin-probe.c | 78 | ||||
| -rw-r--r-- | tools/perf/util/map.h | 10 | ||||
| -rw-r--r-- | tools/perf/util/probe-event.c | 189 | ||||
| -rw-r--r-- | tools/perf/util/probe-event.h | 16 | ||||
| -rw-r--r-- | tools/perf/util/probe-finder.c | 644 | ||||
| -rw-r--r-- | tools/perf/util/probe-finder.h | 31 | ||||
| -rw-r--r-- | tools/perf/util/ui/browser.c | 1 |
11 files changed, 823 insertions, 236 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 414328577ced..07f741a075a7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -410,7 +410,7 @@ extern void open_softirq(int nr, void (*action)(struct softirq_action *)); | |||
| 410 | extern void softirq_init(void); | 410 | extern void softirq_init(void); |
| 411 | static inline void __raise_softirq_irqoff(unsigned int nr) | 411 | static inline void __raise_softirq_irqoff(unsigned int nr) |
| 412 | { | 412 | { |
| 413 | trace_softirq_raise((struct softirq_action *)(unsigned long)nr, NULL); | 413 | trace_softirq_raise(nr); |
| 414 | or_softirq_pending(1UL << nr); | 414 | or_softirq_pending(1UL << nr); |
| 415 | } | 415 | } |
| 416 | 416 | ||
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index 6fa7cbab7d93..1c09820df585 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
| @@ -86,76 +86,62 @@ TRACE_EVENT(irq_handler_exit, | |||
| 86 | 86 | ||
| 87 | DECLARE_EVENT_CLASS(softirq, | 87 | DECLARE_EVENT_CLASS(softirq, |
| 88 | 88 | ||
| 89 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 89 | TP_PROTO(unsigned int vec_nr), |
| 90 | 90 | ||
| 91 | TP_ARGS(h, vec), | 91 | TP_ARGS(vec_nr), |
| 92 | 92 | ||
| 93 | TP_STRUCT__entry( | 93 | TP_STRUCT__entry( |
| 94 | __field( int, vec ) | 94 | __field( unsigned int, vec ) |
| 95 | ), | 95 | ), |
| 96 | 96 | ||
| 97 | TP_fast_assign( | 97 | TP_fast_assign( |
| 98 | if (vec) | 98 | __entry->vec = vec_nr; |
| 99 | __entry->vec = (int)(h - vec); | ||
| 100 | else | ||
| 101 | __entry->vec = (int)(long)h; | ||
| 102 | ), | 99 | ), |
| 103 | 100 | ||
| 104 | TP_printk("vec=%d [action=%s]", __entry->vec, | 101 | TP_printk("vec=%u [action=%s]", __entry->vec, |
| 105 | show_softirq_name(__entry->vec)) | 102 | show_softirq_name(__entry->vec)) |
| 106 | ); | 103 | ); |
| 107 | 104 | ||
| 108 | /** | 105 | /** |
| 109 | * softirq_entry - called immediately before the softirq handler | 106 | * softirq_entry - called immediately before the softirq handler |
| 110 | * @h: pointer to struct softirq_action | 107 | * @vec_nr: softirq vector number |
| 111 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
| 112 | * | 108 | * |
| 113 | * The @h parameter, contains a pointer to the struct softirq_action | 109 | * When used in combination with the softirq_exit tracepoint |
| 114 | * which has a pointer to the action handler that is called. By subtracting | 110 | * we can determine the softirq handler runtine. |
| 115 | * the @vec pointer from the @h pointer, we can determine the softirq | ||
| 116 | * number. Also, when used in combination with the softirq_exit tracepoint | ||
| 117 | * we can determine the softirq latency. | ||
| 118 | */ | 111 | */ |
| 119 | DEFINE_EVENT(softirq, softirq_entry, | 112 | DEFINE_EVENT(softirq, softirq_entry, |
| 120 | 113 | ||
| 121 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 114 | TP_PROTO(unsigned int vec_nr), |
| 122 | 115 | ||
| 123 | TP_ARGS(h, vec) | 116 | TP_ARGS(vec_nr) |
| 124 | ); | 117 | ); |
| 125 | 118 | ||
| 126 | /** | 119 | /** |
| 127 | * softirq_exit - called immediately after the softirq handler returns | 120 | * softirq_exit - called immediately after the softirq handler returns |
| 128 | * @h: pointer to struct softirq_action | 121 | * @vec_nr: softirq vector number |
| 129 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
| 130 | * | 122 | * |
| 131 | * The @h parameter contains a pointer to the struct softirq_action | 123 | * When used in combination with the softirq_entry tracepoint |
| 132 | * that has handled the softirq. By subtracting the @vec pointer from | 124 | * we can determine the softirq handler runtine. |
| 133 | * the @h pointer, we can determine the softirq number. Also, when used in | ||
| 134 | * combination with the softirq_entry tracepoint we can determine the softirq | ||
| 135 | * latency. | ||
| 136 | */ | 125 | */ |
| 137 | DEFINE_EVENT(softirq, softirq_exit, | 126 | DEFINE_EVENT(softirq, softirq_exit, |
| 138 | 127 | ||
| 139 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 128 | TP_PROTO(unsigned int vec_nr), |
| 140 | 129 | ||
| 141 | TP_ARGS(h, vec) | 130 | TP_ARGS(vec_nr) |
| 142 | ); | 131 | ); |
| 143 | 132 | ||
| 144 | /** | 133 | /** |
| 145 | * softirq_raise - called immediately when a softirq is raised | 134 | * softirq_raise - called immediately when a softirq is raised |
| 146 | * @h: pointer to struct softirq_action | 135 | * @vec_nr: softirq vector number |
| 147 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
| 148 | * | 136 | * |
| 149 | * The @h parameter contains a pointer to the softirq vector number which is | 137 | * When used in combination with the softirq_entry tracepoint |
| 150 | * raised. @vec is NULL and it means @h includes vector number not | 138 | * we can determine the softirq raise to run latency. |
| 151 | * softirq_action. When used in combination with the softirq_entry tracepoint | ||
| 152 | * we can determine the softirq raise latency. | ||
| 153 | */ | 139 | */ |
| 154 | DEFINE_EVENT(softirq, softirq_raise, | 140 | DEFINE_EVENT(softirq, softirq_raise, |
| 155 | 141 | ||
| 156 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 142 | TP_PROTO(unsigned int vec_nr), |
| 157 | 143 | ||
| 158 | TP_ARGS(h, vec) | 144 | TP_ARGS(vec_nr) |
| 159 | ); | 145 | ); |
| 160 | 146 | ||
| 161 | #endif /* _TRACE_IRQ_H */ | 147 | #endif /* _TRACE_IRQ_H */ |
diff --git a/kernel/softirq.c b/kernel/softirq.c index fc978889b194..e33fd71ed66a 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
| @@ -229,18 +229,20 @@ restart: | |||
| 229 | 229 | ||
| 230 | do { | 230 | do { |
| 231 | if (pending & 1) { | 231 | if (pending & 1) { |
| 232 | unsigned int vec_nr = h - softirq_vec; | ||
| 232 | int prev_count = preempt_count(); | 233 | int prev_count = preempt_count(); |
| 233 | kstat_incr_softirqs_this_cpu(h - softirq_vec); | ||
| 234 | 234 | ||
| 235 | trace_softirq_entry(h, softirq_vec); | 235 | kstat_incr_softirqs_this_cpu(vec_nr); |
| 236 | |||
| 237 | trace_softirq_entry(vec_nr); | ||
| 236 | h->action(h); | 238 | h->action(h); |
| 237 | trace_softirq_exit(h, softirq_vec); | 239 | trace_softirq_exit(vec_nr); |
| 238 | if (unlikely(prev_count != preempt_count())) { | 240 | if (unlikely(prev_count != preempt_count())) { |
| 239 | printk(KERN_ERR "huh, entered softirq %td %s %p" | 241 | printk(KERN_ERR "huh, entered softirq %u %s %p" |
| 240 | "with preempt_count %08x," | 242 | "with preempt_count %08x," |
| 241 | " exited with %08x?\n", h - softirq_vec, | 243 | " exited with %08x?\n", vec_nr, |
| 242 | softirq_to_name[h - softirq_vec], | 244 | softirq_to_name[vec_nr], h->action, |
| 243 | h->action, prev_count, preempt_count()); | 245 | prev_count, preempt_count()); |
| 244 | preempt_count() = prev_count; | 246 | preempt_count() = prev_count; |
| 245 | } | 247 | } |
| 246 | 248 | ||
diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt index 27d52dae5a43..62de1b7f4e76 100644 --- a/tools/perf/Documentation/perf-probe.txt +++ b/tools/perf/Documentation/perf-probe.txt | |||
| @@ -16,7 +16,9 @@ or | |||
| 16 | or | 16 | or |
| 17 | 'perf probe' --list | 17 | 'perf probe' --list |
| 18 | or | 18 | or |
| 19 | 'perf probe' --line='FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]' | 19 | 'perf probe' [options] --line='FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]' |
| 20 | or | ||
| 21 | 'perf probe' [options] --vars='PROBEPOINT' | ||
| 20 | 22 | ||
| 21 | DESCRIPTION | 23 | DESCRIPTION |
