All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
	"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Subject: [PATCH 14/14] tools/lib/traceevent: Rename struct plugin_list to struct tep_plugin_list
Date: Fri, 10 Aug 2018 16:17:32 +0300	[thread overview]
Message-ID: <20180810131732.24677-15-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20180810131732.24677-1-tz.stoyanov@gmail.com>

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: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 tools/lib/traceevent/event-parse.h  |  8 ++++----
 tools/lib/traceevent/event-plugin.c | 18 +++++++++---------
 tools/perf/util/trace-event.h       |  4 ++--
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 4b0ab69f6b3a..c8d911bed12a 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -431,12 +431,12 @@ enum tep_errno {
 };
 #undef _PE
 
-struct plugin_list;
+struct tep_plugin_list;
 
 #define INVALID_PLUGIN_LIST_OPTION	((char **)((unsigned long)-1))
 
-struct plugin_list *tep_load_plugins(struct tep_handle *pevent);
-void tep_unload_plugins(struct plugin_list *plugin_list,
+struct tep_plugin_list *tep_load_plugins(struct tep_handle *pevent);
+void tep_unload_plugins(struct tep_plugin_list *plugin_list,
 			struct tep_handle *pevent);
 char **tep_plugin_list_options(void);
 void tep_plugin_free_options_list(char **list);
@@ -445,7 +445,7 @@ int tep_plugin_add_options(const char *name,
 void tep_plugin_remove_options(struct tep_plugin_option *options);
 void tep_print_plugins(struct trace_seq *s,
 			const char *prefix, const char *suffix,
-			const struct plugin_list *list);
+			const struct tep_plugin_list *list);
 
 struct cmdline;
 struct cmdline_list;
diff --git a/tools/lib/traceevent/event-plugin.c b/tools/lib/traceevent/event-plugin.c
index 8e324ed46547..f6a9f9363c8d 100644
--- a/tools/lib/traceevent/event-plugin.c
+++ b/tools/lib/traceevent/event-plugin.c
@@ -44,8 +44,8 @@ static struct trace_plugin_options {
 	char				*value;
 } *trace_plugin_options;
 
-struct plugin_list {
-	struct plugin_list	*next;
+struct tep_plugin_list {
+	struct tep_plugin_list	*next;
 	char			*name;
 	void			*handle;
 };
@@ -272,7 +272,7 @@ void tep_plugin_remove_options(struct tep_plugin_option *options)
  */
 void tep_print_plugins(struct trace_seq *s,
 		       const char *prefix, const char *suffix,
-		       const struct plugin_list *list)
+		       const struct tep_plugin_list *list)
 {
 	while (list) {
 		trace_seq_printf(s, "%s%s%s", prefix, list->name, suffix);
@@ -284,9 +284,9 @@ static void
 load_plugin(struct tep_handle *pevent, const char *path,
 	    const char *file, void *data)
 {
-	struct plugin_list **plugin_list = data;
+	struct tep_plugin_list **plugin_list = data;
 	tep_plugin_load_func func;
-	struct plugin_list *list;
+	struct tep_plugin_list *list;
 	const char *alias;
 	char *plugin;
 	void *handle;
@@ -430,20 +430,20 @@ load_plugins(struct tep_handle *pevent, const char *suffix,
 	free(path);
 }
 
-struct plugin_list*
+struct tep_plugin_list*
 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);
 	return list;
 }
 
 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;
-	struct plugin_list *list;
+	struct tep_plugin_list *list;
 
 	while (plugin_list) {
 		list = plugin_list;
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index dfbe0db9212d..c47e0200688a 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -10,11 +10,11 @@ struct perf_sample;
 union perf_event;
 struct perf_tool;
 struct thread;
-struct plugin_list;
+struct tep_plugin_list;
 
 struct trace_event {
 	struct tep_handle	*pevent;
-	struct plugin_list	*plugin_list;
+	struct tep_plugin_list	*plugin_list;
 };
 
 int trace_event__init(struct trace_event *t);
-- 
2.17.1

      parent reply	other threads:[~2018-08-10 15:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 13:17 [PATCH 00/14] Rename variables, data structures and functions in libtraceevent Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 01/14] tools/lib/traceevent, tools/perf: Rename struct event_format to struct tep_event_format Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 02/14] tools/lib/traceevent, tools/perf: Rename struct format to struct tep_format and struct format_field to struct tep_format_field Tzvetomir Stoyanov (VMware)
2018-08-14 21:20   ` Steven Rostedt
2018-08-10 13:17 ` [PATCH 03/14] tools/lib/traceevent, tools/perf: Rename enum format_flags to enum tep_format_flags, add prefix TEP_ to all of its members Tzvetomir Stoyanov (VMware)
2018-08-14 21:22   ` Steven Rostedt
2018-08-10 13:17 ` [PATCH 04/14] tools/lib/traceevent: Rename enum event_type to enum tep_event_type, enum event_sort_type to enum tep_event_sort_type and add prefix TEP_ to all enum's members Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 05/14] tools/lib/traceevent: Add prefix TEP_ to all members of nameless enum EVENT_FL_* Tzvetomir Stoyanov (VMware)
2018-08-14 22:05   ` Steven Rostedt
2018-08-10 13:17 ` [PATCH 06/14] tools/lib/traceevent, tools/perf: Add prefix tep_ to all print_* structures Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 07/14] tools/lib/traceevent, tools/perf: Rename enum print_arg_type to enum tep_print_arg_type and add prefix TEP_ to all its members Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 08/14] tools/lib/traceevent: Add prefix tep_ to enums filter_boolean_type, filter_op_type, filter_cmp_type and all enum's members Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 09/14] tools/lib/traceevent: Add prefix tep_ to enums filter_exp_type, filter_arg_type " Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 10/14] tools/lib/traceevent: Add prefix tep_ to struct filter_arg, enum filter_value_type " Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 11/14] tools/lib/traceevent: Add prefix tep_ to various structs filter_arg_* Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 12/14] tools/lib/traceevent: Add prefix tep_ to structs filter_type and event_filter Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` [PATCH 13/14] tools/lib/traceevent: Add prefix tep_ to enum filter_trivial_type and all its members. Rename data2host*() APIs Tzvetomir Stoyanov (VMware)
2018-09-19  2:35   ` Steven Rostedt
2018-09-19  2:37     ` Steven Rostedt
2018-09-19 11:12       ` [PATCH 1/2] tools/lib/traceevent: " Tzvetomir Stoyanov (VMware)
2018-09-19 11:12         ` [PATCH 2/2] tools/lib/traceevent: Add prefix tep_ to enum filter_trivial_type and all its members Tzvetomir Stoyanov (VMware)
2018-08-10 13:17 ` Tzvetomir Stoyanov (VMware) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180810131732.24677-15-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.