diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2009-11-26 00:20:58 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2009-11-26 00:25:52 -0500 |
| commit | f2954cc6cf1789464b57799e6e04746ab6b8bc55 (patch) | |
| tree | ef3eae1b90dacf212bb4c9cd7609a76fc65c86a0 | |
| parent | 2f4ca05dc388f56309c38bedda9722592cebabf1 (diff) | |
A callback plugin may need to know what cpu it is on
Callbacks in plugins may need to know what cpu the trace was recorded on.
This patch gives the callback the cpu it is on.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | parse-events.c | 2 | ||||
| -rw-r--r-- | parse-events.h | 2 | ||||
| -rw-r--r-- | plugin_hrtimer.c | 4 | ||||
| -rw-r--r-- | plugin_mac80211.c | 4 | ||||
| -rw-r--r-- | trace-ftrace.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/parse-events.c b/parse-events.c index 7fdd64b..001578e 100644 --- a/parse-events.c +++ b/parse-events.c | |||
| @@ -3276,7 +3276,7 @@ void pevent_print_event(struct trace_seq *s, | |||
| 3276 | trace_seq_printf(s, " %5lu.%06lu: %s: ", secs, usecs, event->name); | 3276 | trace_seq_printf(s, " %5lu.%06lu: %s: ", secs, usecs, event->name); |
| 3277 | 3277 | ||
| 3278 | if (event->handler) | 3278 | if (event->handler) |
| 3279 | event->handler(s, data, size, event); | 3279 | event->handler(s, data, size, event, cpu); |
| 3280 | else | 3280 | else |
| 3281 | pretty_print(s, data, size, event); | 3281 | pretty_print(s, data, size, event); |
| 3282 | } | 3282 | } |
diff --git a/parse-events.h b/parse-events.h index 138f140..ef66895 100644 --- a/parse-events.h +++ b/parse-events.h | |||
| @@ -51,7 +51,7 @@ struct event; | |||
| 51 | 51 | ||
| 52 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, | 52 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, |
| 53 | void *data, int size, | 53 | void *data, int size, |
| 54 | struct event *event); | 54 | struct event *event, int cpu); |
| 55 | 55 | ||
| 56 | typedef int (*pevent_plugin_load_func)(void); | 56 | typedef int (*pevent_plugin_load_func)(void); |
| 57 | 57 | ||
diff --git a/plugin_hrtimer.c b/plugin_hrtimer.c index 2a074e7..0d3b589 100644 --- a/plugin_hrtimer.c +++ b/plugin_hrtimer.c | |||
| @@ -31,7 +31,7 @@ static void print_field(struct trace_seq *s, const char *fmt, | |||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static int timer_expire_handler(struct trace_seq *s, void *data, int size, | 33 | static int timer_expire_handler(struct trace_seq *s, void *data, int size, |
| 34 | struct event *event) | 34 | struct event *event, int cpu) |
| 35 | { | 35 | { |
| 36 | trace_seq_printf(s, "hrtimer="); | 36 | trace_seq_printf(s, "hrtimer="); |
| 37 | 37 | ||
| @@ -46,7 +46,7 @@ static int timer_expire_handler(struct trace_seq *s, void *data, int size, | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | static int timer_start_handler(struct trace_seq *s, void *data, int size, | 48 | static int timer_start_handler(struct trace_seq *s, void *data, int size, |
| 49 | struct event *event) | 49 | struct event *event, int cpu) |
| 50 | { | 50 | { |
| 51 | struct format_field *fn = pevent_find_field(event, "function"); | 51 | struct format_field *fn = pevent_find_field(event, "function"); |
| 52 | 52 | ||
diff --git a/plugin_mac80211.c b/plugin_mac80211.c index 791bd63..5d91b17 100644 --- a/plugin_mac80211.c +++ b/plugin_mac80211.c | |||
| @@ -146,7 +146,7 @@ static void _print_flag(struct trace_seq *s, struct event *event, | |||
| 146 | #define SP() trace_seq_putc(s, ' ') | 146 | #define SP() trace_seq_putc(s, ' ') |
| 147 | 147 | ||
| 148 | static int drv_bss_info_changed(struct trace_seq *s, void *data, int size, | 148 | static int drv_bss_info_changed(struct trace_seq *s, void *data, int size, |
| 149 | struct event *event) | 149 | struct event *event, int cpu) |
| 150 | { | 150 | { |
| 151 | print_string(s, event, "wiphy_name", data); | 151 | print_string(s, event, "wiphy_name", data); |
| 152 | trace_seq_printf(s, " vif:"); | 152 | trace_seq_printf(s, " vif:"); |
| @@ -172,7 +172,7 @@ static int drv_bss_info_changed(struct trace_seq *s, void *data, int size, | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static int drv_config(struct trace_seq *s, void *data, | 174 | static int drv_config(struct trace_seq *s, void *data, |
| 175 | int size, struct event *event) | 175 | int size, struct event *event, int cpu) |
| 176 | { | 176 | { |
| 177 | print_string(s, event, "wiphy_name", data); | 177 | print_string(s, event, "wiphy_name", data); |
| 178 | trace_seq_putc(s, ' '); | 178 | trace_seq_putc(s, ' '); |
diff --git a/trace-ftrace.c b/trace-ftrace.c index 3174f89..074ff22 100644 --- a/trace-ftrace.c +++ b/trace-ftrace.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include "parse-events.h" | 5 | #include "parse-events.h" |
| 6 | 6 | ||
| 7 | static int function_handler(struct trace_seq *s, void *data, int size, | 7 | static int function_handler(struct trace_seq *s, void *data, int size, |
| 8 | struct event *event) | 8 | struct event *event, int cpu) |
| 9 | { | 9 | { |
| 10 | struct format_field *ip = pevent_find_field(event, "ip"); | 10 | struct format_field *ip = pevent_find_field(event, "ip"); |
| 11 | struct format_field *pip = pevent_find_field(event, "parent_ip"); | 11 | struct format_field *pip = pevent_find_field(event, "parent_ip"); |
