aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2018-08-08 14:03:09 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-13 14:37:26 -0400
commit0ae98637b611c51737eadd9cc6e041746dbb11ef (patch)
treeb53f65693df24ab89ebb7bfc9249638def123eb0 /tools/lib/traceevent
parentc99eeaf5497288d4e0fbca7ee0c401fd35860481 (diff)
tools lib traceevent: Rename static variables and functions in event-parse.c
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 static variables and functions in event-parse.c: pevent_func_params, __pevent_parse_format, __pevent_parse_event, pevent_error_str, pevent_search_event 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.575392642@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')
-rw-r--r--tools/lib/traceevent/event-parse.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index f723c088acca..6313e32680ff 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -92,9 +92,9 @@ struct event_handler {
92 void *context; 92 void *context;
93}; 93};
94 94
95struct pevent_func_params { 95struct func_params {
96 struct pevent_func_params *next; 96 struct func_params *next;
97 enum tep_func_arg_type type; 97 enum tep_func_arg_type type;
98}; 98};
99 99
100struct tep_function_handler { 100struct tep_function_handler {
@@ -102,7 +102,7 @@ struct tep_function_handler {
102 enum tep_func_arg_type ret_type; 102 enum tep_func_arg_type ret_type;
103 char *name; 103 char *name;
104 tep_func_handler func; 104 tep_func_handler func;
105 struct pevent_func_params *params; 105 struct func_params *params;
106 int nr_args; 106 int nr_args;
107}; 107};
108 108
@@ -1161,7 +1161,7 @@ static enum event_type read_token(char **tok)
1161 * @tok: The token to return 1161 * @tok: The token to return
1162 * 1162 *
1163 * This will parse tokens from the string given by 1163 * This will parse tokens from the string given by
1164 * pevent_init_data(). 1164 * tep_init_data().
1165 * 1165 *
1166 * Returns the token type. 1166 * Returns the token type.
1167 */ 1167 */
@@ -4133,7 +4133,7 @@ process_defined_func(struct trace_seq *s, void *data, int size,
4133 struct event_format *event, struct print_arg *arg) 4133 struct event_format *event, struct print_arg *arg)
4134{ 4134{
4135 struct tep_function_handler *func_handle = arg->func.func; 4135 struct tep_function_handler *func_handle = arg->func.func;
4136 struct pevent_func_params *param; 4136 struct func_params *param;
4137 unsigned long long *args; 4137 unsigned long long *args;
4138 unsigned long long ret; 4138 unsigned long long ret;
4139 struct print_arg *farg; 4139 struct print_arg *farg;
@@ -6023,7 +6023,7 @@ static int find_event_handle(struct tep_handle *pevent, struct event_format *eve
6023} 6023}
6024 6024
6025/** 6025/**
6026 * __pevent_parse_format - parse the event format 6026 * __tep_parse_format - parse the event format
6027 * @buf: the buffer storing the event format string 6027 * @buf: the buffer storing the event format string
6028 * @size: the size of @buf 6028 * @size: the size of @buf
6029 * @sys: the system the event belongs to 6029 * @sys: the system the event belongs to
@@ -6035,9 +6035,9 @@ static int find_event_handle(struct tep_handle *pevent, struct event_format *eve
6035 * 6035 *
6036 * /sys/kernel/debug/tracing/events/.../.../format 6036 * /sys/kernel/debug/tracing/events/.../.../format
6037 */ 6037 */
6038enum tep_errno __pevent_parse_format(struct event_format **eventp, 6038enum tep_errno __tep_parse_format(struct event_format **eventp,
6039 struct tep_handle *pevent, const char *buf, 6039 struct tep_handle *pevent, const char *buf,
6040 unsigned long size, const char *sys) 6040 unsigned long size, const char *sys)
6041{ 6041{
6042 struct event_format *event; 6042 struct event_format *event;
6043 int ret; 6043 int ret;
@@ -6143,12 +6143,12 @@ enum tep_errno __pevent_parse_format(struct event_format **eventp,
6143} 6143}
6144 6144
6145static enum tep_errno 6145static enum tep_errno
6146__pevent_parse_event(struct tep_handle *pevent, 6146__parse_event(struct tep_handle *pevent,
6147 struct event_format **eventp, 6147 struct event_format **eventp,
6148 const char *buf, unsigned long size, 6148 const char *buf, unsigned long size,
6149 const char *sys) 6149 const char *sys)
6150{ 6150{
6151 int ret = __pevent_parse_format(eventp, pevent, buf, size, sys); 6151 int ret = __tep_parse_format(eventp, pevent, buf, size, sys);
6152 struct event_format *event = *eventp; 6152 struct event_format *event = *eventp;
6153 6153
6154 if (event == NULL) 6154 if (event == NULL)
@@ -6190,7 +6190,7 @@ enum tep_errno tep_parse_format(struct tep_handle *pevent,
6190 const char *buf, 6190 const char *buf,
6191 unsigned long size, const char *sys) 6191 unsigned long size, const char *sys)
6192{ 6192{
6193 return __pevent_parse_event(pevent, eventp, buf, size, sys); 6193 return __parse_event(pevent, eventp, buf, size, sys);
6194} 6194}
6195 6195
6196/** 6196/**
@@ -6211,12 +6211,12 @@ enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf,
6211 unsigned long size, const char *sys) 6211 unsigned long size, const char *sys)
6212{ 6212{
6213 struct event_format *event = NULL; 6213 struct event_format *event = NULL;
6214 return __pevent_parse_event(pevent, &event, buf, size, sys); 6214 return __parse_event(pevent, &event, buf, size, sys);
6215} 6215}
6216 6216
6217#undef _PE 6217#undef _PE
6218#define _PE(code, str) str 6218#define _PE(code, str) str
6219static const char * const pevent_error_str[] = { 6219static const char * const tep_error_str[] = {
6220 TEP_ERRORS 6220 TEP_ERRORS
6221}; 6221};
6222#undef _PE 6222#undef _PE
@@ -6237,7 +6237,7 @@ int tep_strerror(struct tep_handle *pevent __maybe_unused,
6237 return -1; 6237 return -1;
6238 6238
6239 idx = errnum - __TEP_ERRNO__START - 1; 6239 idx = errnum - __TEP_ERRNO__START - 1;
6240 msg = pevent_error_str[idx]; 6240 msg = tep_error_str[idx];
6241 snprintf(buf, buflen, "%s", msg); 6241 snprintf(buf, buflen, "%s", msg);
6242 6242
6243 return 0; 6243 return 0;
@@ -6463,7 +6463,7 @@ int tep_print_func_field(struct trace_seq *s, const char *fmt,
6463 6463
6464static void free_func_handle(struct tep_function_handler *func) 6464static void free_func_handle(struct tep_function_handler *func)
6465{ 6465{
6466 struct pevent_func_params *params; 6466 struct func_params *params;
6467 6467
6468 free(func->name); 6468 free(func->name);
6469 6469
@@ -6497,8 +6497,8 @@ int tep_register_print_function(struct tep_handle *pevent,
6497 char *name, ...) 6497 char *name, ...)
6498{ 6498{
6499 struct tep_function_handler *func_handle; 6499 struct tep_function_handler *func_handle;
6500 struct pevent_func_params **next_param; 6500 struct func_params **next_param;
6501 struct pevent_func_params *param; 6501 struct func_params *param;
6502 enum tep_func_arg_type type; 6502 enum tep_func_arg_type type;
6503 va_list ap; 6503 va_list ap;
6504 int ret; 6504 int ret;
@@ -6591,9 +6591,9 @@ int tep_unregister_print_function(struct tep_handle *pevent,
6591 return -1; 6591 return -1;
6592} 6592}
6593 6593
6594static struct event_format *pevent_search_event(struct tep_handle *pevent, int id, 6594static struct event_format *search_event(struct tep_handle *pevent, int id,
6595 const char *sys_name, 6595 const char *sys_name,
6596 const char *event_name) 6596 const char *event_name)
6597{ 6597{
6598 struct event_format *event; 6598 struct event_format *event;
6599 6599
@@ -6638,7 +6638,7 @@ int tep_register_event_handler(struct tep_handle *pevent, int id,
6638 struct event_format *event; 6638 struct event_format *event;
6639 struct event_handler *handle; 6639 struct event_handler *handle;
6640 6640
6641 event = pevent_search_event(pevent, id, sys_name, event_name); 6641 event = search_event(pevent, id, sys_name, event_name);
6642 if (event == NULL) 6642 if (event == NULL)
6643 goto not_found; 6643 goto not_found;
6644 6644
@@ -6723,7 +6723,7 @@ int tep_unregister_event_handler(struct tep_handle *pevent, int id,
6723 struct event_handler *handle; 6723 struct event_handler *handle;
6724 struct event_handler **next; 6724 struct event_handler **next;
6725 6725
6726 event = pevent_search_event(pevent, id, sys_name, event_name); 6726 event = search_event(pevent, id, sys_name, event_name);
6727 if (event == NULL) 6727 if (event == NULL)
6728 goto not_found; 6728 goto not_found;
6729 6729