diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 14:02:47 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 14:21:13 -0400 |
commit | cbc49b25b9cf26bf8c91169085be27382d945dd7 (patch) | |
tree | 9c3b781a91da01c04e3e196f4ea3e077005336bd /tools/lib | |
parent | 096177a8b51937ba3004164f0366ef20656bb17a (diff) |
tools lib traceevent, perf tools: Rename 'struct pevent_record' to 'struct tep_record'
In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_" and not "pevent_". This changes
the 'struct pevent_record' to 'struct tep_record'.
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180808180659.866021298@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 36 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 44 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 24 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_function.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_hrtimer.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kmem.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kvm.c | 14 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_mac80211.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_sched_switch.c | 6 |
9 files changed, 67 insertions, 67 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 1eec313cc447..90f30f9dde14 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -5150,7 +5150,7 @@ out_failed: | |||
5150 | * and lock depth) and places it into the trace_seq. | 5150 | * and lock depth) and places it into the trace_seq. |
5151 | */ | 5151 | */ |
5152 | void pevent_data_lat_fmt(struct tep_handle *pevent, | 5152 | void pevent_data_lat_fmt(struct tep_handle *pevent, |
5153 | struct trace_seq *s, struct pevent_record *record) | 5153 | struct trace_seq *s, struct tep_record *record) |
5154 | { | 5154 | { |
5155 | static int check_lock_depth = 1; | 5155 | static int check_lock_depth = 1; |
5156 | static int check_migrate_disable = 1; | 5156 | static int check_migrate_disable = 1; |
@@ -5229,7 +5229,7 @@ void pevent_data_lat_fmt(struct tep_handle *pevent, | |||
5229 | * | 5229 | * |
5230 | * This returns the event id from the @rec. | 5230 | * This returns the event id from the @rec. |
5231 | */ | 5231 | */ |
5232 | int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec) | 5232 | int pevent_data_type(struct tep_handle *pevent, struct tep_record *rec) |
5233 | { | 5233 | { |
5234 | return trace_parse_common_type(pevent, rec->data); | 5234 | return trace_parse_common_type(pevent, rec->data); |
5235 | } | 5235 | } |
@@ -5253,7 +5253,7 @@ struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int | |||
5253 | * | 5253 | * |
5254 | * This returns the PID from a record. | 5254 | * This returns the PID from a record. |
5255 | */ | 5255 | */ |
5256 | int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec) | 5256 | int pevent_data_pid(struct tep_handle *pevent, struct tep_record *rec) |
5257 | { | 5257 | { |
5258 | return parse_common_pid(pevent, rec->data); | 5258 | return parse_common_pid(pevent, rec->data); |
5259 | } | 5259 | } |
@@ -5265,7 +5265,7 @@ int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec) | |||
5265 | * | 5265 | * |
5266 | * This returns the preempt count from a record. | 5266 | * This returns the preempt count from a record. |
5267 | */ | 5267 | */ |
5268 | int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec) | 5268 | int pevent_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec) |
5269 | { | 5269 | { |
5270 | return parse_common_pc(pevent, rec->data); | 5270 | return parse_common_pc(pevent, rec->data); |
5271 | } | 5271 | } |
@@ -5279,7 +5279,7 @@ int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *r | |||
5279 | * | 5279 | * |
5280 | * Use trace_flag_type enum for the flags (see event-parse.h). | 5280 | * Use trace_flag_type enum for the flags (see event-parse.h). |
5281 | */ | 5281 | */ |
5282 | int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec) | 5282 | int pevent_data_flags(struct tep_handle *pevent, struct tep_record *rec) |
5283 | { | 5283 | { |
5284 | return parse_common_flags(pevent, rec->data); | 5284 | return parse_common_flags(pevent, rec->data); |
5285 | } | 5285 | } |
@@ -5400,7 +5400,7 @@ int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline) | |||
5400 | * writes the print format into the trace_seq. | 5400 | * writes the print format into the trace_seq. |
5401 | */ | 5401 | */ |
5402 | void pevent_event_info(struct trace_seq *s, struct event_format *event, | 5402 | void pevent_event_info(struct trace_seq *s, struct event_format *event, |
5403 | struct pevent_record *record) | 5403 | struct tep_record *record) |
5404 | { | 5404 | { |
5405 | int print_pretty = 1; | 5405 | int print_pretty = 1; |
5406 | 5406 | ||
@@ -5441,7 +5441,7 @@ static bool is_timestamp_in_us(char *trace_clock, bool use_trace_clock) | |||
5441 | * is found. | 5441 | * is found. |
5442 | */ | 5442 | */ |
5443 | struct event_format * | 5443 | struct event_format * |
5444 | pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *record) | 5444 | pevent_find_event_by_record(struct tep_handle *pevent, struct tep_record *record) |
5445 | { | 5445 | { |
5446 | int type; | 5446 | int type; |
5447 | 5447 | ||
@@ -5466,7 +5466,7 @@ pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *rec | |||
5466 | */ | 5466 | */ |
5467 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | 5467 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
5468 | struct event_format *event, | 5468 | struct event_format *event, |
5469 | struct pevent_record *record) | 5469 | struct tep_record *record) |
5470 | { | 5470 | { |
5471 | void *data = record->data; | 5471 | void *data = record->data; |
5472 | const char *comm; | 5472 | const char *comm; |
@@ -5494,7 +5494,7 @@ void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | |||
5494 | */ | 5494 | */ |
5495 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | 5495 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
5496 | struct event_format *event, | 5496 | struct event_format *event, |
5497 | struct pevent_record *record, | 5497 | struct tep_record *record, |
5498 | bool use_trace_clock) | 5498 | bool use_trace_clock) |
5499 | { | 5499 | { |
5500 | unsigned long secs; | 5500 | unsigned long secs; |
@@ -5544,7 +5544,7 @@ void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | |||
5544 | */ | 5544 | */ |
5545 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | 5545 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
5546 | struct event_format *event, | 5546 | struct event_format *event, |
5547 | struct pevent_record *record) | 5547 | struct tep_record *record) |
5548 | { | 5548 | { |
5549 | static const char *spaces = " "; /* 20 spaces */ | 5549 | static const char *spaces = " "; /* 20 spaces */ |
5550 | int len; | 5550 | int len; |
@@ -5560,7 +5560,7 @@ void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | |||
5560 | } | 5560 | } |
5561 | 5561 | ||
5562 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, | 5562 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, |
5563 | struct pevent_record *record, bool use_trace_clock) | 5563 | struct tep_record *record, bool use_trace_clock) |
5564 | { | 5564 | { |
5565 | struct event_format *event; | 5565 | struct event_format *event; |
5566 | 5566 | ||
@@ -6244,7 +6244,7 @@ int pevent_strerror(struct tep_handle *pevent __maybe_unused, | |||
6244 | } | 6244 | } |
6245 | 6245 | ||
6246 | int get_field_val(struct trace_seq *s, struct format_field *field, | 6246 | int get_field_val(struct trace_seq *s, struct format_field *field, |
6247 | const char *name, struct pevent_record *record, | 6247 | const char *name, struct tep_record *record, |
6248 | unsigned long long *val, int err) | 6248 | unsigned long long *val, int err) |
6249 | { | 6249 | { |
6250 | if (!field) { | 6250 | if (!field) { |
@@ -6277,7 +6277,7 @@ int get_field_val(struct trace_seq *s, struct format_field *field, | |||
6277 | * On failure, it returns NULL. | 6277 | * On failure, it returns NULL. |
6278 | */ | 6278 | */ |
6279 | void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, | 6279 | void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, |
6280 | const char *name, struct pevent_record *record, | 6280 | const char *name, struct tep_record *record, |
6281 | int *len, int err) | 6281 | int *len, int err) |
6282 | { | 6282 | { |
6283 | struct format_field *field; | 6283 | struct format_field *field; |
@@ -6324,7 +6324,7 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, | |||
6324 | * Returns 0 on success -1 on field not found. | 6324 | * Returns 0 on success -1 on field not found. |
6325 | */ | 6325 | */ |
6326 | int pevent_get_field_val(struct trace_seq *s, struct event_format *event, | 6326 | int pevent_get_field_val(struct trace_seq *s, struct event_format *event, |
6327 | const char *name, struct pevent_record *record, | 6327 | const char *name, struct tep_record *record, |
6328 | unsigned long long *val, int err) | 6328 | unsigned long long *val, int err) |
6329 | { | 6329 | { |
6330 | struct format_field *field; | 6330 | struct format_field *field; |
@@ -6349,7 +6349,7 @@ int pevent_get_field_val(struct trace_seq *s, struct event_format *event, | |||
6349 | * Returns 0 on success -1 on field not found. | 6349 | * Returns 0 on success -1 on field not found. |
6350 | */ | 6350 | */ |
6351 | int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, | 6351 | int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, |
6352 | const char *name, struct pevent_record *record, | 6352 | const char *name, struct tep_record *record, |
6353 | unsigned long long *val, int err) | 6353 | unsigned long long *val, int err) |
6354 | { | 6354 | { |
6355 | struct format_field *field; | 6355 | struct format_field *field; |
@@ -6374,7 +6374,7 @@ int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, | |||
6374 | * Returns 0 on success -1 on field not found. | 6374 | * Returns 0 on success -1 on field not found. |
6375 | */ | 6375 | */ |
6376 | int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, | 6376 | int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, |
6377 | const char *name, struct pevent_record *record, | 6377 | const char *name, struct tep_record *record, |
6378 | unsigned long long *val, int err) | 6378 | unsigned long long *val, int err) |
6379 | { | 6379 | { |
6380 | struct format_field *field; | 6380 | struct format_field *field; |
@@ -6400,7 +6400,7 @@ int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, | |||
6400 | */ | 6400 | */ |
6401 | int pevent_print_num_field(struct trace_seq *s, const char *fmt, | 6401 | int pevent_print_num_field(struct trace_seq *s, const char *fmt, |
6402 | struct event_format *event, const char *name, | 6402 | struct event_format *event, const char *name, |
6403 | struct pevent_record *record, int err) | 6403 | struct tep_record *record, int err) |
6404 | { | 6404 | { |
6405 | struct format_field *field = pevent_find_field(event, name); | 6405 | struct format_field *field = pevent_find_field(event, name); |
6406 | unsigned long long val; | 6406 | unsigned long long val; |
@@ -6432,7 +6432,7 @@ int pevent_print_num_field(struct trace_seq *s, const char *fmt, | |||
6432 | */ | 6432 | */ |
6433 | int pevent_print_func_field(struct trace_seq *s, const char *fmt, | 6433 | int pevent_print_func_field(struct trace_seq *s, const char *fmt, |
6434 | struct event_format *event, const char *name, | 6434 | struct event_format *event, const char *name, |
6435 | struct pevent_record *record, int err) | 6435 | struct tep_record *record, int err) |
6436 | { | 6436 | { |
6437 | struct format_field *field = pevent_find_field(event, name); | 6437 | struct format_field *field = pevent_find_field(event, name); |
6438 | struct tep_handle *pevent = event->pevent; | 6438 | struct tep_handle *pevent = event->pevent; |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index b7f4c8393abd..b1e4d37bedd8 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define DEBUG_RECORD 0 | 41 | #define DEBUG_RECORD 0 |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | struct pevent_record { | 44 | struct tep_record { |
45 | unsigned long long ts; | 45 | unsigned long long ts; |
46 | unsigned long long offset; | 46 | unsigned long long offset; |
47 | long long missed_events; /* buffer dropped events before */ | 47 | long long missed_events; /* buffer dropped events before */ |
@@ -53,8 +53,8 @@ struct pevent_record { | |||
53 | int locked; /* Do not free, even if ref_count is zero */ | 53 | int locked; /* Do not free, even if ref_count is zero */ |
54 | void *priv; | 54 | void *priv; |
55 | #if DEBUG_RECORD | 55 | #if DEBUG_RECORD |
56 | struct pevent_record *prev; | 56 | struct tep_record *prev; |
57 | struct pevent_record *next; | 57 | struct tep_record *next; |
58 | long alloc_addr; | 58 | long alloc_addr; |
59 | #endif | 59 | #endif |
60 | }; | 60 | }; |
@@ -102,7 +102,7 @@ struct tep_handle; | |||
102 | struct event_format; | 102 | struct event_format; |
103 | 103 | ||
104 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, | 104 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, |
105 | struct pevent_record *record, | 105 | struct tep_record *record, |
106 | struct event_format *event, | 106 | struct event_format *event, |
107 | void *context); | 107 | void *context); |
108 | 108 | ||
@@ -628,16 +628,16 @@ int pevent_pid_is_registered(struct tep_handle *pevent, int pid); | |||
628 | 628 | ||
629 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | 629 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
630 | struct event_format *event, | 630 | struct event_format *event, |
631 | struct pevent_record *record); | 631 | struct tep_record *record); |
632 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | 632 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
633 | struct event_format *event, | 633 | struct event_format *event, |
634 | struct pevent_record *record, | 634 | struct tep_record *record, |
635 | bool use_trace_clock); | 635 | bool use_trace_clock); |
636 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | 636 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
637 | struct event_format *event, | 637 | struct event_format *event, |
638 | struct pevent_record *record); | 638 | struct tep_record *record); |
639 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, | 639 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, |
640 | struct pevent_record *record, bool use_trace_clock); | 640 | struct tep_record *record, bool use_trace_clock); |
641 | 641 | ||
642 | int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, | 642 | int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, |
643 | int long_size); | 643 | int long_size); |
@@ -652,26 +652,26 @@ void pevent_free_format(struct event_format *event); | |||
652 | void pevent_free_format_field(struct format_field *field); | 652 | void pevent_free_format_field(struct format_field *field); |
653 | 653 | ||
654 | void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, | 654 | void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, |
655 | const char *name, struct pevent_record *record, | 655 | const char *name, struct tep_record *record, |
656 | int *len, int err); | 656 | int *len, int err); |
657 | 657 | ||
658 | int pevent_get_field_val(struct trace_seq *s, struct event_format *event, | 658 | int pevent_get_field_val(struct trace_seq *s, struct event_format *event, |
659 | const char *name, struct pevent_record *record, | 659 | const char *name, struct tep_record *record, |
660 | unsigned long long *val, int err); | 660 | unsigned long long *val, int err); |
661 | int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, | 661 | int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, |
662 | const char *name, struct pevent_record *record, | 662 | const char *name, struct tep_record *record, |
663 | unsigned long long *val, int err); | 663 | unsigned long long *val, int err); |
664 | int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, | 664 | int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, |
665 | const char *name, struct pevent_record *record, | 665 | const char *name, struct tep_record *record, |
666 | unsigned long long *val, int err); | 666 | unsigned long long *val, int err); |
667 | 667 | ||
668 | int pevent_print_num_field(struct trace_seq *s, const char *fmt, | 668 | int pevent_print_num_field(struct trace_seq *s, const char *fmt, |
669 | struct event_format *event, const char *name, | 669 | struct event_format *event, const char *name, |
670 | struct pevent_record *record, int err); | 670 | struct tep_record *record, int err); |
671 | 671 | ||
672 | int pevent_print_func_field(struct trace_seq *s, const char *fmt, | 672 | int pevent_print_func_field(struct trace_seq *s, const char *fmt, |
673 | struct event_format *event, const char *name, | 673 | struct event_format *event, const char *name, |
674 | struct pevent_record *record, int err); | 674 | struct tep_record *record, int err); |
675 | 675 | ||
676 | int pevent_register_event_handler(struct tep_handle *pevent, int id, | 676 | int pevent_register_event_handler(struct tep_handle *pevent, int id, |
677 | const char *sys_name, const char *event_name, | 677 | const char *sys_name, const char *event_name, |
@@ -703,15 +703,15 @@ struct event_format * | |||
703 | pevent_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); | 703 | pevent_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); |
704 | 704 | ||
705 | struct event_format * | 705 | struct event_format * |
706 | pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *record); | 706 | pevent_find_event_by_record(struct tep_handle *pevent, struct tep_record *record); |
707 | 707 | ||
708 | void pevent_data_lat_fmt(struct tep_handle *pevent, | 708 | void pevent_data_lat_fmt(struct tep_handle *pevent, |
709 | struct trace_seq *s, struct pevent_record *record); | 709 | struct trace_seq *s, struct tep_record *record); |
710 | int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec); | 710 | int pevent_data_type(struct tep_handle *pevent, struct tep_record *rec); |
711 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type); | 711 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type); |
712 | int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec); | 712 | int pevent_data_pid(struct tep_handle *pevent, struct tep_record *rec); |
713 | int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec); | 713 | int pevent_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec); |
714 | int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec); | 714 | int pevent_data_flags(struct tep_handle *pevent, struct tep_record *rec); |
715 | const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid); | 715 | const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid); |
716 | struct cmdline; | 716 | struct cmdline; |
717 | struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm, | 717 | struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm, |
@@ -723,7 +723,7 @@ void pevent_print_field(struct trace_seq *s, void *data, | |||
723 | void pevent_print_fields(struct trace_seq *s, void *data, | 723 | void pevent_print_fields(struct trace_seq *s, void *data, |
724 | int size __maybe_unused, struct event_format *event); | 724 | int size __maybe_unused, struct event_format *event); |
725 | void pevent_event_info(struct trace_seq *s, struct event_format *event, | 725 | void pevent_event_info(struct trace_seq *s, struct event_format *event, |
726 | struct pevent_record *record); | 726 | struct tep_record *record); |
727 | int pevent_strerror(struct tep_handle *pevent, enum pevent_errno errnum, | 727 | int pevent_strerror(struct tep_handle *pevent, enum pevent_errno errnum, |
728 | char *buf, size_t buflen); | 728 | char *buf, size_t buflen); |
729 | 729 | ||
@@ -957,7 +957,7 @@ enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter, | |||
957 | const char *filter_str); | 957 | const char *filter_str); |
958 | 958 | ||
959 | enum pevent_errno pevent_filter_match(struct event_filter *filter, | 959 | enum pevent_errno pevent_filter_match(struct event_filter *filter, |
960 | struct pevent_record *record); | 960 | struct tep_record *record); |
961 | 961 | ||
962 | int pevent_filter_strerror(struct event_filter *filter, enum pevent_errno err, | 962 | int pevent_filter_strerror(struct event_filter *filter, enum pevent_errno err, |
963 | char *buf, size_t buflen); | 963 | char *buf, size_t buflen); |
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index a97b84aece3a..784ccac90999 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -1697,10 +1697,10 @@ int pevent_filter_event_has_trivial(struct event_filter *filter, | |||
1697 | } | 1697 | } |
1698 | 1698 | ||
1699 | static int test_filter(struct event_format *event, struct filter_arg *arg, | 1699 | static int test_filter(struct event_format *event, struct filter_arg *arg, |
1700 | struct pevent_record *record, enum pevent_errno *err); | 1700 | struct tep_record *record, enum pevent_errno *err); |
1701 | 1701 | ||
1702 | static const char * | 1702 | static const char * |
1703 | get_comm(struct event_format *event, struct pevent_record *record) | 1703 | get_comm(struct event_format *event, struct tep_record *record) |
1704 | { | 1704 | { |
1705 | const char *comm; | 1705 | const char *comm; |
1706 | int pid; | 1706 | int pid; |
@@ -1712,7 +1712,7 @@ get_comm(struct event_format *event, struct pevent_record *record) | |||
1712 | 1712 | ||
1713 | static unsigned long long | 1713 | static unsigned long long |
1714 | get_value(struct event_format *event, | 1714 | get_value(struct event_format *event, |
1715 | struct format_field *field, struct pevent_record *record) | 1715 | struct format_field *field, struct tep_record *record) |
1716 | { | 1716 | { |
1717 | unsigned long long val; | 1717 | unsigned long long val; |
1718 | 1718 | ||
@@ -1748,11 +1748,11 @@ get_value(struct event_format *event, | |||
1748 | 1748 | ||
1749 | static unsigned long long | 1749 | static unsigned long long |
1750 | get_arg_value(struct event_format *event, struct filter_arg *arg, | 1750 | get_arg_value(struct event_format *event, struct filter_arg *arg, |
1751 | struct pevent_record *record, enum pevent_errno *err); | 1751 | struct tep_record *record, enum pevent_errno *err); |
1752 | 1752 | ||
1753 | static unsigned long long | 1753 | static unsigned long long |
1754 | get_exp_value(struct event_format *event, struct filter_arg *arg, | 1754 | get_exp_value(struct event_format *event, struct filter_arg *arg, |
1755 | struct pevent_record *record, enum pevent_errno *err) | 1755 | struct tep_record *record, enum pevent_errno *err) |
1756 | { | 1756 | { |
1757 | unsigned long long lval, rval; | 1757 | unsigned long long lval, rval; |
1758 | 1758 | ||
@@ -1807,7 +1807,7 @@ get_exp_value(struct event_format *event, struct filter_arg *arg, | |||
1807 | 1807 | ||
1808 | static unsigned long long | 1808 | static unsigned long long |
1809 | get_arg_value(struct event_format *event, struct filter_arg *arg, | 1809 | get_arg_value(struct event_format *event, struct filter_arg *arg, |
1810 | struct pevent_record *record, enum pevent_errno *err) | 1810 | struct tep_record *record, enum pevent_errno *err) |
1811 | { | 1811 | { |
1812 | switch (arg->type) { | 1812 | switch (arg->type) { |
1813 | case FILTER_ARG_FIELD: | 1813 | case FILTER_ARG_FIELD: |
@@ -1831,7 +1831,7 @@ get_arg_value(struct event_format *event, struct filter_arg *arg, | |||
1831 | } | 1831 | } |
1832 | 1832 | ||
1833 | static int test_num(struct event_format *event, struct filter_arg *arg, | 1833 | static int test_num(struct event_format *event, struct filter_arg *arg, |
1834 | struct pevent_record *record, enum pevent_errno *err) | 1834 | struct tep_record *record, enum pevent_errno *err) |
1835 | { | 1835 | { |
1836 | unsigned long long lval, rval; | 1836 | unsigned long long lval, rval; |
1837 | 1837 | ||
@@ -1871,7 +1871,7 @@ static int test_num(struct event_format *event, struct filter_arg *arg, | |||
1871 | } | 1871 | } |
1872 | } | 1872 | } |
1873 | 1873 | ||
1874 | static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record) | 1874 | static const char *get_field_str(struct filter_arg *arg, struct tep_record *record) |
1875 | { | 1875 | { |
1876 | struct event_format *event; | 1876 | struct event_format *event; |
1877 | struct tep_handle *pevent; | 1877 | struct tep_handle *pevent; |
@@ -1922,7 +1922,7 @@ static const char *get_field_str(struct filter_arg *arg, struct pevent_record *r | |||
1922 | } | 1922 | } |
1923 | 1923 | ||
1924 | static int test_str(struct event_format *event, struct filter_arg *arg, | 1924 | static int test_str(struct event_format *event, struct filter_arg *arg, |
1925 | struct pevent_record *record, enum pevent_errno *err) | 1925 | struct tep_record *record, enum pevent_errno *err) |
1926 | { | 1926 | { |
1927 | const char *val; | 1927 | const char *val; |
1928 | 1928 | ||
@@ -1953,7 +1953,7 @@ static int test_str(struct event_format *event, struct filter_arg *arg, | |||
1953 | } | 1953 | } |
1954 | 1954 | ||
1955 | static int test_op(struct event_format *event, struct filter_arg *arg, | 1955 | static int test_op(struct event_format *event, struct filter_arg *arg, |
1956 | struct pevent_record *record, enum pevent_errno *err) | 1956 | struct tep_record *record, enum pevent_errno *err) |
1957 | { | 1957 | { |
1958 | switch (arg->op.type) { | 1958 | switch (arg->op.type) { |
1959 | case FILTER_OP_AND: | 1959 | case FILTER_OP_AND: |
@@ -1975,7 +1975,7 @@ static int test_op(struct event_format *event, struct filter_arg *arg, | |||
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | static int test_filter(struct event_format *event, struct filter_arg *arg, | 1977 | static int test_filter(struct event_format *event, struct filter_arg *arg, |
1978 | struct pevent_record *record, enum pevent_errno *err) | 1978 | struct tep_record *record, enum pevent_errno *err) |
1979 | { | 1979 | { |
1980 | if (*err) { | 1980 | if (*err) { |
1981 | /* | 1981 | /* |
@@ -2047,7 +2047,7 @@ int pevent_event_filtered(struct event_filter *filter, int event_id) | |||
2047 | * otherwise - error occurred during test | 2047 | * otherwise - error occurred during test |
2048 | */ | 2048 | */ |
2049 | enum pevent_errno pevent_filter_match(struct event_filter *filter, | 2049 | enum pevent_errno pevent_filter_match(struct event_filter *filter, |
2050 | struct pevent_record *record) | 2050 | struct tep_record *record) |
2051 | { | 2051 | { |
2052 | struct tep_handle *pevent = filter->pevent; | 2052 | struct tep_handle *pevent = filter->pevent; |
2053 | struct filter_type *filter_type; | 2053 | struct filter_type *filter_type; |
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugin_function.c index 3ed965a8b5f0..86b5bb9bf22c 100644 --- a/tools/lib/traceevent/plugin_function.c +++ b/tools/lib/traceevent/plugin_function.c | |||
@@ -122,7 +122,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu) | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static int function_handler(struct trace_seq *s, struct pevent_record *record, | 125 | static int function_handler(struct trace_seq *s, struct tep_record *record, |
126 | struct event_format *event, void *context) | 126 | struct event_format *event, void *context) |
127 | { | 127 | { |
128 | struct tep_handle *pevent = event->pevent; | 128 | struct tep_handle *pevent = event->pevent; |
diff --git a/tools/lib/traceevent/plugin_hrtimer.c b/tools/lib/traceevent/plugin_hrtimer.c index 746e7d464802..695e8e1b90e6 100644 --- a/tools/lib/traceevent/plugin_hrtimer.c +++ b/tools/lib/traceevent/plugin_hrtimer.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "event-parse.h" | 25 | #include "event-parse.h" |
26 | 26 | ||
27 | static int timer_expire_handler(struct trace_seq *s, | 27 | static int timer_expire_handler(struct trace_seq *s, |
28 | struct pevent_record *record, | 28 | struct tep_record *record, |
29 | struct event_format *event, void *context) | 29 | struct event_format *event, void *context) |
30 | { | 30 | { |
31 | trace_seq_printf(s, "hrtimer="); | 31 | trace_seq_printf(s, "hrtimer="); |
@@ -45,7 +45,7 @@ static int timer_expire_handler(struct trace_seq *s, | |||
45 | } | 45 | } |
46 | 46 | ||
47 | static int timer_start_handler(struct trace_seq *s, | 47 | static int timer_start_handler(struct trace_seq *s, |
48 | struct pevent_record *record, | 48 | struct tep_record *record, |
49 | struct event_format *event, void *context) | 49 | struct event_format *event, void *context) |
50 | { | 50 | { |
51 | trace_seq_printf(s, "hrtimer="); | 51 | trace_seq_printf(s, "hrtimer="); |
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugin_kmem.c index e342edadf03d..46e8e959539e 100644 --- a/tools/lib/traceevent/plugin_kmem.c +++ b/tools/lib/traceevent/plugin_kmem.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include "event-parse.h" | 24 | #include "event-parse.h" |
25 | 25 | ||
26 | static int call_site_handler(struct trace_seq *s, struct pevent_record *record, | 26 | static int call_site_handler(struct trace_seq *s, struct tep_record *record, |
27 | struct event_format *event, void *context) | 27 | struct event_format *event, void *context) |
28 | { | 28 | { |
29 | struct format_field *field; | 29 | struct format_field *field; |
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c index a6e96ba4d776..63420e3a340c 100644 --- a/tools/lib/traceevent/plugin_kvm.c +++ b/tools/lib/traceevent/plugin_kvm.c | |||
@@ -247,7 +247,7 @@ static const char *find_exit_reason(unsigned isa, int val) | |||
247 | return strings[i].str; | 247 | return strings[i].str; |
248 | } | 248 | } |
249 | 249 | ||
250 | static int print_exit_reason(struct trace_seq *s, struct pevent_record *record, | 250 | static int print_exit_reason(struct trace_seq *s, struct tep_record *record, |
251 | struct event_format *event, const char *field) | 251 | struct event_format *event, const char *field) |
252 | { | 252 | { |
253 | unsigned long long isa; | 253 | unsigned long long isa; |
@@ -268,7 +268,7 @@ static int print_exit_reason(struct trace_seq *s, struct pevent_record *record, | |||
268 | return 0; | 268 | return 0; |
269 | } | 269 | } |
270 | 270 | ||
271 | static int kvm_exit_handler(struct trace_seq *s, struct pevent_record *record, | 271 | static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, |
272 | struct event_format *event, void *context) | 272 | struct event_format *event, void *context) |
273 | { | 273 | { |
274 | unsigned long long info1 = 0, info2 = 0; | 274 | unsigned long long info1 = 0, info2 = 0; |
@@ -291,7 +291,7 @@ static int kvm_exit_handler(struct trace_seq *s, struct pevent_record *record, | |||
291 | #define KVM_EMUL_INSN_F_CS_L (1 << 3) | 291 | #define KVM_EMUL_INSN_F_CS_L (1 << 3) |
292 | 292 | ||
293 | static int kvm_emulate_insn_handler(struct trace_seq *s, | 293 | static int kvm_emulate_insn_handler(struct trace_seq *s, |
294 | struct pevent_record *record, | 294 | struct tep_record *record, |
295 | struct event_format *event, void *context) | 295 | struct event_format *event, void *context) |
296 | { | 296 | { |
297 | unsigned long long rip, csbase, len, flags, failed; | 297 | unsigned long long rip, csbase, len, flags, failed; |
@@ -330,7 +330,7 @@ static int kvm_emulate_insn_handler(struct trace_seq *s, | |||
330 | } | 330 | } |
331 | 331 | ||
332 | 332 | ||
333 | static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_record *record, | 333 | static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_record *record, |
334 | struct event_format *event, void *context) | 334 | struct event_format *event, void *context) |
335 | { | 335 | { |
336 | if (print_exit_reason(s, record, event, "exit_code") < 0) | 336 | if (print_exit_reason(s, record, event, "exit_code") < 0) |
@@ -344,7 +344,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_r | |||
344 | return 0; | 344 | return 0; |
345 | } | 345 | } |
346 | 346 | ||
347 | static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *record, | 347 | static int kvm_nested_vmexit_handler(struct trace_seq *s, struct tep_record *record, |
348 | struct event_format *event, void *context) | 348 | struct event_format *event, void *context) |
349 | { | 349 | { |
350 | pevent_print_num_field(s, "rip %llx ", event, "rip", record, 1); | 350 | pevent_print_num_field(s, "rip %llx ", event, "rip", record, 1); |
@@ -370,7 +370,7 @@ union kvm_mmu_page_role { | |||
370 | }; | 370 | }; |
371 | }; | 371 | }; |
372 | 372 | ||
373 | static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record, | 373 | static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, |
374 | struct event_format *event, void *context) | 374 | struct event_format *event, void *context) |
375 | { | 375 | { |
376 | unsigned long long val; | 376 | unsigned long long val; |
@@ -417,7 +417,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record, | |||
417 | } | 417 | } |
418 | 418 | ||
419 | static int kvm_mmu_get_page_handler(struct trace_seq *s, | 419 | static int kvm_mmu_get_page_handler(struct trace_seq *s, |
420 | struct pevent_record *record, | 420 | struct tep_record *record, |
421 | struct event_format *event, void *context) | 421 | struct event_format *event, void *context) |
422 | { | 422 | { |
423 | unsigned long long val; | 423 | unsigned long long val; |
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugin_mac80211.c index 9ac1141f351a..83d002753251 100644 --- a/tools/lib/traceevent/plugin_mac80211.c +++ b/tools/lib/traceevent/plugin_mac80211.c | |||
@@ -58,7 +58,7 @@ static void print_string(struct trace_seq *s, struct event_format *event, | |||
58 | #define SP() trace_seq_putc(s, ' ') | 58 | #define SP() trace_seq_putc(s, ' ') |
59 | 59 | ||
60 | static int drv_bss_info_changed(struct trace_seq *s, | 60 | static int drv_bss_info_changed(struct trace_seq *s, |
61 | struct pevent_record *record, | 61 | struct tep_record *record, |
62 | struct event_format *event, void *context) | 62 | struct event_format *event, void *context) |
63 | { | 63 | { |
64 | void *data = record->data; | 64 | void *data = record->data; |
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugin_sched_switch.c index de90fb82b83f..b72a52d2fd1d 100644 --- a/tools/lib/traceevent/plugin_sched_switch.c +++ b/tools/lib/traceevent/plugin_sched_switch.c | |||
@@ -45,7 +45,7 @@ static void write_state(struct trace_seq *s, int val) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | static void write_and_save_comm(struct format_field *field, | 47 | static void write_and_save_comm(struct format_field *field, |
48 | struct pevent_record *record, | 48 | struct tep_record *record, |
49 | struct trace_seq *s, int pid) | 49 | struct trace_seq *s, int pid) |
50 | { | 50 | { |
51 | const char *comm; | 51 | const char *comm; |
@@ -65,7 +65,7 @@ static void write_and_save_comm(struct format_field *field, | |||
65 | } | 65 | } |
66 | 66 | ||
67 | static int sched_wakeup_handler(struct trace_seq *s, | 67 | static int sched_wakeup_handler(struct trace_seq *s, |
68 | struct pevent_record *record, | 68 | struct tep_record *record, |
69 | struct event_format *event, void *context) | 69 | struct event_format *event, void *context) |
70 | { | 70 | { |
71 | struct format_field *field; | 71 | struct format_field *field; |
@@ -94,7 +94,7 @@ static int sched_wakeup_handler(struct trace_seq *s, | |||
94 | } | 94 | } |
95 | 95 | ||
96 | static int sched_switch_handler(struct trace_seq *s, | 96 | static int sched_switch_handler(struct trace_seq *s, |
97 | struct pevent_record *record, | 97 | struct tep_record *record, |
98 | struct event_format *event, void *context) | 98 | struct event_format *event, void *context) |
99 | { | 99 | { |
100 | struct format_field *field; | 100 | struct format_field *field; |