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) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Yordan Karadzhov (VMware) <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
Tzvetomir Stoyanov (VMware) 2018-08-08 14:02:49 -04:00 • committed by Arnaldo Carvalho de Melo
commit 4d5c58b15c
7 changed files with 25 additions and 25 deletions

View file

@ -747,7 +747,7 @@ static int parse_gfp_flags(struct perf_evsel *evsel, struct perf_sample *sample,
}
trace_seq_init(&seq);
pevent_event_info(&seq, evsel->tp_format, &record);
tep_event_info(&seq, evsel->tp_format, &record);
str = strtok_r(seq.buffer, " ", &pos);
while (str) {

View file

@ -613,7 +613,7 @@ static char *get_trace_output(struct hist_entry *he)
pevent_print_fields(&seq, he->raw_data, he->raw_size,
evsel->tp_format);
} else {
pevent_event_info(&seq, evsel->tp_format, &rec);
tep_event_info(&seq, evsel->tp_format, &rec);
}
/*
* Trim the buffer, it starts at 4KB and we're not going to

View file

@ -125,7 +125,7 @@ void event_format__fprintf(struct event_format *event,
record.data = data;
trace_seq_init(&s);
pevent_event_info(&s, event, &record);
tep_event_info(&s, event, &record);
trace_seq_do_fprintf(&s, fp);
trace_seq_destroy(&s);
}

View file

@ -28,7 +28,7 @@ static bool tevent_initialized;
int trace_event__init(struct trace_event *t)
{
struct tep_handle *pevent = pevent_alloc();
struct tep_handle *pevent = tep_alloc();
if (pevent) {
t->plugin_list = traceevent_load_plugins(pevent);
@ -55,7 +55,7 @@ static int trace_event__init2(void)
}
int trace_event__register_resolver(struct machine *machine,
pevent_func_resolver_t *func)
tep_func_resolver_t *func)
{
if (!tevent_initialized && trace_event__init2())
return -1;
@ -66,7 +66,7 @@ int trace_event__register_resolver(struct machine *machine,
void trace_event__cleanup(struct trace_event *t)
{
traceevent_unload_plugins(t->plugin_list, t->pevent);
pevent_free(t->pevent);
tep_free(t->pevent);
}
/*

View file

@ -20,7 +20,7 @@ struct trace_event {
int trace_event__init(struct trace_event *t);
void trace_event__cleanup(struct trace_event *t);
int trace_event__register_resolver(struct machine *machine,
pevent_func_resolver_t *func);
tep_func_resolver_t *func);
struct event_format*
trace_event__tp_format(const char *sys, const char *name);