diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-09-19 14:56:53 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-09-19 16:22:29 -0400 |
commit | 0515ca53caa681ad945fbea218e691e8637b4d7d (patch) | |
tree | 4c102e04494b07fab3652f86af2bfab9348f5ce5 /tools/lib/traceevent | |
parent | 4746d22a4c1b12993540924f8cca12a256646614 (diff) |
tools lib traceevent: Add prefix tep_ to struct filter_{arg,value_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
struct filter_arg, enum filter_value_type and all enum's 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/20180919185723.972818215@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/traceevent')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 28 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 120 |
2 files changed, 74 insertions, 74 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 5e55c83d43fe..64ce3eb0dcbc 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -819,13 +819,13 @@ enum tep_filter_arg_type { | |||
819 | TEP_FILTER_ARG_STR, | 819 | TEP_FILTER_ARG_STR, |
820 | }; | 820 | }; |
821 | 821 | ||
822 | enum filter_value_type { | 822 | enum tep_filter_value_type { |
823 | FILTER_NUMBER, | 823 | TEP_FILTER_NUMBER, |
824 | FILTER_STRING, | 824 | TEP_FILTER_STRING, |
825 | FILTER_CHAR | 825 | TEP_FILTER_CHAR |
826 | }; | 826 | }; |
827 | 827 | ||
828 | struct fliter_arg; | 828 | struct tep_filter_arg; |
829 | 829 | ||
830 | struct filter_arg_boolean { | 830 | struct filter_arg_boolean { |
831 | enum tep_filter_boolean_type value; | 831 | enum tep_filter_boolean_type value; |
@@ -836,7 +836,7 @@ struct filter_arg_field { | |||
836 | }; | 836 | }; |
837 | 837 | ||
838 | struct filter_arg_value { | 838 | struct filter_arg_value { |
839 | enum filter_value_type type; | 839 | enum tep_filter_value_type type; |
840 | union { | 840 | union { |
841 | char *str; | 841 | char *str; |
842 | unsigned long long val; | 842 | unsigned long long val; |
@@ -845,20 +845,20 @@ struct filter_arg_value { | |||
845 | 845 | ||
846 | struct filter_arg_op { | 846 | struct filter_arg_op { |
847 | enum tep_filter_op_type type; | 847 | enum tep_filter_op_type type; |
848 | struct filter_arg *left; | 848 | struct tep_filter_arg *left; |
849 | struct filter_arg *right; | 849 | struct tep_filter_arg *right; |
850 | }; | 850 | }; |
851 | 851 | ||
852 | struct filter_arg_exp { | 852 | struct filter_arg_exp { |
853 | enum tep_filter_exp_type type; | 853 | enum tep_filter_exp_type type; |
854 | struct filter_arg *left; | 854 | struct tep_filter_arg *left; |
855 | struct filter_arg *right; | 855 | struct tep_filter_arg *right; |
856 | }; | 856 | }; |
857 | 857 | ||
858 | struct filter_arg_num { | 858 | struct filter_arg_num { |
859 | enum tep_filter_cmp_type type; | 859 | enum tep_filter_cmp_type type; |
860 | struct filter_arg *left; | 860 | struct tep_filter_arg *left; |
861 | struct filter_arg *right; | 861 | struct tep_filter_arg *right; |
862 | }; | 862 | }; |
863 | 863 | ||
864 | struct filter_arg_str { | 864 | struct filter_arg_str { |
@@ -869,7 +869,7 @@ struct filter_arg_str { | |||
869 | regex_t reg; | 869 | regex_t reg; |
870 | }; | 870 | }; |
871 | 871 | ||
872 | struct filter_arg { | 872 | struct tep_filter_arg { |
873 | enum tep_filter_arg_type type; | 873 | enum tep_filter_arg_type type; |
874 | union { | 874 | union { |
875 | struct filter_arg_boolean boolean; | 875 | struct filter_arg_boolean boolean; |
@@ -885,7 +885,7 @@ struct filter_arg { | |||
885 | struct filter_type { | 885 | struct filter_type { |
886 | int event_id; | 886 | int event_id; |
887 | struct tep_event_format *event; | 887 | struct tep_event_format *event; |
888 | struct filter_arg *filter; | 888 | struct tep_filter_arg *filter; |
889 | }; | 889 | }; |
890 | 890 | ||
891 | #define TEP_FILTER_ERROR_BUFSZ 1024 | 891 | #define TEP_FILTER_ERROR_BUFSZ 1024 |
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index d1e0dd5b63ea..b9ca1b9e14e4 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -180,12 +180,12 @@ struct event_filter *tep_filter_alloc(struct tep_handle *pevent) | |||
180 | return filter; | 180 | return filter; |
181 | } | 181 | } |
182 | 182 | ||
183 | static struct filter_arg *allocate_arg(void) | 183 | static struct tep_filter_arg *allocate_arg(void) |
184 | { | 184 | { |
185 | return calloc(1, sizeof(struct filter_arg)); | 185 | return calloc(1, sizeof(struct tep_filter_arg)); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void free_arg(struct filter_arg *arg) | 188 | static void free_arg(struct tep_filter_arg *arg) |
189 | { | 189 | { |
190 | if (!arg) | 190 | if (!arg) |
191 | return; | 191 | return; |
@@ -212,8 +212,8 @@ static void free_arg(struct filter_arg *arg) | |||
212 | break; | 212 | break; |
213 | 213 | ||
214 | case TEP_FILTER_ARG_VALUE: | 214 | case TEP_FILTER_ARG_VALUE: |
215 | if (arg->value.type == FILTER_STRING || | 215 | if (arg->value.type == TEP_FILTER_STRING || |
216 | arg->value.type == FILTER_CHAR) | 216 | arg->value.type == TEP_FILTER_CHAR) |
217 | free(arg->value.str); | 217 | free(arg->value.str); |
218 | break; | 218 | break; |
219 | 219 | ||
@@ -334,10 +334,10 @@ static void free_events(struct event_list *events) | |||
334 | 334 | ||
335 | static enum tep_errno | 335 | static enum tep_errno |
336 | create_arg_item(struct tep_event_format *event, const char *token, | 336 | create_arg_item(struct tep_event_format *event, const char *token, |
337 | enum tep_event_type type, struct filter_arg **parg, char *error_str) | 337 | enum tep_event_type type, struct tep_filter_arg **parg, char *error_str) |
338 | { | 338 | { |
339 | struct tep_format_field *field; | 339 | struct tep_format_field *field; |
340 | struct filter_arg *arg; | 340 | struct tep_filter_arg *arg; |
341 | 341 | ||
342 | arg = allocate_arg(); | 342 | arg = allocate_arg(); |
343 | if (arg == NULL) { | 343 | if (arg == NULL) { |
@@ -351,7 +351,7 @@ create_arg_item(struct tep_event_format *event, const char *token, | |||
351 | case TEP_EVENT_DQUOTE: | 351 | case TEP_EVENT_DQUOTE: |
352 | arg->type = TEP_FILTER_ARG_VALUE; | 352 | arg->type = TEP_FILTER_ARG_VALUE; |
353 | arg->value.type = | 353 | arg->value.type = |
354 | type == TEP_EVENT_DQUOTE ? FILTER_STRING : FILTER_CHAR; | 354 | type == TEP_EVENT_DQUOTE ? TEP_FILTER_STRING : TEP_FILTER_CHAR; |
355 | arg->value.str = strdup(token); | 355 | arg->value.str = strdup(token); |
356 | if (!arg->value.str) { | 356 | if (!arg->value.str) { |
357 | free_arg(arg); | 357 | free_arg(arg); |
@@ -363,7 +363,7 @@ create_arg_item(struct tep_event_format *event, const char *token, | |||
363 | /* if it is a number, then convert it */ | 363 | /* if it is a number, then convert it */ |
364 | if (isdigit(token[0])) { | 364 | if (isdigit(token[0])) { |
365 | arg->type = TEP_FILTER_ARG_VALUE; | 365 | arg->type = TEP_FILTER_ARG_VALUE; |
366 | arg->value.type = FILTER_NUMBER; | 366 | arg->value.type = TEP_FILTER_NUMBER; |
367 | arg->value.val = strtoull(token, NULL, 0); | 367 | arg->value.val = strtoull(token, NULL, 0); |
368 | break; | 368 | break; |
369 | } | 369 | } |
@@ -394,10 +394,10 @@ create_arg_item(struct tep_event_format *event, const char *token, | |||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | 396 | ||
397 | static struct filter_arg * | 397 | static struct tep_filter_arg * |
398 | create_arg_op(enum tep_filter_op_type btype) | 398 | create_arg_op(enum tep_filter_op_type btype) |
399 | { | 399 | { |
400 | struct filter_arg *arg; | 400 | struct tep_filter_arg *arg; |
401 | 401 | ||
402 | arg = allocate_arg(); | 402 | arg = allocate_arg(); |
403 | if (!arg) | 403 | if (!arg) |
@@ -409,10 +409,10 @@ create_arg_op(enum tep_filter_op_type btype) | |||
409 | return arg; | 409 | return arg; |
410 | } | 410 | } |
411 | 411 | ||
412 | static struct filter_arg * | 412 | static struct tep_filter_arg * |
413 | create_arg_exp(enum tep_filter_exp_type etype) | 413 | create_arg_exp(enum tep_filter_exp_type etype) |
414 | { | 414 | { |
415 | struct filter_arg *arg; | 415 | struct tep_filter_arg *arg; |
416 | 416 | ||
417 | arg = allocate_arg(); | 417 | arg = allocate_arg(); |
418 | if (!arg) | 418 | if (!arg) |
@@ -424,10 +424,10 @@ create_arg_exp(enum tep_filter_exp_type etype) | |||
424 | return arg; | 424 | return arg; |
425 | } | 425 | } |
426 | 426 | ||
427 | static struct filter_arg * | 427 | static struct tep_filter_arg * |
428 | create_arg_cmp(enum tep_filter_cmp_type ctype) | 428 | create_arg_cmp(enum tep_filter_cmp_type ctype) |
429 | { | 429 | { |
430 | struct filter_arg *arg; | 430 | struct tep_filter_arg *arg; |
431 | 431 | ||
432 | arg = allocate_arg(); | 432 | arg = allocate_arg(); |
433 | if (!arg) | 433 | if (!arg) |
@@ -441,9 +441,9 @@ create_arg_cmp(enum tep_filter_cmp_type ctype) | |||
441 | } | 441 | } |
442 | 442 | ||
443 | static enum tep_errno | 443 | static enum tep_errno |
444 | add_right(struct filter_arg *op, struct filter_arg *arg, char *error_str) | 444 | add_right(struct tep_filter_arg *op, struct tep_filter_arg *arg, char *error_str) |
445 | { | 445 | { |
446 | struct filter_arg *left; | 446 | struct tep_filter_arg *left; |
447 | char *str; | 447 | char *str; |
448 | int op_type; | 448 | int op_type; |
449 | int ret; | 449 | int ret; |
@@ -481,7 +481,7 @@ add_right(struct filter_arg *op, struct filter_arg *arg, char *error_str) | |||
481 | * convert this to a string or regex. | 481 | * convert this to a string or regex. |
482 | */ | 482 | */ |
483 | switch (arg->value.type) { | 483 | switch (arg->value.type) { |
484 | case FILTER_CHAR: | 484 | case TEP_FILTER_CHAR: |
485 | /* | 485 | /* |
486 | * A char should be converted to number if | 486 | * A char should be converted to number if |
487 | * the string is 1 byte, and the compare | 487 | * the string is 1 byte, and the compare |
@@ -490,11 +490,11 @@ add_right(struct filter_arg *op, struct filter_arg *arg, char *error_str) | |||
490 | if (strlen(arg->value.str) == 1 && | 490 | if (strlen(arg->value.str) == 1 && |
491 | op->num.type != TEP_FILTER_CMP_REGEX && | 491 | op->num.type != TEP_FILTER_CMP_REGEX && |
492 | op->num.type != TEP_FILTER_CMP_NOT_REGEX) { | 492 | op->num.type != TEP_FILTER_CMP_NOT_REGEX) { |
493 | arg->value.type = FILTER_NUMBER; | 493 | arg->value.type = TEP_FILTER_NUMBER; |
494 | goto do_int; | 494 | goto do_int; |
495 | } | 495 | } |
496 | /* fall through */ | 496 | /* fall through */ |
497 | case FILTER_STRING: | 497 | case TEP_FILTER_STRING: |
498 | 498 | ||
499 | /* convert op to a string arg */ | 499 | /* convert op to a string arg */ |
500 | op_type = op->num.type; | 500 | op_type = op->num.type; |
@@ -573,7 +573,7 @@ add_right(struct filter_arg *op, struct filter_arg *arg, char *error_str) | |||
573 | 573 | ||
574 | break; | 574 | break; |
575 | 575 | ||
576 | case FILTER_NUMBER: | 576 | case TEP_FILTER_NUMBER: |
577 | 577 | ||
578 | do_int: | 578 | do_int: |
579 | switch (op->num.type) { | 579 | switch (op->num.type) { |
@@ -605,17 +605,17 @@ add_right(struct filter_arg *op, struct filter_arg *arg, char *error_str) | |||
605 | return TEP_ERRNO__SYNTAX_ERROR; | 605 | return TEP_ERRNO__SYNTAX_ERROR; |
606 | } | 606 | } |
607 | 607 | ||
608 | static struct filter_arg * | 608 | static struct tep_filter_arg * |
609 | rotate_op_right(struct filter_arg *a, struct filter_arg *b) | 609 | rotate_op_right(struct tep_filter_arg *a, struct tep_filter_arg *b) |
610 | { | 610 | { |
611 | struct filter_arg *arg; | 611 | struct tep_filter_arg *arg; |
612 | 612 | ||
613 | arg = a->op.right; | 613 | arg = a->op.right; |
614 | a->op.right = b; | 614 | a->op.right = b; |
615 | return arg; | 615 | return arg; |
616 | } | 616 | } |
617 | 617 | ||
618 | static enum tep_errno add_left(struct filter_arg *op, struct filter_arg *arg) | 618 | static enum tep_errno add_left(struct tep_filter_arg *op, struct tep_filter_arg *arg) |
619 | { | 619 | { |
620 | switch (op->type) { | 620 | switch (op->type) { |
621 | case TEP_FILTER_ARG_EXP: | 621 | case TEP_FILTER_ARG_EXP: |
@@ -720,7 +720,7 @@ static enum op_type process_op(const char *token, | |||
720 | return OP_CMP; | 720 | return OP_CMP; |
721 | } | 721 | } |
722 | 722 | ||
723 | static int check_op_done(struct filter_arg *arg) | 723 | static int check_op_done(struct tep_filter_arg *arg) |
724 | { | 724 | { |
725 | switch (arg->type) { | 725 | switch (arg->type) { |
726 | case TEP_FILTER_ARG_EXP: | 726 | case TEP_FILTER_ARG_EXP: |
@@ -752,11 +752,11 @@ enum filter_vals { | |||
752 | }; | 752 | }; |
753 | 753 | ||
754 | static enum tep_errno | 754 | static enum tep_errno |
755 | reparent_op_arg(struct filter_arg *parent, struct filter_arg *old_child, | 755 | reparent_op_arg(struct tep_filter_arg *parent, struct tep_filter_arg *old_child, |
756 | struct filter_arg *arg, char *error_str) | 756 | struct tep_filter_arg *arg, char *error_str) |
757 | { | 757 | { |
758 | struct filter_arg *other_child; | 758 | struct tep_filter_arg *other_child; |
759 | struct filter_arg **ptr; | 759 | struct tep_filter_arg **ptr; |
760 | 760 | ||
761 | if (parent->type != TEP_FILTER_ARG_OP && | 761 | if (parent->type != TEP_FILTER_ARG_OP && |
762 | arg->type != TEP_FILTER_ARG_OP) { | 762 | arg->type != TEP_FILTER_ARG_OP) { |
@@ -804,7 +804,7 @@ reparent_op_arg(struct filter_arg *parent, struct filter_arg *old_child, | |||
804 | } | 804 | } |
805 | 805 | ||
806 | /* Returns either filter_vals (success) or tep_errno (failfure) */ | 806 | /* Returns either filter_vals (success) or tep_errno (failfure) */ |
807 | static int test_arg(struct filter_arg *parent, struct filter_arg *arg, | 807 | static int test_arg(struct tep_filter_arg *parent, struct tep_filter_arg *arg, |
808 | char *error_str) | 808 | char *error_str) |
809 | { | 809 | { |
810 | int lval, rval; | 810 | int lval, rval; |
@@ -904,8 +904,8 @@ static int test_arg(struct filter_arg *parent, struct filter_arg *arg, | |||
904 | } | 904 | } |
905 | 905 | ||
906 | /* Remove any unknown event fields */ | 906 | /* Remove any unknown event fields */ |
907 | static int collapse_tree(struct filter_arg *arg, | 907 | static int collapse_tree(struct tep_filter_arg *arg, |
908 | struct filter_arg **arg_collapsed, char *error_str) | 908 | struct tep_filter_arg **arg_collapsed, char *error_str) |
909 | { | 909 | { |
910 | int ret; | 910 | int ret; |
911 | 911 | ||
@@ -939,15 +939,15 @@ static int collapse_tree(struct filter_arg *arg, | |||
939 | } | 939 | } |
940 | 940 | ||
941 | static enum tep_errno | 941 | static enum tep_errno |
942 | process_filter(struct tep_event_format *event, struct filter_arg **parg, | 942 | process_filter(struct tep_event_format *event, struct tep_filter_arg **parg, |
943 | char *error_str, int not) | 943 | char *error_str, int not) |
944 | { | 944 | { |
945 | enum tep_event_type type; | 945 | enum tep_event_type type; |
946 | char *token = NULL; | 946 | char *token = NULL; |
947 | struct filter_arg *current_op = NULL; | 947 | struct tep_filter_arg *current_op = NULL; |
948 | struct filter_arg *current_exp = NULL; | 948 | struct tep_filter_arg *current_exp = NULL; |
949 | struct filter_arg *left_item = NULL; | 949 | struct tep_filter_arg *left_item = NULL; |
950 | struct filter_arg *arg = NULL; | 950 | struct tep_filter_arg *arg = NULL; |
951 | enum op_type op_type; | 951 | enum op_type op_type; |
952 | enum tep_filter_op_type btype; | 952 | enum tep_filter_op_type btype; |
953 | enum tep_filter_exp_type etype; | 953 | enum tep_filter_exp_type etype; |
@@ -1180,7 +1180,7 @@ process_filter(struct tep_event_format *event, struct filter_arg **parg, | |||
1180 | 1180 | ||
1181 | static enum tep_errno | 1181 | static enum tep_errno |
1182 | process_event(struct tep_event_format *event, const char *filter_str, | 1182 | process_event(struct tep_event_format *event, const char *filter_str, |
1183 | struct filter_arg **parg, char *error_str) | 1183 | struct tep_filter_arg **parg, char *error_str) |
1184 | { | 1184 | { |
1185 | int ret; | 1185 | int ret; |
1186 | 1186 | ||
@@ -1208,7 +1208,7 @@ filter_event(struct event_filter *filter, struct tep_event_format *event, | |||
1208 | const char *filter_str, char *error_str) | 1208 | const char *filter_str, char *error_str) |
1209 | { | 1209 | { |
1210 | struct filter_type *filter_type; | 1210 | struct filter_type *filter_type; |
1211 | struct filter_arg *arg; | 1211 | struct tep_filter_arg *arg; |
1212 | enum tep_errno ret; | 1212 | enum tep_errno ret; |
1213 | 1213 | ||
1214 | if (filter_str) { | 1214 | if (filter_str) { |
@@ -1449,13 +1449,13 @@ void tep_filter_free(struct event_filter *filter) | |||
1449 | free(filter); | 1449 | free(filter); |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | static char *arg_to_str(struct event_filter *filter, struct filter_arg *arg); | 1452 | static char *arg_to_str(struct event_filter *filter, struct tep_filter_arg *arg); |
1453 | 1453 | ||
1454 | static int copy_filter_type(struct event_filter *filter, | 1454 | static int copy_filter_type(struct event_filter *filter, |
1455 | struct event_filter *source, | 1455 | struct event_filter *source, |
1456 | struct filter_type *filter_type) | 1456 | struct filter_type *filter_type) |
1457 | { | 1457 | { |
1458 | struct filter_arg *arg; | 1458 | struct tep_filter_arg *arg; |
1459 | struct tep_event_format *event; | 1459 | struct tep_event_format *event; |
1460 | const char *sys; | 1460 | const char *sys; |
1461 | const char *name; | 1461 | const char *name; |
@@ -1540,7 +1540,7 @@ int tep_update_trivial(struct event_filter *dest, struct event_filter *source, | |||
1540 | struct tep_handle *dest_pevent; | 1540 | struct tep_handle *dest_pevent; |
1541 | struct tep_event_format *event; | 1541 | struct tep_event_format *event; |
1542 | struct filter_type *filter_type; | 1542 | struct filter_type *filter_type; |
1543 | struct filter_arg *arg; | 1543 | struct tep_filter_arg *arg; |
1544 | char *str; | 1544 | char *str; |
1545 | int i; | 1545 | int i; |
1546 | 1546 | ||
@@ -1682,7 +1682,7 @@ int tep_filter_event_has_trivial(struct event_filter *filter, | |||
1682 | } | 1682 | } |
1683 | } | 1683 | } |
1684 | 1684 | ||
1685 | static int test_filter(struct tep_event_format *event, struct filter_arg *arg, | 1685 | static int test_filter(struct tep_event_format *event, struct tep_filter_arg *arg, |
1686 | struct tep_record *record, enum tep_errno *err); | 1686 | struct tep_record *record, enum tep_errno *err); |
1687 | 1687 | ||
1688 | static const char * | 1688 | static const char * |
@@ -1733,11 +1733,11 @@ get_value(struct tep_event_format *event, | |||
1733 | } | 1733 | } |
1734 | 1734 | ||
1735 | static unsigned long long | 1735 | static unsigned long long |
1736 | get_arg_value(struct tep_event_format *event, struct filter_arg *arg, | 1736 | get_arg_value(struct tep_event_format *event, struct tep_filter_arg *arg, |
1737 | struct tep_record *record, enum tep_errno *err); | 1737 | struct tep_record *record, enum tep_errno *err); |
1738 | 1738 | ||
1739 | static unsigned long long | 1739 | static unsigned long long |
1740 | get_exp_value(struct tep_event_format *event, struct filter_arg *arg, | 1740 | get_exp_value(struct tep_event_format *event, struct tep_filter_arg *arg, |
1741 | struct tep_record *record, enum tep_errno *err) | 1741 | struct tep_record *record, enum tep_errno *err) |
1742 | { | 1742 | { |
1743 | unsigned long long lval, rval; | 1743 | unsigned long long lval, rval; |
@@ -1792,7 +1792,7 @@ get_exp_value(struct tep_event_format *event, struct filter_arg *arg, | |||
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | static unsigned long long | 1794 | static unsigned long long |
1795 | get_arg_value(struct tep_event_format *event, struct filter_arg *arg, | 1795 | get_arg_value(struct tep_event_format *event, struct tep_filter_arg *arg, |
1796 | struct tep_record *record, enum tep_errno *err) | 1796 | struct tep_record *record, enum tep_errno *err) |
1797 | { | 1797 | { |
1798 | switch (arg->type) { | 1798 | switch (arg->type) { |
@@ -1800,7 +1800,7 @@ get_arg_value(struct tep_event_format *event, struct filter_arg *arg, | |||
1800 | return get_value(event, arg->field.field, record); | 1800 | return get_value(event, arg->field.field, record); |
1801 | 1801 | ||
1802 | case TEP_FILTER_ARG_VALUE: | 1802 | case TEP_FILTER_ARG_VALUE: |
1803 | if (arg->value.type != FILTER_NUMBER) { | 1803 | if (arg->value.type != TEP_FILTER_NUMBER) { |
1804 | if (!*err) | 1804 | if (!*err) |
1805 | *err = TEP_ERRNO__NOT_A_NUMBER; | 1805 | *err = TEP_ERRNO__NOT_A_NUMBER; |
1806 | } | 1806 | } |
@@ -1816,7 +1816,7 @@ get_arg_value(struct tep_event_format *event, struct filter_arg *arg, | |||
1816 | return 0; | 1816 | return 0; |
1817 | } | 1817 | } |
1818 | 1818 | ||
1819 | static int test_num(struct tep_event_format *event, struct filter_arg *arg, | 1819 | static int test_num(struct tep_event_format *event, struct tep_filter_arg *arg, |
1820 | struct tep_record *record, enum tep_errno *err) | 1820 | struct tep_record *record, enum tep_errno *err) |
1821 | { | 1821 | { |
1822 | unsigned long long lval, rval; | 1822 | unsigned long long lval, rval; |
@@ -1857,7 +1857,7 @@ static int test_num(struct tep_event_format *event, struct filter_arg *arg, | |||
1857 | } | 1857 | } |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | static const char *get_field_str(struct filter_arg *arg, struct tep_record *record) | 1860 | static const char *get_field_str(struct tep_filter_arg *arg, struct tep_record *record) |
1861 | { | 1861 | { |
1862 | struct tep_event_format *event; | 1862 | struct tep_event_format *event; |
1863 | struct tep_handle *pevent; | 1863 | struct tep_handle *pevent; |
@@ -1907,7 +1907,7 @@ static const char *get_field_str(struct filter_arg *arg, struct tep_record *reco | |||
1907 | return val; | 1907 | return val; |
1908 | } | 1908 | } |
1909 | 1909 | ||
1910 | static int test_str(struct tep_event_format *event, struct filter_arg *arg, | 1910 | static int test_str(struct tep_event_format *event, struct tep_filter_arg *arg, |
1911 | struct tep_record *record, enum tep_errno *err) | 1911 | struct tep_record *record, enum tep_errno *err) |
1912 | { | 1912 | { |
1913 | const char *val; | 1913 | const char *val; |
@@ -1938,7 +1938,7 @@ static int test_str(struct tep_event_format *event, struct filter_arg *arg, | |||
1938 | } | 1938 | } |
1939 | } | 1939 | } |
1940 | 1940 | ||
1941 | static int test_op(struct tep_event_format *event, struct filter_arg *arg, | 1941 | static int test_op(struct tep_event_format *event, struct tep_filter_arg *arg, |
1942 | struct tep_record *record, enum tep_errno *err) | 1942 | struct tep_record *record, enum tep_errno *err) |
1943 | { | 1943 | { |
1944 | switch (arg->op.type) { | 1944 | switch (arg->op.type) { |
@@ -1960,7 +1960,7 @@ static int test_op(struct tep_event_format *event, struct filter_arg *arg, | |||
1960 | } | 1960 | } |
1961 | } | 1961 | } |
1962 | 1962 | ||
1963 | static int test_filter(struct tep_event_format *event, struct filter_arg *arg, | 1963 | static int test_filter(struct tep_event_format *event, struct tep_filter_arg *arg, |
1964 | struct tep_record *record, enum tep_errno *err) | 1964 | struct tep_record *record, enum tep_errno *err) |
1965 | { | 1965 | { |
1966 | if (*err) { | 1966 | if (*err) { |
@@ -2059,7 +2059,7 @@ enum tep_errno tep_filter_match(struct event_filter *filter, | |||
2059 | return ret ? TEP_ERRNO__FILTER_MATCH : TEP_ERRNO__FILTER_MISS; | 2059 | return ret ? TEP_ERRNO__FILTER_MATCH : TEP_ERRNO__FILTER_MISS; |
2060 | } | 2060 | } |
2061 | 2061 | ||
2062 | static char *op_to_str(struct event_filter *filter, struct filter_arg *arg) | 2062 | static char *op_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2063 | { | 2063 | { |
2064 | char *str = NULL; | 2064 | char *str = NULL; |
2065 | char *left = NULL; | 2065 | char *left = NULL; |
@@ -2163,7 +2163,7 @@ static char *op_to_str(struct event_filter *filter, struct filter_arg *arg) | |||
2163 | return str; | 2163 | return str; |
2164 | } | 2164 | } |
2165 | 2165 | ||
2166 | static char *val_to_str(struct event_filter *filter, struct filter_arg *arg) | 2166 | static char *val_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2167 | { | 2167 | { |
2168 | char *str = NULL; | 2168 | char *str = NULL; |
2169 | 2169 | ||
@@ -2172,12 +2172,12 @@ static char *val_to_str(struct event_filter *filter, struct filter_arg *arg) | |||
2172 | return str; | 2172 | return str; |
2173 | } | 2173 | } |
2174 | 2174 | ||
2175 | static char *field_to_str(struct event_filter *filter, struct filter_arg *arg) | 2175 | static char *field_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2176 | { | 2176 | { |
2177 | return strdup(arg->field.field->name); | 2177 | return strdup(arg->field.field->name); |
2178 | } | 2178 | } |
2179 | 2179 | ||
2180 | static char *exp_to_str(struct event_filter *filter, struct filter_arg *arg) | 2180 | static char *exp_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2181 | { | 2181 | { |
2182 | char *lstr; | 2182 | char *lstr; |
2183 | char *rstr; | 2183 | char *rstr; |
@@ -2233,7 +2233,7 @@ out: | |||
2233 | return str; | 2233 | return str; |
2234 | } | 2234 | } |
2235 | 2235 | ||
2236 | static char *num_to_str(struct event_filter *filter, struct filter_arg *arg) | 2236 | static char *num_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2237 | { | 2237 | { |
2238 | char *lstr; | 2238 | char *lstr; |
2239 | char *rstr; | 2239 | char *rstr; |
@@ -2283,7 +2283,7 @@ out: | |||
2283 | return str; | 2283 | return str; |
2284 | } | 2284 | } |
2285 | 2285 | ||
2286 | static char *str_to_str(struct event_filter *filter, struct filter_arg *arg) | 2286 | static char *str_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2287 | { | 2287 | { |
2288 | char *str = NULL; | 2288 | char *str = NULL; |
2289 | char *op = NULL; | 2289 | char *op = NULL; |
@@ -2315,7 +2315,7 @@ static char *str_to_str(struct event_filter *filter, struct filter_arg *arg) | |||
2315 | return str; | 2315 | return str; |
2316 | } | 2316 | } |
2317 | 2317 | ||
2318 | static char *arg_to_str(struct event_filter *filter, struct filter_arg *arg) | 2318 | static char *arg_to_str(struct event_filter *filter, struct tep_filter_arg *arg) |
2319 | { | 2319 | { |
2320 | char *str = NULL; | 2320 | char *str = NULL; |
2321 | 2321 | ||