Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tzvetomir Stoyanov (VMware) and committed by
Arnaldo Carvalho de Melo
035c450f 1affd34f

+18 -18
+7 -7
tools/lib/traceevent/event-parse.h
··· 905 905 #define FILTER_MISS TEP_ERRNO__FILTER_MISS 906 906 #define FILTER_MATCH TEP_ERRNO__FILTER_MATCH 907 907 908 - enum filter_trivial_type { 909 - FILTER_TRIVIAL_FALSE, 910 - FILTER_TRIVIAL_TRUE, 911 - FILTER_TRIVIAL_BOTH, 908 + enum tep_filter_trivial_type { 909 + TEP_FILTER_TRIVIAL_FALSE, 910 + TEP_FILTER_TRIVIAL_TRUE, 911 + TEP_FILTER_TRIVIAL_BOTH, 912 912 }; 913 913 914 914 enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter, ··· 926 926 void tep_filter_reset(struct tep_event_filter *filter); 927 927 928 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 931 void tep_filter_free(struct tep_event_filter *filter); 932 932 ··· 937 937 938 938 int tep_filter_event_has_trivial(struct tep_event_filter *filter, 939 939 int event_id, 940 - enum filter_trivial_type type); 940 + enum tep_filter_trivial_type type); 941 941 942 942 int tep_filter_copy(struct tep_event_filter *dest, struct tep_event_filter *source); 943 943 944 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 947 int tep_filter_compare(struct tep_event_filter *filter1, struct tep_event_filter *filter2); 948 948
+11 -11
tools/lib/traceevent/parse-filter.c
··· 1534 1534 * events may have still been updated on error. 1535 1535 */ 1536 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 1539 struct tep_handle *src_pevent; 1540 1540 struct tep_handle *dest_pevent; ··· 1556 1556 arg = filter_type->filter; 1557 1557 if (arg->type != TEP_FILTER_ARG_BOOLEAN) 1558 1558 continue; 1559 - if ((arg->boolean.value && type == FILTER_TRIVIAL_FALSE) || 1560 - (!arg->boolean.value && type == FILTER_TRIVIAL_TRUE)) 1559 + if ((arg->boolean.value && type == TEP_FILTER_TRIVIAL_FALSE) || 1560 + (!arg->boolean.value && type == TEP_FILTER_TRIVIAL_TRUE)) 1561 1561 continue; 1562 1562 1563 1563 event = filter_type->event; ··· 1593 1593 * Returns 0 on success and -1 if there was a problem. 1594 1594 */ 1595 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 1598 struct tep_filter_type *filter_type; 1599 1599 int count = 0; ··· 1614 1614 if (filter_type->filter->type != TEP_FILTER_ARG_BOOLEAN) 1615 1615 continue; 1616 1616 switch (type) { 1617 - case FILTER_TRIVIAL_FALSE: 1617 + case TEP_FILTER_TRIVIAL_FALSE: 1618 1618 if (filter_type->filter->boolean.value) 1619 1619 continue; 1620 1620 break; 1621 - case FILTER_TRIVIAL_TRUE: 1621 + case TEP_FILTER_TRIVIAL_TRUE: 1622 1622 if (!filter_type->filter->boolean.value) 1623 1623 continue; 1624 1624 default: ··· 1656 1656 */ 1657 1657 int tep_filter_event_has_trivial(struct tep_event_filter *filter, 1658 1658 int event_id, 1659 - enum filter_trivial_type type) 1659 + enum tep_filter_trivial_type type) 1660 1660 { 1661 1661 struct tep_filter_type *filter_type; 1662 1662 ··· 1672 1672 return 0; 1673 1673 1674 1674 switch (type) { 1675 - case FILTER_TRIVIAL_FALSE: 1675 + case TEP_FILTER_TRIVIAL_FALSE: 1676 1676 return !filter_type->filter->boolean.value; 1677 1677 1678 - case FILTER_TRIVIAL_TRUE: 1678 + case TEP_FILTER_TRIVIAL_TRUE: 1679 1679 return filter_type->filter->boolean.value; 1680 1680 default: 1681 1681 return 1; ··· 2409 2409 if (filter_type1->filter->type != filter_type2->filter->type) 2410 2410 break; 2411 2411 switch (filter_type1->filter->type) { 2412 - case FILTER_TRIVIAL_FALSE: 2413 - case FILTER_TRIVIAL_TRUE: 2412 + case TEP_FILTER_TRIVIAL_FALSE: 2413 + case TEP_FILTER_TRIVIAL_TRUE: 2414 2414 /* trivial types just need the type compared */ 2415 2415 continue; 2416 2416 default: