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>
This commit is contained in:
Tzvetomir Stoyanov (VMware)
2018-08-08 14:03:08 -04:00
committed by Arnaldo Carvalho de Melo
parent 1634e4604c
commit c99eeaf549
3 changed files with 21 additions and 21 deletions

View File

@@ -471,13 +471,13 @@ int tep_set_function_resolver(struct tep_handle *pevent,
}
/**
* pevent_reset_function_resolver - reset alternative function resolver
* tep_reset_function_resolver - reset alternative function resolver
* @pevent: handle for the pevent
*
* Stop using whatever alternative resolver was set, use the default
* one instead.
*/
void pevent_reset_function_resolver(struct tep_handle *pevent)
void tep_reset_function_resolver(struct tep_handle *pevent)
{
free(pevent->func_resolver);
pevent->func_resolver = NULL;
@@ -5630,7 +5630,7 @@ static int events_system_cmp(const void *a, const void *b)
return events_id_cmp(a, b);
}
struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_sort_type sort_type)
struct event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type sort_type)
{
struct event_format **events;
int (*sort)(const void *a, const void *b);
@@ -5709,13 +5709,13 @@ get_event_fields(const char *type, const char *name,
}
/**
* pevent_event_common_fields - return a list of common fields for an event
* tep_event_common_fields - return a list of common fields for an event
* @event: the event to return the common fields of.
*
* Returns an allocated array of fields. The last item in the array is NULL.
* The array must be freed with free().
*/
struct format_field **pevent_event_common_fields(struct event_format *event)
struct format_field **tep_event_common_fields(struct event_format *event)
{
return get_event_fields("common", event->name,
event->format.nr_common,
@@ -5723,13 +5723,13 @@ struct format_field **pevent_event_common_fields(struct event_format *event)
}
/**
* pevent_event_fields - return a list of event specific fields for an event
* tep_event_fields - return a list of event specific fields for an event
* @event: the event to return the fields of.
*
* Returns an allocated array of fields. The last item in the array is NULL.
* The array must be freed with free().
*/
struct format_field **pevent_event_fields(struct event_format *event)
struct format_field **tep_event_fields(struct event_format *event)
{
return get_event_fields("event", event->name,
event->format.nr_fields,
@@ -6221,8 +6221,8 @@ static const char * const pevent_error_str[] = {
};
#undef _PE
int pevent_strerror(struct tep_handle *pevent __maybe_unused,
enum tep_errno errnum, char *buf, size_t buflen)
int tep_strerror(struct tep_handle *pevent __maybe_unused,
enum tep_errno errnum, char *buf, size_t buflen)
{
int idx;
const char *msg;
@@ -6766,7 +6766,7 @@ struct tep_handle *tep_alloc(void)
return pevent;
}
void pevent_ref(struct tep_handle *pevent)
void tep_ref(struct tep_handle *pevent)
{
pevent->ref_count++;
}
@@ -6899,7 +6899,7 @@ void tep_free(struct tep_handle *pevent)
free(pevent);
}
void pevent_unref(struct tep_handle *pevent)
void tep_unref(struct tep_handle *pevent)
{
tep_free(pevent);
}