]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tools lib traceevent: Add prefix tep_ to enum filter_trivial_type
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Wed, 19 Sep 2018 18:56:58 +0000 (14:56 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Sep 2018 20:30:46 +0000 (17:30 -0300)
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
enum filter_trivial_type and all its members.

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/20180919185725.076387655@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.h
tools/lib/traceevent/parse-filter.c

index 830147dc6b219166c7fcf8214cf99d6563bf019a..9c29a5f7aa397bba37619610d2c3906a40f16808 100644 (file)
@@ -905,10 +905,10 @@ struct tep_event_filter *tep_filter_alloc(struct tep_handle *pevent);
 #define FILTER_MISS            TEP_ERRNO__FILTER_MISS
 #define FILTER_MATCH           TEP_ERRNO__FILTER_MATCH
 
-enum filter_trivial_type {
-       FILTER_TRIVIAL_FALSE,
-       FILTER_TRIVIAL_TRUE,
-       FILTER_TRIVIAL_BOTH,
+enum tep_filter_trivial_type {
+       TEP_FILTER_TRIVIAL_FALSE,
+       TEP_FILTER_TRIVIAL_TRUE,
+       TEP_FILTER_TRIVIAL_BOTH,
 };
 
 enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter,
@@ -926,7 +926,7 @@ int tep_event_filtered(struct tep_event_filter *filter,
 void tep_filter_reset(struct tep_event_filter *filter);
 
 int tep_filter_clear_trivial(struct tep_event_filter *filter,
-                            enum filter_trivial_type type);
+                            enum tep_filter_trivial_type type);
 
 void tep_filter_free(struct tep_event_filter *filter);
 
@@ -937,12 +937,12 @@ int tep_filter_remove_event(struct tep_event_filter *filter,
 
 int tep_filter_event_has_trivial(struct tep_event_filter *filter,
                                 int event_id,
-                                enum filter_trivial_type type);
+                                enum tep_filter_trivial_type type);
 
 int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *source);
 
 int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source,
-                       enum filter_trivial_type type);
+                       enum tep_filter_trivial_type type);
 
 int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter *filter2);
 
index 875bfaf79771c8bbef5cacf57b3c84b839962671..d64b6128fa7d7a2be3a438027dc11378957dba47 100644 (file)
@@ -1534,7 +1534,7 @@ int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *sour
  *   events may have still been updated on error.
  */
 int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source,
-                      enum filter_trivial_type type)
+                      enum tep_filter_trivial_type type)
 {
        struct tep_handle *src_pevent;
        struct tep_handle *dest_pevent;
@@ -1556,8 +1556,8 @@ int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *s
                arg = filter_type->filter;
                if (arg->type != TEP_FILTER_ARG_BOOLEAN)
                        continue;
-               if ((arg->boolean.value && type == FILTER_TRIVIAL_FALSE) ||
-                   (!arg->boolean.value && type == FILTER_TRIVIAL_TRUE))
+               if ((arg->boolean.value && type == TEP_FILTER_TRIVIAL_FALSE) ||
+                   (!arg->boolean.value && type == TEP_FILTER_TRIVIAL_TRUE))
                        continue;
 
                event = filter_type->event;
@@ -1593,7 +1593,7 @@ int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *s
  * Returns 0 on success and -1 if there was a problem.
  */
 int tep_filter_clear_trivial(struct tep_event_filter *filter,
-                            enum filter_trivial_type type)
+                            enum tep_filter_trivial_type type)
 {
        struct tep_filter_type *filter_type;
        int count = 0;
@@ -1614,11 +1614,11 @@ int tep_filter_clear_trivial(struct tep_event_filter *filter,
                if (filter_type->filter->type != TEP_FILTER_ARG_BOOLEAN)
                        continue;
                switch (type) {
-               case FILTER_TRIVIAL_FALSE:
+               case TEP_FILTER_TRIVIAL_FALSE:
                        if (filter_type->filter->boolean.value)
                                continue;
                        break;
-               case FILTER_TRIVIAL_TRUE:
+               case TEP_FILTER_TRIVIAL_TRUE:
                        if (!filter_type->filter->boolean.value)
                                continue;
                default:
@@ -1656,7 +1656,7 @@ int tep_filter_clear_trivial(struct tep_event_filter *filter,
  */
 int tep_filter_event_has_trivial(struct tep_event_filter *filter,
                                 int event_id,
-                                enum filter_trivial_type type)
+                                enum tep_filter_trivial_type type)
 {
        struct tep_filter_type *filter_type;
 
@@ -1672,10 +1672,10 @@ int tep_filter_event_has_trivial(struct tep_event_filter *filter,
                return 0;
 
        switch (type) {
-       case FILTER_TRIVIAL_FALSE:
+       case TEP_FILTER_TRIVIAL_FALSE:
                return !filter_type->filter->boolean.value;
 
-       case FILTER_TRIVIAL_TRUE:
+       case TEP_FILTER_TRIVIAL_TRUE:
                return filter_type->filter->boolean.value;
        default:
                return 1;
@@ -2409,8 +2409,8 @@ int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter
                if (filter_type1->filter->type != filter_type2->filter->type)
                        break;
                switch (filter_type1->filter->type) {
-               case FILTER_TRIVIAL_FALSE:
-               case FILTER_TRIVIAL_TRUE:
+               case TEP_FILTER_TRIVIAL_FALSE:
+               case TEP_FILTER_TRIVIAL_TRUE:
                        /* trivial types just need the type compared */
                        continue;
                default: