tools lib traceevent, perf tools: Rename pevent alloc / free 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_alloc, pevent_free, pevent_event_info and pevent_func_resolver_t

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.152609945@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:02:49 -04:00
committed by Arnaldo Carvalho de Melo
parent c32d52b464
commit 4d5c58b15c
7 changed files with 25 additions and 25 deletions

View File

@@ -438,9 +438,9 @@ __find_func(struct tep_handle *pevent, unsigned long long addr)
}
struct func_resolver {
pevent_func_resolver_t *func;
void *priv;
struct func_map map;
tep_func_resolver_t *func;
void *priv;
struct func_map map;
};
/**
@@ -454,7 +454,7 @@ struct func_resolver {
* pevent->funclist.
*/
int pevent_set_function_resolver(struct tep_handle *pevent,
pevent_func_resolver_t *func, void *priv)
tep_func_resolver_t *func, void *priv)
{
struct func_resolver *resolver = malloc(sizeof(*resolver));
@@ -5399,8 +5399,8 @@ int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline)
* This parses the raw @data using the given @event information and
* writes the print format into the trace_seq.
*/
void pevent_event_info(struct trace_seq *s, struct event_format *event,
struct tep_record *record)
void tep_event_info(struct trace_seq *s, struct event_format *event,
struct tep_record *record)
{
int print_pretty = 1;
@@ -5556,7 +5556,7 @@ void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s,
if (len < 20)
trace_seq_printf(s, "%.*s", 20 - len, spaces);
pevent_event_info(s, event, record);
tep_event_info(s, event, record);
}
void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s,
@@ -6754,9 +6754,9 @@ not_found:
}
/**
* pevent_alloc - create a pevent handle
* tep_alloc - create a pevent handle
*/
struct tep_handle *pevent_alloc(void)
struct tep_handle *tep_alloc(void)
{
struct tep_handle *pevent = calloc(1, sizeof(*pevent));
@@ -6811,10 +6811,10 @@ void pevent_free_format(struct event_format *event)
}
/**
* pevent_free - free a pevent handle
* tep_free - free a pevent handle
* @pevent: the pevent handle to free
*/
void pevent_free(struct tep_handle *pevent)
void tep_free(struct tep_handle *pevent)
{
struct cmdline_list *cmdlist, *cmdnext;
struct func_list *funclist, *funcnext;
@@ -6901,5 +6901,5 @@ void pevent_free(struct tep_handle *pevent)
void pevent_unref(struct tep_handle *pevent)
{
pevent_free(pevent);
tep_free(pevent);
}