diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-09-19 14:56:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-09-19 16:30:46 -0400 |
commit | 035c450ffa0483e715fc7b14a2e8b744bf8a740a (patch) | |
tree | 8ecb57a3092d24e20f41e22f28c48f6816521e9f /tools/lib | |
parent | 1affd34f192a516436a2e0cec15a97bc1001678a (diff) |
tools lib traceevent: Add prefix tep_ to enum filter_trivial_type
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>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 14 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 22 |
2 files changed, 18 insertions, 18 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 830147dc6b21..9c29a5f7aa39 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -905,10 +905,10 @@ struct tep_event_filter *tep_filter_alloc(struct tep_handle *pevent); | |||
905 | #define FILTER_MISS TEP_ERRNO__FILTER_MISS | 905 | #define FILTER_MISS TEP_ERRNO__FILTER_MISS |
906 | #define FILTER_MATCH TEP_ERRNO__FILTER_MATCH | 906 | #define FILTER_MATCH TEP_ERRNO__FILTER_MATCH |
907 | 907 | ||
908 | enum filter_trivial_type { | 908 | enum tep_filter_trivial_type { |
909 | FILTER_TRIVIAL_FALSE, | 909 | TEP_FILTER_TRIVIAL_FALSE, |
910 | FILTER_TRIVIAL_TRUE, | 910 | TEP_FILTER_TRIVIAL_TRUE, |
911 | FILTER_TRIVIAL_BOTH, | 911 | TEP_FILTER_TRIVIAL_BOTH, |
912 | }; | 912 | }; |
913 | 913 | ||
914 | enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter, | 914 | 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, | |||
926 | void tep_filter_reset(struct tep_event_filter *filter); | 926 | void tep_filter_reset(struct tep_event_filter *filter); |
927 | 927 | ||
928 | int tep_filter_clear_trivial(struct tep_event_filter *filter, | 928 | int tep_filter_clear_trivial(struct tep_event_filter *filter, |
929 | enum filter_trivial_type type); | 929 | enum tep_filter_trivial_type type); |
930 | 930 | ||
931 | void tep_filter_free(struct tep_event_filter *filter); | 931 | void tep_filter_free(struct tep_event_filter *filter); |
932 | 932 | ||
@@ -937,12 +937,12 @@ int tep_filter_remove_event(struct tep_event_filter *filter, | |||
937 | 937 | ||
938 | int tep_filter_event_has_trivial(struct tep_event_filter *filter, | 938 | int tep_filter_event_has_trivial(struct tep_event_filter *filter, |
939 | int event_id, | 939 | int event_id, |
940 | enum filter_trivial_type type); | 940 | enum tep_filter_trivial_type type); |
941 | 941 | ||
942 | int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *source); | 942 | int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *source); |
943 | 943 | ||
944 | int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source, | 944 | int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source, |
945 | enum filter_trivial_type type); | 945 | enum tep_filter_trivial_type type); |
946 | 946 | ||
947 | int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter *filter2); | 947 | int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter *filter2); |
948 | 948 | ||
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index 875bfaf79771..d64b6128fa7d 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -1534,7 +1534,7 @@ int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *sour | |||
1534 | * events may have still been updated on error. | 1534 | * events may have still been updated on error. |
1535 | */ | 1535 | */ |
1536 | int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source, | 1536 | int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *source, |
1537 | enum filter_trivial_type type) | 1537 | enum tep_filter_trivial_type type) |
1538 | { | 1538 | { |
1539 | struct tep_handle *src_pevent; | 1539 | struct tep_handle *src_pevent; |
1540 | struct tep_handle *dest_pevent; | 1540 | struct tep_handle *dest_pevent; |
@@ -1556,8 +1556,8 @@ int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *s | |||
1556 | arg = filter_type->filter; | 1556 | arg = filter_type->filter; |
1557 | if (arg->type != TEP_FILTER_ARG_BOOLEAN) | 1557 | if (arg->type != TEP_FILTER_ARG_BOOLEAN) |
1558 | continue; | 1558 | continue; |
1559 | if ((arg->boolean.value && type == FILTER_TRIVIAL_FALSE) || | 1559 | if ((arg->boolean.value && type == TEP_FILTER_TRIVIAL_FALSE) || |
1560 | (!arg->boolean.value && type == FILTER_TRIVIAL_TRUE)) | 1560 | (!arg->boolean.value && type == TEP_FILTER_TRIVIAL_TRUE)) |
1561 | continue; | 1561 | continue; |
1562 | 1562 | ||
1563 | event = filter_type->event; | 1563 | event = filter_type->event; |
@@ -1593,7 +1593,7 @@ int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *s | |||
1593 | * Returns 0 on success and -1 if there was a problem. | 1593 | * Returns 0 on success and -1 if there was a problem. |
1594 | */ | 1594 | */ |
1595 | int tep_filter_clear_trivial(struct tep_event_filter *filter, | 1595 | int tep_filter_clear_trivial(struct tep_event_filter *filter, |
1596 | enum filter_trivial_type type) | 1596 | enum tep_filter_trivial_type type) |
1597 | { | 1597 | { |
1598 | struct tep_filter_type *filter_type; | 1598 | struct tep_filter_type *filter_type; |
1599 | int count = 0; | 1599 | int count = 0; |
@@ -1614,11 +1614,11 @@ int tep_filter_clear_trivial(struct tep_event_filter *filter, | |||
1614 | if (filter_type->filter->type != TEP_FILTER_ARG_BOOLEAN) | 1614 | if (filter_type->filter->type != TEP_FILTER_ARG_BOOLEAN) |
1615 | continue; | 1615 | continue; |
1616 | switch (type) { | 1616 | switch (type) { |
1617 | case FILTER_TRIVIAL_FALSE: | 1617 | case TEP_FILTER_TRIVIAL_FALSE: |
1618 | if (filter_type->filter->boolean.value) | 1618 | if (filter_type->filter->boolean.value) |
1619 | continue; | 1619 | continue; |
1620 | break; | 1620 | break; |
1621 | case FILTER_TRIVIAL_TRUE: | 1621 | case TEP_FILTER_TRIVIAL_TRUE: |
1622 | if (!filter_type->filter->boolean.value) | 1622 | if (!filter_type->filter->boolean.value) |
1623 | continue; | 1623 | continue; |
1624 | default: | 1624 | default: |
@@ -1656,7 +1656,7 @@ int tep_filter_clear_trivial(struct tep_event_filter *filter, | |||
1656 | */ | 1656 | */ |
1657 | int tep_filter_event_has_trivial(struct tep_event_filter *filter, | 1657 | int tep_filter_event_has_trivial(struct tep_event_filter *filter, |
1658 | int event_id, | 1658 | int event_id, |
1659 | enum filter_trivial_type type) | 1659 | enum tep_filter_trivial_type type) |
1660 | { | 1660 | { |
1661 | struct tep_filter_type *filter_type; | 1661 | struct tep_filter_type *filter_type; |
1662 | 1662 | ||
@@ -1672,10 +1672,10 @@ int tep_filter_event_has_trivial(struct tep_event_filter *filter, | |||
1672 | return 0; | 1672 | return 0; |
1673 | 1673 | ||
1674 | switch (type) { | 1674 | switch (type) { |
1675 | case FILTER_TRIVIAL_FALSE: | 1675 | case TEP_FILTER_TRIVIAL_FALSE: |
1676 | return !filter_type->filter->boolean.value; | 1676 | return !filter_type->filter->boolean.value; |
1677 | 1677 | ||
1678 | case FILTER_TRIVIAL_TRUE: | 1678 | case TEP_FILTER_TRIVIAL_TRUE: |
1679 | return filter_type->filter->boolean.value; | 1679 | return filter_type->filter->boolean.value; |
1680 | default: | 1680 | default: |
1681 | return 1; | 1681 | return 1; |
@@ -2409,8 +2409,8 @@ int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter | |||
2409 | if (filter_type1->filter->type != filter_type2->filter->type) | 2409 | if (filter_type1->filter->type != filter_type2->filter->type) |
2410 | break; | 2410 | break; |
2411 | switch (filter_type1->filter->type) { | 2411 | switch (filter_type1->filter->type) { |
2412 | case FILTER_TRIVIAL_FALSE: | 2412 | case TEP_FILTER_TRIVIAL_FALSE: |
2413 | case FILTER_TRIVIAL_TRUE: | 2413 | case TEP_FILTER_TRIVIAL_TRUE: |
2414 | /* trivial types just need the type compared */ | 2414 | /* trivial types just need the type compared */ |
2415 | continue; | 2415 | continue; |
2416 | default: | 2416 | default: |