Commit c60167c1 authored by Tzvetomir Stoyanov (VMware)'s avatar Tzvetomir Stoyanov (VMware) Committed by Arnaldo Carvalho de Melo

tools lib traceevent, perf tools: Rename pevent parse 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_parse_event, pevent_parse_format, pevent_parse_header_page
Signed-off-by: default avatarTzvetomir 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.469749700@goodmis.orgSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent af85cd19
...@@ -5930,7 +5930,7 @@ static void parse_header_field(const char *field, ...@@ -5930,7 +5930,7 @@ static void parse_header_field(const char *field,
} }
/** /**
* pevent_parse_header_page - parse the data stored in the header page * tep_parse_header_page - parse the data stored in the header page
* @pevent: the handle to the pevent * @pevent: the handle to the pevent
* @buf: the buffer storing the header page format string * @buf: the buffer storing the header page format string
* @size: the size of @buf * @size: the size of @buf
...@@ -5941,8 +5941,8 @@ static void parse_header_field(const char *field, ...@@ -5941,8 +5941,8 @@ static void parse_header_field(const char *field,
* *
* /sys/kernel/debug/tracing/events/header_page * /sys/kernel/debug/tracing/events/header_page
*/ */
int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size,
int long_size) int long_size)
{ {
int ignore; int ignore;
...@@ -6171,7 +6171,7 @@ __pevent_parse_event(struct tep_handle *pevent, ...@@ -6171,7 +6171,7 @@ __pevent_parse_event(struct tep_handle *pevent,
} }
/** /**
* pevent_parse_format - parse the event format * tep_parse_format - parse the event format
* @pevent: the handle to the pevent * @pevent: the handle to the pevent
* @eventp: returned format * @eventp: returned format
* @buf: the buffer storing the event format string * @buf: the buffer storing the event format string
...@@ -6185,16 +6185,16 @@ __pevent_parse_event(struct tep_handle *pevent, ...@@ -6185,16 +6185,16 @@ __pevent_parse_event(struct tep_handle *pevent,
* *
* /sys/kernel/debug/tracing/events/.../.../format * /sys/kernel/debug/tracing/events/.../.../format
*/ */
enum pevent_errno pevent_parse_format(struct tep_handle *pevent, enum pevent_errno tep_parse_format(struct tep_handle *pevent,
struct event_format **eventp, struct event_format **eventp,
const char *buf, const char *buf,
unsigned long size, const char *sys) unsigned long size, const char *sys)
{ {
return __pevent_parse_event(pevent, eventp, buf, size, sys); return __pevent_parse_event(pevent, eventp, buf, size, sys);
} }
/** /**
* pevent_parse_event - parse the event format * tep_parse_event - parse the event format
* @pevent: the handle to the pevent * @pevent: the handle to the pevent
* @buf: the buffer storing the event format string * @buf: the buffer storing the event format string
* @size: the size of @buf * @size: the size of @buf
...@@ -6207,8 +6207,8 @@ enum pevent_errno pevent_parse_format(struct tep_handle *pevent, ...@@ -6207,8 +6207,8 @@ enum pevent_errno pevent_parse_format(struct tep_handle *pevent,
* *
* /sys/kernel/debug/tracing/events/.../.../format * /sys/kernel/debug/tracing/events/.../.../format
*/ */
enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, enum pevent_errno tep_parse_event(struct tep_handle *pevent, const char *buf,
unsigned long size, const char *sys) unsigned long size, const char *sys)
{ {
struct event_format *event = NULL; struct event_format *event = NULL;
return __pevent_parse_event(pevent, &event, buf, size, sys); return __pevent_parse_event(pevent, &event, buf, size, sys);
......
...@@ -639,15 +639,15 @@ void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, ...@@ -639,15 +639,15 @@ void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s,
void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s,
struct tep_record *record, bool use_trace_clock); struct tep_record *record, bool use_trace_clock);
int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size,
int long_size); int long_size);
enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, enum pevent_errno tep_parse_event(struct tep_handle *pevent, const char *buf,
unsigned long size, const char *sys); unsigned long size, const char *sys);
enum pevent_errno pevent_parse_format(struct tep_handle *pevent, enum pevent_errno tep_parse_format(struct tep_handle *pevent,
struct event_format **eventp, struct event_format **eventp,
const char *buf, const char *buf,
unsigned long size, const char *sys); unsigned long size, const char *sys);
void pevent_free_format(struct event_format *event); void pevent_free_format(struct event_format *event);
void pevent_free_format_field(struct format_field *field); void pevent_free_format_field(struct format_field *field);
......
...@@ -180,13 +180,13 @@ void parse_saved_cmdline(struct tep_handle *pevent, ...@@ -180,13 +180,13 @@ void parse_saved_cmdline(struct tep_handle *pevent,
int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size) int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size)
{ {
return pevent_parse_event(pevent, buf, size, "ftrace"); return tep_parse_event(pevent, buf, size, "ftrace");
} }
int parse_event_file(struct tep_handle *pevent, int parse_event_file(struct tep_handle *pevent,
char *buf, unsigned long size, char *sys) char *buf, unsigned long size, char *sys)
{ {
return pevent_parse_event(pevent, buf, size, sys); return tep_parse_event(pevent, buf, size, sys);
} }
struct event_format *trace_find_next_event(struct tep_handle *pevent, struct event_format *trace_find_next_event(struct tep_handle *pevent,
......
...@@ -235,8 +235,8 @@ static int read_header_files(struct tep_handle *pevent) ...@@ -235,8 +235,8 @@ static int read_header_files(struct tep_handle *pevent)
return -1; return -1;
} }
if (!pevent_parse_header_page(pevent, header_page, size, if (!tep_parse_header_page(pevent, header_page, size,
pevent_get_long_size(pevent))) { pevent_get_long_size(pevent))) {
/* /*
* The commit field in the page is of type long, * The commit field in the page is of type long,
* use that instead, since it represents the kernel. * use that instead, since it represents the kernel.
......
...@@ -93,7 +93,7 @@ tp_format(const char *sys, const char *name) ...@@ -93,7 +93,7 @@ tp_format(const char *sys, const char *name)
if (err) if (err)
return ERR_PTR(err); return ERR_PTR(err);
pevent_parse_format(pevent, &event, data, size, sys); tep_parse_format(pevent, &event, data, size, sys);
free(data); free(data);
return event; return event;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment