All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for Tzvetomir Stoyanov (VMware)" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org,
	jolsa@redhat.com, rostedt@goodmis.org, tz.stoyanov@gmail.com,
	acme@redhat.com, akpm@linux-foundation.org, tglx@linutronix.de,
	namhyung@kernel.org
Subject: [tip:perf/core] tools lib traceevent: Add prefix TEP_ to all EVENT_FL_* flags
Date: Wed, 26 Sep 2018 01:47:52 -0700	[thread overview]
Message-ID: <tip-c1953bcc73115b5f1f7e8a45f124cf9f434494cd@git.kernel.org> (raw)
In-Reply-To: <20180919185723.116643250@goodmis.org>

Commit-ID:  c1953bcc73115b5f1f7e8a45f124cf9f434494cd
Gitweb:     https://git.kernel.org/tip/c1953bcc73115b5f1f7e8a45f124cf9f434494cd
Author:     Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
AuthorDate: Wed, 19 Sep 2018 14:56:48 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 19 Sep 2018 17:15:40 -0300

tools lib traceevent: Add prefix TEP_ to all EVENT_FL_* flags

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 adds prefix TEP_
to all members of nameless enum EVENT_FL_*

Signed-off-by: Tzvetomir 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/20180919185723.116643250@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c | 42 +++++++++++++++++++-------------------
 tools/lib/traceevent/event-parse.h | 18 ++++++++--------
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 1696dd9534bc..a651c3323f2c 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1382,7 +1382,7 @@ static int event_read_fields(struct tep_event_format *event, struct tep_format_f
 		 * The ftrace fields may still use the "special" name.
 		 * Just ignore it.
 		 */
-		if (event->flags & EVENT_FL_ISFTRACE &&
+		if (event->flags & TEP_EVENT_FL_ISFTRACE &&
 		    type == TEP_EVENT_ITEM && strcmp(token, "special") == 0) {
 			free_token(token);
 			type = read_token(&token);
@@ -1412,7 +1412,7 @@ static int event_read_fields(struct tep_event_format *event, struct tep_format_f
 			     * Some of the ftrace fields are broken and have
 			     * an illegal "." in them.
 			     */
-			    (event->flags & EVENT_FL_ISFTRACE &&
+			    (event->flags & TEP_EVENT_FL_ISFTRACE &&
 			     type == TEP_EVENT_OP && strcmp(token, ".") == 0)) {
 
 				if (strcmp(token, "*") == 0)
@@ -1963,7 +1963,7 @@ process_op(struct tep_event_format *event, struct print_arg *arg, char **tok)
 		arg->op.right = NULL;
 
 		if (set_op_prio(arg) == -1) {
-			event->flags |= EVENT_FL_FAILED;
+			event->flags |= TEP_EVENT_FL_FAILED;
 			/* arg->op.op (= token) will be freed at out_free */
 			arg->op.op = NULL;
 			goto out_free;
@@ -2042,7 +2042,7 @@ process_op(struct tep_event_format *event, struct print_arg *arg, char **tok)
 
 	} else {
 		do_warning_event(event, "unknown op '%s'", token);
-		event->flags |= EVENT_FL_FAILED;
+		event->flags |= TEP_EVENT_FL_FAILED;
 		/* the arg is now the left side */
 		goto out_free;
 	}
@@ -4884,13 +4884,13 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 	int len;
 	int ls;
 
-	if (event->flags & EVENT_FL_FAILED) {
+	if (event->flags & TEP_EVENT_FL_FAILED) {
 		trace_seq_printf(s, "[FAILED TO PARSE]");
 		tep_print_fields(s, data, size, event);
 		return;
 	}
 
-	if (event->flags & EVENT_FL_ISBPRINT) {
+	if (event->flags & TEP_EVENT_FL_ISBPRINT) {
 		bprint_fmt = get_bprint_format(data, size, event);
 		args = make_bprint_args(bprint_fmt, data, size, event);
 		arg = args;
@@ -4945,7 +4945,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 				/* The argument is the length. */
 				if (!arg) {
 					do_warning_event(event, "no argument match");
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 					goto out_failed;
 				}
 				len_arg = eval_num_arg(data, size, event, arg);
@@ -4998,7 +4998,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 			case 'u':
 				if (!arg) {
 					do_warning_event(event, "no argument match");
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 					goto out_failed;
 				}
 
@@ -5008,7 +5008,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 				/* should never happen */
 				if (len > 31) {
 					do_warning_event(event, "bad format!");
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 					len = 31;
 				}
 
@@ -5074,13 +5074,13 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 					break;
 				default:
 					do_warning_event(event, "bad count (%d)", ls);
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 				}
 				break;
 			case 's':
 				if (!arg) {
 					do_warning_event(event, "no matching argument");
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 					goto out_failed;
 				}
 
@@ -5090,7 +5090,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 				/* should never happen */
 				if (len > 31) {
 					do_warning_event(event, "bad format!");
-					event->flags |= EVENT_FL_FAILED;
+					event->flags |= TEP_EVENT_FL_FAILED;
 					len = 31;
 				}
 
@@ -5115,7 +5115,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e
 			trace_seq_putc(s, *ptr);
 	}
 
-	if (event->flags & EVENT_FL_FAILED) {
+	if (event->flags & TEP_EVENT_FL_FAILED) {
 out_failed:
 		trace_seq_printf(s, "[FAILED TO PARSE]");
 	}
@@ -5391,11 +5391,11 @@ void tep_event_info(struct trace_seq *s, struct tep_event_format *event,
 {
 	int print_pretty = 1;
 
-	if (event->pevent->print_raw || (event->flags & EVENT_FL_PRINTRAW))
+	if (event->pevent->print_raw || (event->flags & TEP_EVENT_FL_PRINTRAW))
 		tep_print_fields(s, record->data, record->size, event);
 	else {
 
-		if (event->handler && !(event->flags & EVENT_FL_NOHANDLE))
+		if (event->handler && !(event->flags & TEP_EVENT_FL_NOHANDLE))
 			print_pretty = event->handler(s, record, event,
 						      event->context);
 
@@ -6043,10 +6043,10 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp,
 	}
 
 	if (strcmp(sys, "ftrace") == 0) {
-		event->flags |= EVENT_FL_ISFTRACE;
+		event->flags |= TEP_EVENT_FL_ISFTRACE;
 
 		if (strcmp(event->name, "bprint") == 0)
-			event->flags |= EVENT_FL_ISBPRINT;
+			event->flags |= TEP_EVENT_FL_ISBPRINT;
 	}
 		
 	event->id = event_read_id();
@@ -6089,7 +6089,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp,
 		goto event_parse_failed;
 	}
 
-	if (!ret && (event->flags & EVENT_FL_ISFTRACE)) {
+	if (!ret && (event->flags & TEP_EVENT_FL_ISFTRACE)) {
 		struct tep_format_field *field;
 		struct print_arg *arg, **list;
 
@@ -6098,13 +6098,13 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp,
 		for (field = event->format.fields; field; field = field->next) {
 			arg = alloc_arg();
 			if (!arg) {
-				event->flags |= EVENT_FL_FAILED;
+				event->flags |= TEP_EVENT_FL_FAILED;
 				return TEP_ERRNO__OLD_FTRACE_ARG_FAILED;
 			}
 			arg->type = PRINT_FIELD;
 			arg->field.name = strdup(field->name);
 			if (!arg->field.name) {
-				event->flags |= EVENT_FL_FAILED;
+				event->flags |= TEP_EVENT_FL_FAILED;
 				free_arg(arg);
 				return TEP_ERRNO__OLD_FTRACE_ARG_FAILED;
 			}
@@ -6118,7 +6118,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp,
 	return 0;
 
  event_parse_failed:
-	event->flags |= EVENT_FL_FAILED;
+	event->flags |= TEP_EVENT_FL_FAILED;
 	return ret;
 
  event_alloc_failed:
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 10aaeda34c6b..b7798d91607e 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -290,15 +290,15 @@ struct tep_event_format {
 };
 
 enum {
-	EVENT_FL_ISFTRACE	= 0x01,
-	EVENT_FL_ISPRINT	= 0x02,
-	EVENT_FL_ISBPRINT	= 0x04,
-	EVENT_FL_ISFUNCENT	= 0x10,
-	EVENT_FL_ISFUNCRET	= 0x20,
-	EVENT_FL_NOHANDLE	= 0x40,
-	EVENT_FL_PRINTRAW	= 0x80,
-
-	EVENT_FL_FAILED		= 0x80000000
+	TEP_EVENT_FL_ISFTRACE	= 0x01,
+	TEP_EVENT_FL_ISPRINT	= 0x02,
+	TEP_EVENT_FL_ISBPRINT	= 0x04,
+	TEP_EVENT_FL_ISFUNCENT	= 0x10,
+	TEP_EVENT_FL_ISFUNCRET	= 0x20,
+	TEP_EVENT_FL_NOHANDLE	= 0x40,
+	TEP_EVENT_FL_PRINTRAW	= 0x80,
+
+	TEP_EVENT_FL_FAILED	= 0x80000000
 };
 
 enum tep_event_sort_type {

  reply	other threads:[~2018-09-26  8:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 18:56 [PATCH 00/15] tools/lib/traceevent: Namespace updates to make traceevent into a library Steven Rostedt
2018-09-19 18:56 ` [PATCH 01/15] tools/lib/traceevent, tools/perf: Rename struct event_format to struct tep_event_format Steven Rostedt
2018-09-26  8:45   ` [tip:perf/core] tools lib traceevent, perf tools: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 02/15] tools/lib/traceevent, tools/perf: Rename struct format{_field} to struct tep_format{_field} Steven Rostedt
2018-09-26  8:46   ` [tip:perf/core] tools lib traceevent, perf tools: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 03/15] tools/lib/traceevent, tools/perf: Rename enum format_flags to enum tep_format_flags Steven Rostedt
2018-09-26  8:46   ` [tip:perf/core] tools lib traceevent, perf tools: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 04/15] tools/lib/traceevent: Rename enum event_{sort_}type to enum tep_event_{sort_}type Steven Rostedt
2018-09-26  8:47   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 05/15] tools/lib/traceevent: Add prefix TEP_ to all EVENT_FL_* flags Steven Rostedt
2018-09-26  8:47   ` tip-bot for Tzvetomir Stoyanov (VMware) [this message]
2018-09-19 18:56 ` [PATCH 06/15] tools/lib/traceevent, tools/perf: Add prefix tep_ to all print_* structures Steven Rostedt
2018-09-26  8:48   ` [tip:perf/core] tools lib traceevent, perf tools: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 07/15] tools/lib/traceevent, tools/perf: Rename enum print_arg_type to enum tep_print_arg_type Steven Rostedt
2018-09-26  8:49   ` [tip:perf/core] tools lib traceevent, perf tools: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 08/15] tools/lib/traceevent: Add prefix tep_ to enums filter_{boolean,op,cmp}_type Steven Rostedt
2018-09-26  8:49   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 09/15] tools/lib/traceevent: Add prefix tep_ to enums filter_{exp,arg}_type Steven Rostedt
2018-09-26  8:50   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 10/15] tools/lib/traceevent: Add prefix tep_ to struct filter_{arg,value_type} Steven Rostedt
2018-09-26  8:50   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 11/15] tools/lib/traceevent: Add prefix tep_ to various structs filter_arg_* Steven Rostedt
2018-09-26  8:51   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 12/15] tools/lib/traceevent: Add prefix tep_ to structs filter_type and event_filter Steven Rostedt
2018-09-26  8:51   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 13/15] tools/lib/traceevent: Rename struct plugin_list to struct tep_plugin_list Steven Rostedt
2018-09-26  8:52   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 14/15] tools/lib/traceevent: Rename data2host*() APIs Steven Rostedt
2018-09-26  8:52   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-19 18:56 ` [PATCH 15/15] tools/lib/traceevent: Add prefix tep_ to enum filter_trivial_type Steven Rostedt
2018-09-26  8:53   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov (VMware)
2018-09-23 18:56 ` [PATCH 00/15] tools/lib/traceevent: Namespace updates to make traceevent into a library Jiri Olsa
2018-09-24  8:55   ` Steven Rostedt
2018-09-24 14:16     ` Arnaldo Carvalho de Melo
2018-09-24 15:19       ` Steven Rostedt
2018-09-24 15:21       ` Arnaldo Carvalho de Melo
2018-09-24 17:48     ` Jiri Olsa

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=tip-c1953bcc73115b5f1f7e8a45f124cf9f434494cd@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tz.stoyanov@gmail.com \
    /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.