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

tools lib traceevent: Rename struct plugin_list to struct tep_plugin_list

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_". This renames struct plugin_list
to struct tep_plugin_list
Signed-off-by: default avatarTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180919185724.586889128@goodmis.orgSigned-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9334c961
...@@ -389,12 +389,12 @@ enum tep_errno { ...@@ -389,12 +389,12 @@ enum tep_errno {
}; };
#undef _PE #undef _PE
struct plugin_list; struct tep_plugin_list;
#define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1))
struct plugin_list *tep_load_plugins(struct tep_handle *pevent); struct tep_plugin_list *tep_load_plugins(struct tep_handle *pevent);
void tep_unload_plugins(struct plugin_list *plugin_list, void tep_unload_plugins(struct tep_plugin_list *plugin_list,
struct tep_handle *pevent); struct tep_handle *pevent);
char **tep_plugin_list_options(void); char **tep_plugin_list_options(void);
void tep_plugin_free_options_list(char **list); void tep_plugin_free_options_list(char **list);
...@@ -403,7 +403,7 @@ int tep_plugin_add_options(const char *name, ...@@ -403,7 +403,7 @@ int tep_plugin_add_options(const char *name,
void tep_plugin_remove_options(struct tep_plugin_option *options); void tep_plugin_remove_options(struct tep_plugin_option *options);
void tep_print_plugins(struct trace_seq *s, void tep_print_plugins(struct trace_seq *s,
const char *prefix, const char *suffix, const char *prefix, const char *suffix,
const struct plugin_list *list); const struct tep_plugin_list *list);
struct cmdline; struct cmdline;
struct cmdline_list; struct cmdline_list;
......
...@@ -31,8 +31,8 @@ static struct trace_plugin_options { ...@@ -31,8 +31,8 @@ static struct trace_plugin_options {
char *value; char *value;
} *trace_plugin_options; } *trace_plugin_options;
struct plugin_list { struct tep_plugin_list {
struct plugin_list *next; struct tep_plugin_list *next;
char *name; char *name;
void *handle; void *handle;
}; };
...@@ -259,7 +259,7 @@ void tep_plugin_remove_options(struct tep_plugin_option *options) ...@@ -259,7 +259,7 @@ void tep_plugin_remove_options(struct tep_plugin_option *options)
*/ */
void tep_print_plugins(struct trace_seq *s, void tep_print_plugins(struct trace_seq *s,
const char *prefix, const char *suffix, const char *prefix, const char *suffix,
const struct plugin_list *list) const struct tep_plugin_list *list)
{ {
while (list) { while (list) {
trace_seq_printf(s, "%s%s%s", prefix, list->name, suffix); trace_seq_printf(s, "%s%s%s", prefix, list->name, suffix);
...@@ -271,9 +271,9 @@ static void ...@@ -271,9 +271,9 @@ static void
load_plugin(struct tep_handle *pevent, const char *path, load_plugin(struct tep_handle *pevent, const char *path,
const char *file, void *data) const char *file, void *data)
{ {
struct plugin_list **plugin_list = data; struct tep_plugin_list **plugin_list = data;
tep_plugin_load_func func; tep_plugin_load_func func;
struct plugin_list *list; struct tep_plugin_list *list;
const char *alias; const char *alias;
char *plugin; char *plugin;
void *handle; void *handle;
...@@ -417,20 +417,20 @@ load_plugins(struct tep_handle *pevent, const char *suffix, ...@@ -417,20 +417,20 @@ load_plugins(struct tep_handle *pevent, const char *suffix,
free(path); free(path);
} }
struct plugin_list* struct tep_plugin_list*
tep_load_plugins(struct tep_handle *pevent) tep_load_plugins(struct tep_handle *pevent)
{ {
struct plugin_list *list = NULL; struct tep_plugin_list *list = NULL;
load_plugins(pevent, ".so", load_plugin, &list); load_plugins(pevent, ".so", load_plugin, &list);
return list; return list;
} }
void void
tep_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *pevent)
{ {
tep_plugin_unload_func func; tep_plugin_unload_func func;
struct plugin_list *list; struct tep_plugin_list *list;
while (plugin_list) { while (plugin_list) {
list = plugin_list; list = plugin_list;
......
...@@ -11,11 +11,11 @@ struct perf_sample; ...@@ -11,11 +11,11 @@ struct perf_sample;
union perf_event; union perf_event;
struct perf_tool; struct perf_tool;
struct thread; struct thread;
struct plugin_list; struct tep_plugin_list;
struct trace_event { struct trace_event {
struct tep_handle *pevent; struct tep_handle *pevent;
struct plugin_list *plugin_list; struct tep_plugin_list *plugin_list;
}; };
int trace_event__init(struct trace_event *t); int trace_event__init(struct trace_event *t);
......
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