diff options
-rw-r--r-- | parse-events.c | 12 | ||||
-rw-r--r-- | parse-events.h | 6 | ||||
-rw-r--r-- | plugin_hrtimer.c | 4 | ||||
-rw-r--r-- | plugin_mac80211.c | 4 | ||||
-rw-r--r-- | plugin_sched_switch.c | 4 | ||||
-rw-r--r-- | trace-ftrace.c | 9 | ||||
-rw-r--r-- | trace-read.c | 2 |
7 files changed, 21 insertions, 20 deletions
diff --git a/parse-events.c b/parse-events.c index d53184b..24ecb85 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -3216,10 +3216,10 @@ const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid) | |||
3216 | * writes the print format into the trace_seq. | 3216 | * writes the print format into the trace_seq. |
3217 | */ | 3217 | */ |
3218 | void pevent_event_info(struct trace_seq *s, struct event_format *event, | 3218 | void pevent_event_info(struct trace_seq *s, struct event_format *event, |
3219 | int cpu, struct record *record) | 3219 | struct record *record) |
3220 | { | 3220 | { |
3221 | if (event->handler) | 3221 | if (event->handler) |
3222 | event->handler(s, record, event, cpu); | 3222 | event->handler(s, record, event); |
3223 | else | 3223 | else |
3224 | pretty_print(s, record->data, record->size, event); | 3224 | pretty_print(s, record->data, record->size, event); |
3225 | 3225 | ||
@@ -3227,7 +3227,7 @@ void pevent_event_info(struct trace_seq *s, struct event_format *event, | |||
3227 | } | 3227 | } |
3228 | 3228 | ||
3229 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | 3229 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, |
3230 | int cpu, struct record *record) | 3230 | struct record *record) |
3231 | { | 3231 | { |
3232 | static char *spaces = " "; /* 20 spaces */ | 3232 | static char *spaces = " "; /* 20 spaces */ |
3233 | struct event_format *event; | 3233 | struct event_format *event; |
@@ -3257,10 +3257,10 @@ void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | |||
3257 | 3257 | ||
3258 | if (pevent->latency_format) { | 3258 | if (pevent->latency_format) { |
3259 | trace_seq_printf(s, "%8.8s-%-5d %3d", | 3259 | trace_seq_printf(s, "%8.8s-%-5d %3d", |
3260 | comm, pid, cpu); | 3260 | comm, pid, record->cpu); |
3261 | pevent_data_lat_fmt(pevent, s, record); | 3261 | pevent_data_lat_fmt(pevent, s, record); |
3262 | } else | 3262 | } else |
3263 | trace_seq_printf(s, "%16s-%-5d [%03d]", comm, pid, cpu); | 3263 | trace_seq_printf(s, "%16s-%-5d [%03d]", comm, pid, record->cpu); |
3264 | 3264 | ||
3265 | trace_seq_printf(s, " %5lu.%06lu: %s: ", secs, usecs, event->name); | 3265 | trace_seq_printf(s, " %5lu.%06lu: %s: ", secs, usecs, event->name); |
3266 | 3266 | ||
@@ -3270,7 +3270,7 @@ void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | |||
3270 | trace_seq_printf(s, "%.*s", 20 - len, spaces); | 3270 | trace_seq_printf(s, "%.*s", 20 - len, spaces); |
3271 | 3271 | ||
3272 | if (event->handler) | 3272 | if (event->handler) |
3273 | event->handler(s, record, event, cpu); | 3273 | event->handler(s, record, event); |
3274 | else | 3274 | else |
3275 | pretty_print(s, data, size, event); | 3275 | pretty_print(s, data, size, event); |
3276 | 3276 | ||
diff --git a/parse-events.h b/parse-events.h index b4135a4..00bdc44 100644 --- a/parse-events.h +++ b/parse-events.h | |||
@@ -63,7 +63,7 @@ struct event_format; | |||
63 | 63 | ||
64 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, | 64 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, |
65 | struct record *record, | 65 | struct record *record, |
66 | struct event_format *event, int cpu); | 66 | struct event_format *event); |
67 | 67 | ||
68 | typedef int (*pevent_plugin_load_func)(struct pevent *pevent); | 68 | typedef int (*pevent_plugin_load_func)(struct pevent *pevent); |
69 | 69 | ||
@@ -350,7 +350,7 @@ int pevent_register_print_string(struct pevent *pevent, char *fmt, | |||
350 | int pevent_pid_is_registered(struct pevent *pevent, int pid); | 350 | int pevent_pid_is_registered(struct pevent *pevent, int pid); |
351 | 351 | ||
352 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | 352 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, |
353 | int cpu, struct record *record); | 353 | struct record *record); |
354 | 354 | ||
355 | int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size); | 355 | int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size); |
356 | 356 | ||
@@ -380,7 +380,7 @@ struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type | |||
380 | int pevent_data_pid(struct pevent *pevent, struct record *rec); | 380 | int pevent_data_pid(struct pevent *pevent, struct record *rec); |
381 | const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid); | 381 | const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid); |
382 | void pevent_event_info(struct trace_seq *s, struct event_format *event, | 382 | void pevent_event_info(struct trace_seq *s, struct event_format *event, |
383 | int cpu, struct record *record); | 383 | struct record *record); |
384 | 384 | ||
385 | struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type); | 385 | struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type); |
386 | 386 | ||
diff --git a/plugin_hrtimer.c b/plugin_hrtimer.c index 2833f1b..afc5afe 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, struct record *record, | 33 | static int timer_expire_handler(struct trace_seq *s, struct record *record, |
34 | struct event_format *event, int cpu) | 34 | struct event_format *event) |
35 | { | 35 | { |
36 | void *data = record->data; | 36 | void *data = record->data; |
37 | 37 | ||
@@ -48,7 +48,7 @@ static int timer_expire_handler(struct trace_seq *s, struct record *record, | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static int timer_start_handler(struct trace_seq *s, struct record *record, | 50 | static int timer_start_handler(struct trace_seq *s, struct record *record, |
51 | struct event_format *event, int cpu) | 51 | struct event_format *event) |
52 | { | 52 | { |
53 | struct pevent *pevent = event->pevent; | 53 | struct pevent *pevent = event->pevent; |
54 | struct format_field *fn = pevent_find_field(event, "function"); | 54 | struct format_field *fn = pevent_find_field(event, "function"); |
diff --git a/plugin_mac80211.c b/plugin_mac80211.c index dd76d7c..497d564 100644 --- a/plugin_mac80211.c +++ b/plugin_mac80211.c | |||
@@ -146,7 +146,7 @@ static void _print_flag(struct trace_seq *s, struct event_format *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, struct record *record, | 148 | static int drv_bss_info_changed(struct trace_seq *s, struct record *record, |
149 | struct event_format *event, int cpu) | 149 | struct event_format *event) |
150 | { | 150 | { |
151 | void *data = record->data; | 151 | void *data = record->data; |
152 | 152 | ||
@@ -174,7 +174,7 @@ static int drv_bss_info_changed(struct trace_seq *s, struct record *record, | |||
174 | } | 174 | } |
175 | 175 | ||
176 | static int drv_config(struct trace_seq *s, struct record *record, | 176 | static int drv_config(struct trace_seq *s, struct record *record, |
177 | struct event_format *event, int cpu) | 177 | struct event_format *event) |
178 | { | 178 | { |
179 | void *data = record->data; | 179 | void *data = record->data; |
180 | 180 | ||
diff --git a/plugin_sched_switch.c b/plugin_sched_switch.c index 3cec83c..0f3b857 100644 --- a/plugin_sched_switch.c +++ b/plugin_sched_switch.c | |||
@@ -48,7 +48,7 @@ static void write_state(struct trace_seq *s, int val) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static int sched_wakeup_handler(struct trace_seq *s, struct record *record, | 50 | static int sched_wakeup_handler(struct trace_seq *s, struct record *record, |
51 | struct event_format *event, int cpu) | 51 | struct event_format *event) |
52 | { | 52 | { |
53 | struct format_field *field; | 53 | struct format_field *field; |
54 | unsigned long long val; | 54 | unsigned long long val; |
@@ -103,7 +103,7 @@ static int sched_wakeup_handler(struct trace_seq *s, struct record *record, | |||
103 | } | 103 | } |
104 | 104 | ||
105 | static int sched_switch_handler(struct trace_seq *s, struct record *record, | 105 | static int sched_switch_handler(struct trace_seq *s, struct record *record, |
106 | struct event_format *event, int cpu) | 106 | struct event_format *event) |
107 | { | 107 | { |
108 | struct format_field *field; | 108 | struct format_field *field; |
109 | unsigned long long val; | 109 | unsigned long long val; |
diff --git a/trace-ftrace.c b/trace-ftrace.c index 6b4ab8e..0920430 100644 --- a/trace-ftrace.c +++ b/trace-ftrace.c | |||
@@ -29,7 +29,7 @@ static int get_field_val(struct trace_seq *s, void *data, | |||
29 | } | 29 | } |
30 | 30 | ||
31 | static int function_handler(struct trace_seq *s, struct record *record, | 31 | static int function_handler(struct trace_seq *s, struct record *record, |
32 | struct event_format *event, int cpu) | 32 | struct event_format *event) |
33 | { | 33 | { |
34 | struct pevent *pevent = event->pevent; | 34 | struct pevent *pevent = event->pevent; |
35 | unsigned long long function; | 35 | unsigned long long function; |
@@ -221,13 +221,14 @@ static int print_graph_nested(struct trace_seq *s, | |||
221 | 221 | ||
222 | static int | 222 | static int |
223 | fgraph_ent_handler(struct trace_seq *s, struct record *record, | 223 | fgraph_ent_handler(struct trace_seq *s, struct record *record, |
224 | struct event_format *event, int cpu) | 224 | struct event_format *event) |
225 | { | 225 | { |
226 | struct record *rec; | 226 | struct record *rec; |
227 | void *copy_data; | 227 | void *copy_data; |
228 | unsigned long long val, pid; | 228 | unsigned long long val, pid; |
229 | void *data = record->data; | 229 | void *data = record->data; |
230 | int size = record->size; | 230 | int size = record->size; |
231 | int cpu = record->cpu; | ||
231 | int ret; | 232 | int ret; |
232 | 233 | ||
233 | if (get_field_val(s, data, event, "common_pid", &pid)) | 234 | if (get_field_val(s, data, event, "common_pid", &pid)) |
@@ -260,7 +261,7 @@ fgraph_ent_handler(struct trace_seq *s, struct record *record, | |||
260 | 261 | ||
261 | static int | 262 | static int |
262 | fgraph_ret_handler(struct trace_seq *s, struct record *record, | 263 | fgraph_ret_handler(struct trace_seq *s, struct record *record, |
263 | struct event_format *event, int cpu) | 264 | struct event_format *event) |
264 | { | 265 | { |
265 | unsigned long long rettime, calltime; | 266 | unsigned long long rettime, calltime; |
266 | unsigned long long duration, depth; | 267 | unsigned long long duration, depth; |
@@ -293,7 +294,7 @@ fgraph_ret_handler(struct trace_seq *s, struct record *record, | |||
293 | 294 | ||
294 | static int | 295 | static int |
295 | trace_stack_handler(struct trace_seq *s, struct record *record, | 296 | trace_stack_handler(struct trace_seq *s, struct record *record, |
296 | struct event_format *event, int cpu) | 297 | struct event_format *event) |
297 | { | 298 | { |
298 | struct format_field *field; | 299 | struct format_field *field; |
299 | unsigned long long addr; | 300 | unsigned long long addr; |
diff --git a/trace-read.c b/trace-read.c index 48bec1d..a7cac1e 100644 --- a/trace-read.c +++ b/trace-read.c | |||
@@ -202,7 +202,7 @@ static void show_data(struct tracecmd_input *handle, int cpu) | |||
202 | test_save(record, cpu); | 202 | test_save(record, cpu); |
203 | 203 | ||
204 | trace_seq_init(&s); | 204 | trace_seq_init(&s); |
205 | pevent_print_event(pevent, &s, cpu, record); | 205 | pevent_print_event(pevent, &s, record); |
206 | trace_seq_do_printf(&s); | 206 | trace_seq_do_printf(&s); |
207 | printf("\n"); | 207 | printf("\n"); |
208 | 208 | ||