diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 21:03:04 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 21:30:30 +0300 |
commit | 8b3e08722ec8b288066eab66193736a65645c0a2 (patch) | |
tree | 17352f96c7899267da2c2ec0b34d3941317c199c /tools/lib/traceevent/event-parse.c | |
parent | dc05ebf373e9e66c27aae0d9059e5d4ac56f3be0 (diff) | |
download | linux-8b3e08722ec8b288066eab66193736a65645c0a2.tar.xz |
tools lib traceevent: Rename pevent field 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_free_format, pevent_free_format_field, pevent_get_field_raw,
pevent_get_field_val, pevent_get_common_field_val, pevent_get_any_field_val
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/20180808180702.821244942@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 | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 4f924bf42b92..652b8ef6f4c7 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -6166,7 +6166,7 @@ __pevent_parse_event(struct tep_handle *pevent, return 0; event_add_failed: - pevent_free_format(event); + tep_free_format(event); return ret; } @@ -6263,7 +6263,7 @@ int get_field_val(struct trace_seq *s, struct format_field *field, } /** - * pevent_get_field_raw - return the raw pointer into the data field + * tep_get_field_raw - return the raw pointer into the data field * @s: The seq to print to on error * @event: the event that the field is for * @name: The name of the field @@ -6276,9 +6276,9 @@ int get_field_val(struct trace_seq *s, struct format_field *field, * * On failure, it returns NULL. */ -void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, - const char *name, struct tep_record *record, - int *len, int err) +void *tep_get_field_raw(struct trace_seq *s, struct event_format *event, + const char *name, struct tep_record *record, + int *len, int err) { struct format_field *field; void *data = record->data; @@ -6313,7 +6313,7 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, } /** - * pevent_get_field_val - find a field and return its value + * tep_get_field_val - find a field and return its value * @s: The seq to print to on error * @event: the event that the field is for * @name: The name of the field @@ -6323,9 +6323,9 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, * * Returns 0 on success -1 on field not found. */ -int pevent_get_field_val(struct trace_seq *s, struct event_format *event, - const char *name, struct tep_record *record, - unsigned long long *val, int err) +int tep_get_field_val(struct trace_seq *s, struct event_format *event, + const char *name, struct tep_record *record, + unsigned long long *val, int err) { struct format_field *field; @@ -6338,7 +6338,7 @@ int pevent_get_field_val(struct trace_seq *s, struct event_format *event, } /** - * pevent_get_common_field_val - find a common field and return its value + * tep_get_common_field_val - find a common field and return its value * @s: The seq to print to on error * @event: the event that the field is for * @name: The name of the field @@ -6348,9 +6348,9 @@ int pevent_get_field_val(struct trace_seq *s, struct event_format *event, * * Returns 0 on success -1 on field not found. */ -int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, - const char *name, struct tep_record *record, - unsigned long long *val, int err) +int tep_get_common_field_val(struct trace_seq *s, struct event_format *event, + const char *name, struct tep_record *record, + unsigned long long *val, int err) { struct format_field *field; @@ -6363,7 +6363,7 @@ int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, } /** - * pevent_get_any_field_val - find a any field and return its value + * tep_get_any_field_val - find a any field and return its value * @s: The seq to print to on error * @event: the event that the field is for * @name: The name of the field @@ -6373,9 +6373,9 @@ int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event, * * Returns 0 on success -1 on field not found. */ -int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event, - const char *name, struct tep_record *record, - unsigned long long *val, int err) +int tep_get_any_field_val(struct trace_seq *s, struct event_format *event, + const char *name, struct tep_record *record, + unsigned long long *val, int err) { struct format_field *field; @@ -6771,7 +6771,7 @@ void pevent_ref(struct tep_handle *pevent) pevent->ref_count++; } -void pevent_free_format_field(struct format_field *field) +void tep_free_format_field(struct format_field *field) { free(field->type); if (field->alias != field->name) @@ -6786,7 +6786,7 @@ static void free_format_fields(struct format_field *field) while (field) { next = field->next; - pevent_free_format_field(field); + tep_free_format_field(field); field = next; } } @@ -6797,7 +6797,7 @@ static void free_formats(struct format *format) free_format_fields(format->fields); } -void pevent_free_format(struct event_format *event) +void tep_free_format(struct event_format *event) { free(event->name); free(event->system); @@ -6883,7 +6883,7 @@ void tep_free(struct tep_handle *pevent) } for (i = 0; i < pevent->nr_events; i++) - pevent_free_format(pevent->events[i]); + tep_free_format(pevent->events[i]); while (pevent->handlers) { handle = pevent->handlers; |