diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 14:02:50 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 14:21:51 -0400 |
commit | af85cd19521fe956eeb2cc8b9e41b9b5bbb8e3ae (patch) | |
tree | a015cbe5966f924e145eee87e4e262a9ab0e920f /tools/lib | |
parent | 4d5c58b15c4363219e19380848eb74ca60143187 (diff) |
tools lib traceevent, perf tools: Rename pevent find APIs
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
APIs: pevent_find_any_field, pevent_find_common_field,
pevent_find_event, pevent_find_field
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/20180808180700.316995920@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 | 76 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 8 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kmem.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_mac80211.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_sched_switch.c | 6 |
6 files changed, 49 insertions, 49 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 040180f6ed74..29f22e432084 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -2101,11 +2101,11 @@ process_entry(struct event_format *event __maybe_unused, struct print_arg *arg, | |||
2101 | arg->field.name = field; | 2101 | arg->field.name = field; |
2102 | 2102 | ||
2103 | if (is_flag_field) { | 2103 | if (is_flag_field) { |
2104 | arg->field.field = pevent_find_any_field(event, arg->field.name); | 2104 | arg->field.field = tep_find_any_field(event, arg->field.name); |
2105 | arg->field.field->flags |= FIELD_IS_FLAG; | 2105 | arg->field.field->flags |= FIELD_IS_FLAG; |
2106 | is_flag_field = 0; | 2106 | is_flag_field = 0; |
2107 | } else if (is_symbolic_field) { | 2107 | } else if (is_symbolic_field) { |
2108 | arg->field.field = pevent_find_any_field(event, arg->field.name); | 2108 | arg->field.field = tep_find_any_field(event, arg->field.name); |
2109 | arg->field.field->flags |= FIELD_IS_SYMBOLIC; | 2109 | arg->field.field->flags |= FIELD_IS_SYMBOLIC; |
2110 | is_symbolic_field = 0; | 2110 | is_symbolic_field = 0; |
2111 | } | 2111 | } |
@@ -2714,7 +2714,7 @@ process_dynamic_array(struct event_format *event, struct print_arg *arg, char ** | |||
2714 | 2714 | ||
2715 | /* Find the field */ | 2715 | /* Find the field */ |
2716 | 2716 | ||
2717 | field = pevent_find_field(event, token); | 2717 | field = tep_find_field(event, token); |
2718 | if (!field) | 2718 | if (!field) |
2719 | goto out_free; | 2719 | goto out_free; |
2720 | 2720 | ||
@@ -2771,7 +2771,7 @@ process_dynamic_array_len(struct event_format *event, struct print_arg *arg, | |||
2771 | arg->type = PRINT_DYNAMIC_ARRAY_LEN; | 2771 | arg->type = PRINT_DYNAMIC_ARRAY_LEN; |
2772 | 2772 | ||
2773 | /* Find the field */ | 2773 | /* Find the field */ |
2774 | field = pevent_find_field(event, token); | 2774 | field = tep_find_field(event, token); |
2775 | if (!field) | 2775 | if (!field) |
2776 | goto out_free; | 2776 | goto out_free; |
2777 | 2777 | ||
@@ -3265,7 +3265,7 @@ static int event_read_print(struct event_format *event) | |||
3265 | } | 3265 | } |
3266 | 3266 | ||
3267 | /** | 3267 | /** |
3268 | * pevent_find_common_field - return a common field by event | 3268 | * tep_find_common_field - return a common field by event |
3269 | * @event: handle for the event | 3269 | * @event: handle for the event |
3270 | * @name: the name of the common field to return | 3270 | * @name: the name of the common field to return |
3271 | * | 3271 | * |
@@ -3273,7 +3273,7 @@ static int event_read_print(struct event_format *event) | |||
3273 | * This only searchs the common fields and not all field. | 3273 | * This only searchs the common fields and not all field. |
3274 | */ | 3274 | */ |
3275 | struct format_field * | 3275 | struct format_field * |
3276 | pevent_find_common_field(struct event_format *event, const char *name) | 3276 | tep_find_common_field(struct event_format *event, const char *name) |
3277 | { | 3277 | { |
3278 | struct format_field *format; | 3278 | struct format_field *format; |
3279 | 3279 | ||
@@ -3287,7 +3287,7 @@ pevent_find_common_field(struct event_format *event, const char *name) | |||
3287 | } | 3287 | } |
3288 | 3288 | ||
3289 | /** | 3289 | /** |
3290 | * pevent_find_field - find a non-common field | 3290 | * tep_find_field - find a non-common field |
3291 | * @event: handle for the event | 3291 | * @event: handle for the event |
3292 | * @name: the name of the non-common field | 3292 | * @name: the name of the non-common field |
3293 | * | 3293 | * |
@@ -3295,7 +3295,7 @@ pevent_find_common_field(struct event_format *event, const char *name) | |||
3295 | * This does not search common fields. | 3295 | * This does not search common fields. |
3296 | */ | 3296 | */ |
3297 | struct format_field * | 3297 | struct format_field * |
3298 | pevent_find_field(struct event_format *event, const char *name) | 3298 | tep_find_field(struct event_format *event, const char *name) |
3299 | { | 3299 | { |
3300 | struct format_field *format; | 3300 | struct format_field *format; |
3301 | 3301 | ||
@@ -3309,7 +3309,7 @@ pevent_find_field(struct event_format *event, const char *name) | |||
3309 | } | 3309 | } |
3310 | 3310 | ||
3311 | /** | 3311 | /** |
3312 | * pevent_find_any_field - find any field by name | 3312 | * tep_find_any_field - find any field by name |
3313 | * @event: handle for the event | 3313 | * @event: handle for the event |
3314 | * @name: the name of the field | 3314 | * @name: the name of the field |
3315 | * | 3315 | * |
@@ -3318,14 +3318,14 @@ pevent_find_field(struct event_format *event, const char *name) | |||
3318 | * the non-common ones if a common one was not found. | 3318 | * the non-common ones if a common one was not found. |
3319 | */ | 3319 | */ |
3320 | struct format_field * | 3320 | struct format_field * |
3321 | pevent_find_any_field(struct event_format *event, const char *name) | 3321 | tep_find_any_field(struct event_format *event, const char *name) |
3322 | { | 3322 | { |
3323 | struct format_field *format; | 3323 | struct format_field *format; |
3324 | 3324 | ||
3325 | format = pevent_find_common_field(event, name); | 3325 | format = tep_find_common_field(event, name); |
3326 | if (format) | 3326 | if (format) |
3327 | return format; | 3327 | return format; |
3328 | return pevent_find_field(event, name); | 3328 | return tep_find_field(event, name); |
3329 | } | 3329 | } |
3330 | 3330 | ||
3331 | /** | 3331 | /** |
@@ -3400,7 +3400,7 @@ static int get_common_info(struct tep_handle *pevent, | |||
3400 | } | 3400 | } |
3401 | 3401 | ||
3402 | event = pevent->events[0]; | 3402 | event = pevent->events[0]; |
3403 | field = pevent_find_common_field(event, type); | 3403 | field = tep_find_common_field(event, type); |
3404 | if (!field) | 3404 | if (!field) |
3405 | return -1; | 3405 | return -1; |
3406 | 3406 | ||
@@ -3468,13 +3468,13 @@ static int parse_common_migrate_disable(struct tep_handle *pevent, void *data) | |||
3468 | static int events_id_cmp(const void *a, const void *b); | 3468 | static int events_id_cmp(const void *a, const void *b); |
3469 | 3469 | ||
3470 | /** | 3470 | /** |
3471 | * pevent_find_event - find an event by given id | 3471 | * tep_find_event - find an event by given id |
3472 | * @pevent: a handle to the pevent | 3472 | * @pevent: a handle to the pevent |
3473 | * @id: the id of the event | 3473 | * @id: the id of the event |
3474 | * | 3474 | * |
3475 | * Returns an event that has a given @id. | 3475 | * Returns an event that has a given @id. |
3476 | */ | 3476 | */ |
3477 | struct event_format *pevent_find_event(struct tep_handle *pevent, int id) | 3477 | struct event_format *tep_find_event(struct tep_handle *pevent, int id) |
3478 | { | 3478 | { |
3479 | struct event_format **eventptr; | 3479 | struct event_format **eventptr; |
3480 | struct event_format key; | 3480 | struct event_format key; |
@@ -3553,7 +3553,7 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg | |||
3553 | return strtoull(arg->atom.atom, NULL, 0); | 3553 | return strtoull(arg->atom.atom, NULL, 0); |
3554 | case PRINT_FIELD: | 3554 | case PRINT_FIELD: |
3555 | if (!arg->field.field) { | 3555 | if (!arg->field.field) { |
3556 | arg->field.field = pevent_find_any_field(event, arg->field.name); | 3556 | arg->field.field = tep_find_any_field(event, arg->field.name); |
3557 | if (!arg->field.field) | 3557 | if (!arg->field.field) |
3558 | goto out_warning_field; | 3558 | goto out_warning_field; |
3559 | 3559 | ||
@@ -3619,7 +3619,7 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg | |||
3619 | case PRINT_FIELD: | 3619 | case PRINT_FIELD: |
3620 | if (!larg->field.field) { | 3620 | if (!larg->field.field) { |
3621 | larg->field.field = | 3621 | larg->field.field = |
3622 | pevent_find_any_field(event, larg->field.name); | 3622 | tep_find_any_field(event, larg->field.name); |
3623 | if (!larg->field.field) { | 3623 | if (!larg->field.field) { |
3624 | arg = larg; | 3624 | arg = larg; |
3625 | goto out_warning_field; | 3625 | goto out_warning_field; |
@@ -3899,7 +3899,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
3899 | case PRINT_FIELD: | 3899 | case PRINT_FIELD: |
3900 | field = arg->field.field; | 3900 | field = arg->field.field; |
3901 | if (!field) { | 3901 | if (!field) { |
3902 | field = pevent_find_any_field(event, arg->field.name); | 3902 | field = tep_find_any_field(event, arg->field.name); |
3903 | if (!field) { | 3903 | if (!field) { |
3904 | str = arg->field.name; | 3904 | str = arg->field.name; |
3905 | goto out_warning_field; | 3905 | goto out_warning_field; |
@@ -4000,7 +4000,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
4000 | field = arg->hex.field->field.field; | 4000 | field = arg->hex.field->field.field; |
4001 | if (!field) { | 4001 | if (!field) { |
4002 | str = arg->hex.field->field.name; | 4002 | str = arg->hex.field->field.name; |
4003 | field = pevent_find_any_field(event, str); | 4003 | field = tep_find_any_field(event, str); |
4004 | if (!field) | 4004 | if (!field) |
4005 | goto out_warning_field; | 4005 | goto out_warning_field; |
4006 | arg->hex.field->field.field = field; | 4006 | arg->hex.field->field.field = field; |
@@ -4031,7 +4031,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
4031 | field = arg->int_array.field->field.field; | 4031 | field = arg->int_array.field->field.field; |
4032 | if (!field) { | 4032 | if (!field) { |
4033 | str = arg->int_array.field->field.name; | 4033 | str = arg->int_array.field->field.name; |
4034 | field = pevent_find_any_field(event, str); | 4034 | field = tep_find_any_field(event, str); |
4035 | if (!field) | 4035 | if (!field) |
4036 | goto out_warning_field; | 4036 | goto out_warning_field; |
4037 | arg->int_array.field->field.field = field; | 4037 | arg->int_array.field->field.field = field; |
@@ -4071,7 +4071,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
4071 | if (arg->string.offset == -1) { | 4071 | if (arg->string.offset == -1) { |
4072 | struct format_field *f; | 4072 | struct format_field *f; |
4073 | 4073 | ||
4074 | f = pevent_find_any_field(event, arg->string.string); | 4074 | f = tep_find_any_field(event, arg->string.string); |
4075 | arg->string.offset = f->offset; | 4075 | arg->string.offset = f->offset; |
4076 | } | 4076 | } |
4077 | str_offset = data2host4(pevent, data + arg->string.offset); | 4077 | str_offset = data2host4(pevent, data + arg->string.offset); |
@@ -4089,7 +4089,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
4089 | if (arg->bitmask.offset == -1) { | 4089 | if (arg->bitmask.offset == -1) { |
4090 | struct format_field *f; | 4090 | struct format_field *f; |
4091 | 4091 | ||
4092 | f = pevent_find_any_field(event, arg->bitmask.bitmask); | 4092 | f = tep_find_any_field(event, arg->bitmask.bitmask); |
4093 | arg->bitmask.offset = f->offset; | 4093 | arg->bitmask.offset = f->offset; |
4094 | } | 4094 | } |
4095 | bitmask_offset = data2host4(pevent, data + arg->bitmask.offset); | 4095 | bitmask_offset = data2host4(pevent, data + arg->bitmask.offset); |
@@ -4239,12 +4239,12 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc | |||
4239 | ip_field = pevent->bprint_ip_field; | 4239 | ip_field = pevent->bprint_ip_field; |
4240 | 4240 | ||
4241 | if (!field) { | 4241 | if (!field) { |
4242 | field = pevent_find_field(event, "buf"); | 4242 | field = tep_find_field(event, "buf"); |
4243 | if (!field) { | 4243 | if (!field) { |
4244 | do_warning_event(event, "can't find buffer field for binary printk"); | 4244 | do_warning_event(event, "can't find buffer field for binary printk"); |
4245 | return NULL; | 4245 | return NULL; |
4246 | } | 4246 | } |
4247 | ip_field = pevent_find_field(event, "ip"); | 4247 | ip_field = tep_find_field(event, "ip"); |
4248 | if (!ip_field) { | 4248 | if (!ip_field) { |
4249 | do_warning_event(event, "can't find ip field for binary printk"); | 4249 | do_warning_event(event, "can't find ip field for binary printk"); |
4250 | return NULL; | 4250 | return NULL; |
@@ -4413,7 +4413,7 @@ get_bprint_format(void *data, int size __maybe_unused, | |||
4413 | field = pevent->bprint_fmt_field; | 4413 | field = pevent->bprint_fmt_field; |
4414 | 4414 | ||
4415 | if (!field) { | 4415 | if (!field) { |
4416 | field = pevent_find_field(event, "fmt"); | 4416 | field = tep_find_field(event, "fmt"); |
4417 | if (!field) { | 4417 | if (!field) { |
4418 | do_warning_event(event, "can't find format field for binary printk"); | 4418 | do_warning_event(event, "can't find format field for binary printk"); |
4419 | return NULL; | 4419 | return NULL; |
@@ -4457,7 +4457,7 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, | |||
4457 | fmt = "%.2x%.2x%.2x%.2x%.2x%.2x"; | 4457 | fmt = "%.2x%.2x%.2x%.2x%.2x%.2x"; |
4458 | if (!arg->field.field) { | 4458 | if (!arg->field.field) { |
4459 | arg->field.field = | 4459 | arg->field.field = |
4460 | pevent_find_any_field(event, arg->field.name); | 4460 | tep_find_any_field(event, arg->field.name); |
4461 | if (!arg->field.field) { | 4461 | if (!arg->field.field) { |
4462 | do_warning_event(event, "%s: field %s not found", | 4462 | do_warning_event(event, "%s: field %s not found", |
4463 | __func__, arg->field.name); | 4463 | __func__, arg->field.name); |
@@ -4607,7 +4607,7 @@ static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, | |||
4607 | 4607 | ||
4608 | if (!arg->field.field) { | 4608 | if (!arg->field.field) { |
4609 | arg->field.field = | 4609 | arg->field.field = |
4610 | pevent_find_any_field(event, arg->field.name); | 4610 | tep_find_any_field(event, arg->field.name); |
4611 | if (!arg->field.field) { | 4611 | if (!arg->field.field) { |
4612 | do_warning("%s: field %s not found", | 4612 | do_warning("%s: field %s not found", |
4613 | __func__, arg->field.name); | 4613 | __func__, arg->field.name); |
@@ -4653,7 +4653,7 @@ static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, | |||
4653 | 4653 | ||
4654 | if (!arg->field.field) { | 4654 | if (!arg->field.field) { |
4655 | arg->field.field = | 4655 | arg->field.field = |
4656 | pevent_find_any_field(event, arg->field.name); | 4656 | tep_find_any_field(event, arg->field.name); |
4657 | if (!arg->field.field) { | 4657 | if (!arg->field.field) { |
4658 | do_warning("%s: field %s not found", | 4658 | do_warning("%s: field %s not found", |
4659 | __func__, arg->field.name); | 4659 | __func__, arg->field.name); |
@@ -4711,7 +4711,7 @@ static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, | |||
4711 | 4711 | ||
4712 | if (!arg->field.field) { | 4712 | if (!arg->field.field) { |
4713 | arg->field.field = | 4713 | arg->field.field = |
4714 | pevent_find_any_field(event, arg->field.name); | 4714 | tep_find_any_field(event, arg->field.name); |
4715 | if (!arg->field.field) { | 4715 | if (!arg->field.field) { |
4716 | do_warning("%s: field %s not found", | 4716 | do_warning("%s: field %s not found", |
4717 | __func__, arg->field.name); | 4717 | __func__, arg->field.name); |
@@ -5243,7 +5243,7 @@ int pevent_data_type(struct tep_handle *pevent, struct tep_record *rec) | |||
5243 | */ | 5243 | */ |
5244 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type) | 5244 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type) |
5245 | { | 5245 | { |
5246 | return pevent_find_event(pevent, type); | 5246 | return tep_find_event(pevent, type); |
5247 | } | 5247 | } |
5248 | 5248 | ||
5249 | /** | 5249 | /** |
@@ -5452,7 +5452,7 @@ pevent_find_event_by_record(struct tep_handle *pevent, struct tep_record *record | |||
5452 | 5452 | ||
5453 | type = trace_parse_common_type(pevent, record->data); | 5453 | type = trace_parse_common_type(pevent, record->data); |
5454 | 5454 | ||
5455 | return pevent_find_event(pevent, type); | 5455 | return tep_find_event(pevent, type); |
5456 | } | 5456 | } |
5457 | 5457 | ||
5458 | /** | 5458 | /** |
@@ -6288,7 +6288,7 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, | |||
6288 | if (!event) | 6288 | if (!event) |
6289 | return NULL; | 6289 | return NULL; |
6290 | 6290 | ||
6291 | field = pevent_find_field(event, name); | 6291 | field = tep_find_field(event, name); |
6292 | 6292 | ||
6293 | if (!field) { | 6293 | if (!field) { |
6294 | if (err) | 6294 | if (err) |
@@ -6332,7 +6332,7 @@ int pevent_get_field_val(struct trace_seq *s, struct event_format *event, | |||
6332 | if (!event) | 6332 | if (!event) |
6333 | return -1; | 6333 | return -1; |
6334 | 6334 | ||
6335 | field = pevent_find_field(event, name); | 6335 | field = tep_find_field(event, name); |
6336 | 6336 | ||
6337 | return get_field_val(s, field, name, record, val, err); | 6337 | return get_field_val(s, field, name, record, val, err); |
6338 | } | 6338 | } |
@@ -6357,7 +6357,7 @@ int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, | |||
6357 | if (!event) | 6357 | if (!event) |
6358 | return -1; | 6358 | return -1; |
6359 | 6359 | ||
6360 | field = pevent_find_common_field(event, name); | 6360 | field = tep_find_common_field(event, name); |
6361 | 6361 | ||
6362 | return get_field_val(s, field, name, record, val, err); | 6362 | return get_field_val(s, field, name, record, val, err); |
6363 | } | 6363 | } |
@@ -6382,7 +6382,7 @@ int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, | |||
6382 | if (!event) | 6382 | if (!event) |
6383 | return -1; | 6383 | return -1; |
6384 | 6384 | ||
6385 | field = pevent_find_any_field(event, name); | 6385 | field = tep_find_any_field(event, name); |
6386 | 6386 | ||
6387 | return get_field_val(s, field, name, record, val, err); | 6387 | return get_field_val(s, field, name, record, val, err); |
6388 | } | 6388 | } |
@@ -6402,7 +6402,7 @@ 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 tep_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 = tep_find_field(event, name); |
6406 | unsigned long long val; | 6406 | unsigned long long val; |
6407 | 6407 | ||
6408 | if (!field) | 6408 | if (!field) |
@@ -6434,7 +6434,7 @@ 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 tep_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 = tep_find_field(event, name); |
6438 | struct tep_handle *pevent = event->pevent; | 6438 | struct tep_handle *pevent = event->pevent; |
6439 | unsigned long long val; | 6439 | unsigned long long val; |
6440 | struct func_map *func; | 6440 | struct func_map *func; |
@@ -6599,7 +6599,7 @@ static struct event_format *pevent_search_event(struct tep_handle *pevent, int i | |||
6599 | 6599 | ||
6600 | if (id >= 0) { | 6600 | if (id >= 0) { |
6601 | /* search by id */ | 6601 | /* search by id */ |
6602 | event = pevent_find_event(pevent, id); | 6602 | event = tep_find_event(pevent, id); |
6603 | if (!event) | 6603 | if (!event) |
6604 | return NULL; | 6604 | return NULL; |
6605 | if (event_name && (strcmp(event_name, event->name) != 0)) | 6605 | if (event_name && (strcmp(event_name, event->name) != 0)) |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index c229240666b7..83c78290061e 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -686,9 +686,9 @@ int pevent_register_print_function(struct tep_handle *pevent, | |||
686 | int pevent_unregister_print_function(struct tep_handle *pevent, | 686 | int pevent_unregister_print_function(struct tep_handle *pevent, |
687 | pevent_func_handler func, char *name); | 687 | pevent_func_handler func, char *name); |
688 | 688 | ||
689 | struct format_field *pevent_find_common_field(struct event_format *event, const char *name); | 689 | struct format_field *tep_find_common_field(struct event_format *event, const char *name); |
690 | struct format_field *pevent_find_field(struct event_format *event, const char *name); | 690 | struct format_field *tep_find_field(struct event_format *event, const char *name); |
691 | struct format_field *pevent_find_any_field(struct event_format *event, const char *name); | 691 | struct format_field *tep_find_any_field(struct event_format *event, const char *name); |
692 | 692 | ||
693 | const char *pevent_find_function(struct tep_handle *pevent, unsigned long long addr); | 693 | const char *pevent_find_function(struct tep_handle *pevent, unsigned long long addr); |
694 | unsigned long long | 694 | unsigned long long |
@@ -697,7 +697,7 @@ unsigned long long pevent_read_number(struct tep_handle *pevent, const void *ptr | |||
697 | int pevent_read_number_field(struct format_field *field, const void *data, | 697 | int pevent_read_number_field(struct format_field *field, const void *data, |
698 | unsigned long long *value); | 698 | unsigned long long *value); |
699 | 699 | ||
700 | struct event_format *pevent_find_event(struct tep_handle *pevent, int id); | 700 | struct event_format *tep_find_event(struct tep_handle *pevent, int id); |
701 | 701 | ||
702 | struct event_format * | 702 | 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); |
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index 784ccac90999..7b6bab1ab0cd 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -167,7 +167,7 @@ add_filter_type(struct event_filter *filter, int id) | |||
167 | 167 | ||
168 | filter_type = &filter->event_filters[i]; | 168 | filter_type = &filter->event_filters[i]; |
169 | filter_type->event_id = id; | 169 | filter_type->event_id = id; |
170 | filter_type->event = pevent_find_event(filter->pevent, id); | 170 | filter_type->event = tep_find_event(filter->pevent, id); |
171 | filter_type->filter = NULL; | 171 | filter_type->filter = NULL; |
172 | 172 | ||
173 | filter->filters++; | 173 | filter->filters++; |
@@ -382,7 +382,7 @@ create_arg_item(struct event_format *event, const char *token, | |||
382 | break; | 382 | break; |
383 | } | 383 | } |
384 | /* Consider this a field */ | 384 | /* Consider this a field */ |
385 | field = pevent_find_any_field(event, token); | 385 | field = tep_find_any_field(event, token); |
386 | if (!field) { | 386 | if (!field) { |
387 | /* If token is 'COMM' or 'CPU' then it is special */ | 387 | /* If token is 'COMM' or 'CPU' then it is special */ |
388 | if (strcmp(token, COMM) == 0) { | 388 | if (strcmp(token, COMM) == 0) { |
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugin_kmem.c index 0a56562d0645..a5f8641495f3 100644 --- a/tools/lib/traceevent/plugin_kmem.c +++ b/tools/lib/traceevent/plugin_kmem.c | |||
@@ -31,7 +31,7 @@ static int call_site_handler(struct trace_seq *s, struct tep_record *record, | |||
31 | void *data = record->data; | 31 | void *data = record->data; |
32 | const char *func; | 32 | const char *func; |
33 | 33 | ||
34 | field = pevent_find_field(event, "call_site"); | 34 | field = tep_find_field(event, "call_site"); |
35 | if (!field) | 35 | if (!field) |
36 | return 1; | 36 | return 1; |
37 | 37 | ||
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugin_mac80211.c index 61eea3543cf1..dd5c7fc0193f 100644 --- a/tools/lib/traceevent/plugin_mac80211.c +++ b/tools/lib/traceevent/plugin_mac80211.c | |||
@@ -28,7 +28,7 @@ | |||
28 | static void print_string(struct trace_seq *s, struct event_format *event, | 28 | static void print_string(struct trace_seq *s, struct event_format *event, |
29 | const char *name, const void *data) | 29 | const char *name, const void *data) |
30 | { | 30 | { |
31 | struct format_field *f = pevent_find_field(event, name); | 31 | struct format_field *f = tep_find_field(event, name); |
32 | int offset; | 32 | int offset; |
33 | int length; | 33 | int length; |
34 | 34 | ||
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugin_sched_switch.c index 24dc2bca8e67..90d2ef293cf9 100644 --- a/tools/lib/traceevent/plugin_sched_switch.c +++ b/tools/lib/traceevent/plugin_sched_switch.c | |||
@@ -74,7 +74,7 @@ static int sched_wakeup_handler(struct trace_seq *s, | |||
74 | if (pevent_get_field_val(s, event, "pid", record, &val, 1)) | 74 | if (pevent_get_field_val(s, event, "pid", record, &val, 1)) |
75 | return trace_seq_putc(s, '!'); | 75 | return trace_seq_putc(s, '!'); |
76 | 76 | ||
77 | field = pevent_find_any_field(event, "comm"); | 77 | field = tep_find_any_field(event, "comm"); |
78 | if (field) { | 78 | if (field) { |
79 | write_and_save_comm(field, record, s, val); | 79 | write_and_save_comm(field, record, s, val); |
80 | trace_seq_putc(s, ':'); | 80 | trace_seq_putc(s, ':'); |
@@ -103,7 +103,7 @@ static int sched_switch_handler(struct trace_seq *s, | |||
103 | if (pevent_get_field_val(s, event, "prev_pid", record, &val, 1)) | 103 | if (pevent_get_field_val(s, event, "prev_pid", record, &val, 1)) |
104 | return trace_seq_putc(s, '!'); | 104 | return trace_seq_putc(s, '!'); |
105 | 105 | ||
106 | field = pevent_find_any_field(event, "prev_comm"); | 106 | field = tep_find_any_field(event, "prev_comm"); |
107 | if (field) { | 107 | if (field) { |
108 | write_and_save_comm(field, record, s, val); | 108 | write_and_save_comm(field, record, s, val); |
109 | trace_seq_putc(s, ':'); | 109 | trace_seq_putc(s, ':'); |
@@ -121,7 +121,7 @@ static int sched_switch_handler(struct trace_seq *s, | |||
121 | if (pevent_get_field_val(s, event, "next_pid", record, &val, 1)) | 121 | if (pevent_get_field_val(s, event, "next_pid", record, &val, 1)) |
122 | return trace_seq_putc(s, '!'); | 122 | return trace_seq_putc(s, '!'); |
123 | 123 | ||
124 | field = pevent_find_any_field(event, "next_comm"); | 124 | field = tep_find_any_field(event, "next_comm"); |
125 | if (field) { | 125 | if (field) { |
126 | write_and_save_comm(field, record, s, val); | 126 | write_and_save_comm(field, record, s, val); |
127 | trace_seq_putc(s, ':'); | 127 | trace_seq_putc(s, ':'); |