diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 14:03:08 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 14:36:43 -0400 |
commit | c99eeaf5497288d4e0fbca7ee0c401fd35860481 (patch) | |
tree | 2799f4bef6ed70505b3fad764600a71cc4442b87 /tools/lib/traceevent/event-parse.c | |
parent | 1634e4604cccbe6394dd858fb973604d2313336b (diff) |
tools lib traceevent: Rename various pevent 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_reset_function_resolver, pevent_strerror, pevent_list_events,
pevent_event_common_fields, pevent_event_fields, pevent_ref, pevent_unref
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/20180808180703.426198047@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/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 8215e6ff36eb..f723c088acca 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -471,13 +471,13 @@ int tep_set_function_resolver(struct tep_handle *pevent, | |||
471 | } | 471 | } |
472 | 472 | ||
473 | /** | 473 | /** |
474 | * pevent_reset_function_resolver - reset alternative function resolver | 474 | * tep_reset_function_resolver - reset alternative function resolver |
475 | * @pevent: handle for the pevent | 475 | * @pevent: handle for the pevent |
476 | * | 476 | * |
477 | * Stop using whatever alternative resolver was set, use the default | 477 | * Stop using whatever alternative resolver was set, use the default |
478 | * one instead. | 478 | * one instead. |
479 | */ | 479 | */ |
480 | void pevent_reset_function_resolver(struct tep_handle *pevent) | 480 | void tep_reset_function_resolver(struct tep_handle *pevent) |
481 | { | 481 | { |
482 | free(pevent->func_resolver); | 482 | free(pevent->func_resolver); |
483 | pevent->func_resolver = NULL; | 483 | pevent->func_resolver = NULL; |
@@ -5630,7 +5630,7 @@ static int events_system_cmp(const void *a, const void *b) | |||
5630 | return events_id_cmp(a, b); | 5630 | return events_id_cmp(a, b); |
5631 | } | 5631 | } |
5632 | 5632 | ||
5633 | struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_sort_type sort_type) | 5633 | struct event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type sort_type) |
5634 | { | 5634 | { |
5635 | struct event_format **events; | 5635 | struct event_format **events; |
5636 | int (*sort)(const void *a, const void *b); | 5636 | int (*sort)(const void *a, const void *b); |
@@ -5709,13 +5709,13 @@ get_event_fields(const char *type, const char *name, | |||
5709 | } | 5709 | } |
5710 | 5710 | ||
5711 | /** | 5711 | /** |
5712 | * pevent_event_common_fields - return a list of common fields for an event | 5712 | * tep_event_common_fields - return a list of common fields for an event |
5713 | * @event: the event to return the common fields of. | 5713 | * @event: the event to return the common fields of. |
5714 | * | 5714 | * |
5715 | * Returns an allocated array of fields. The last item in the array is NULL. | 5715 | * Returns an allocated array of fields. The last item in the array is NULL. |
5716 | * The array must be freed with free(). | 5716 | * The array must be freed with free(). |
5717 | */ | 5717 | */ |
5718 | struct format_field **pevent_event_common_fields(struct event_format *event) | 5718 | struct format_field **tep_event_common_fields(struct event_format *event) |
5719 | { | 5719 | { |
5720 | return get_event_fields("common", event->name, | 5720 | return get_event_fields("common", event->name, |
5721 | event->format.nr_common, | 5721 | event->format.nr_common, |
@@ -5723,13 +5723,13 @@ struct format_field **pevent_event_common_fields(struct event_format *event) | |||
5723 | } | 5723 | } |
5724 | 5724 | ||
5725 | /** | 5725 | /** |
5726 | * pevent_event_fields - return a list of event specific fields for an event | 5726 | * tep_event_fields - return a list of event specific fields for an event |
5727 | * @event: the event to return the fields of. | 5727 | * @event: the event to return the fields of. |
5728 | * | 5728 | * |
5729 | * Returns an allocated array of fields. The last item in the array is NULL. | 5729 | * Returns an allocated array of fields. The last item in the array is NULL. |
5730 | * The array must be freed with free(). | 5730 | * The array must be freed with free(). |
5731 | */ | 5731 | */ |
5732 | struct format_field **pevent_event_fields(struct event_format *event) | 5732 | struct format_field **tep_event_fields(struct event_format *event) |
5733 | { | 5733 | { |
5734 | return get_event_fields("event", event->name, | 5734 | return get_event_fields("event", event->name, |
5735 | event->format.nr_fields, | 5735 | event->format.nr_fields, |
@@ -6221,8 +6221,8 @@ static const char * const pevent_error_str[] = { | |||
6221 | }; | 6221 | }; |
6222 | #undef _PE | 6222 | #undef _PE |
6223 | 6223 | ||
6224 | int pevent_strerror(struct tep_handle *pevent __maybe_unused, | 6224 | int tep_strerror(struct tep_handle *pevent __maybe_unused, |
6225 | enum tep_errno errnum, char *buf, size_t buflen) | 6225 | enum tep_errno errnum, char *buf, size_t buflen) |
6226 | { | 6226 | { |
6227 | int idx; | 6227 | int idx; |
6228 | const char *msg; | 6228 | const char *msg; |
@@ -6766,7 +6766,7 @@ struct tep_handle *tep_alloc(void) | |||
6766 | return pevent; | 6766 | return pevent; |
6767 | } | 6767 | } |
6768 | 6768 | ||
6769 | void pevent_ref(struct tep_handle *pevent) | 6769 | void tep_ref(struct tep_handle *pevent) |
6770 | { | 6770 | { |
6771 | pevent->ref_count++; | 6771 | pevent->ref_count++; |
6772 | } | 6772 | } |
@@ -6899,7 +6899,7 @@ void tep_free(struct tep_handle *pevent) | |||
6899 | free(pevent); | 6899 | free(pevent); |
6900 | } | 6900 | } |
6901 | 6901 | ||
6902 | void pevent_unref(struct tep_handle *pevent) | 6902 | void tep_unref(struct tep_handle *pevent) |
6903 | { | 6903 | { |
6904 | tep_free(pevent); | 6904 | tep_free(pevent); |
6905 | } | 6905 | } |