diff options
| -rw-r--r-- | tools/lib/traceevent/event-parse.c | 144 | ||||
| -rw-r--r-- | tools/lib/traceevent/event-parse.h | 98 | ||||
| -rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 6 | ||||
| -rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 4 |
4 files changed, 126 insertions, 126 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index a651c3323f2c..3beab91afded 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
| @@ -95,7 +95,7 @@ struct tep_function_handler { | |||
| 95 | 95 | ||
| 96 | static unsigned long long | 96 | static unsigned long long |
| 97 | process_defined_func(struct trace_seq *s, void *data, int size, | 97 | process_defined_func(struct trace_seq *s, void *data, int size, |
| 98 | struct tep_event_format *event, struct print_arg *arg); | 98 | struct tep_event_format *event, struct tep_print_arg *arg); |
| 99 | 99 | ||
| 100 | static void free_func_handle(struct tep_function_handler *func); | 100 | static void free_func_handle(struct tep_function_handler *func); |
| 101 | 101 | ||
| @@ -118,9 +118,9 @@ void breakpoint(void) | |||
| 118 | x++; | 118 | x++; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | struct print_arg *alloc_arg(void) | 121 | struct tep_print_arg *alloc_arg(void) |
| 122 | { | 122 | { |
| 123 | return calloc(1, sizeof(struct print_arg)); | 123 | return calloc(1, sizeof(struct tep_print_arg)); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | struct cmdline { | 126 | struct cmdline { |
| @@ -781,9 +781,9 @@ static int event_item_type(enum tep_event_type type) | |||
| 781 | } | 781 | } |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | static void free_flag_sym(struct print_flag_sym *fsym) | 784 | static void free_flag_sym(struct tep_print_flag_sym *fsym) |
| 785 | { | 785 | { |
| 786 | struct print_flag_sym *next; | 786 | struct tep_print_flag_sym *next; |
| 787 | 787 | ||
| 788 | while (fsym) { | 788 | while (fsym) { |
| 789 | next = fsym->next; | 789 | next = fsym->next; |
| @@ -794,9 +794,9 @@ static void free_flag_sym(struct print_flag_sym *fsym) | |||
| 794 | } | 794 | } |
| 795 | } | 795 | } |
| 796 | 796 | ||
| 797 | static void free_arg(struct print_arg *arg) | 797 | static void free_arg(struct tep_print_arg *arg) |
| 798 | { | 798 | { |
| 799 | struct print_arg *farg; | 799 | struct tep_print_arg *farg; |
| 800 | 800 | ||
| 801 | if (!arg) | 801 | if (!arg) |
| 802 | return; | 802 | return; |
| @@ -1674,11 +1674,11 @@ static int event_read_format(struct tep_event_format *event) | |||
| 1674 | } | 1674 | } |
| 1675 | 1675 | ||
| 1676 | static enum tep_event_type | 1676 | static enum tep_event_type |
| 1677 | process_arg_token(struct tep_event_format *event, struct print_arg *arg, | 1677 | process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg, |
| 1678 | char **tok, enum tep_event_type type); | 1678 | char **tok, enum tep_event_type type); |
| 1679 | 1679 | ||
| 1680 | static enum tep_event_type | 1680 | static enum tep_event_type |
| 1681 | process_arg(struct tep_event_format *event, struct print_arg *arg, char **tok) | 1681 | process_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 1682 | { | 1682 | { |
| 1683 | enum tep_event_type type; | 1683 | enum tep_event_type type; |
| 1684 | char *token; | 1684 | char *token; |
| @@ -1690,14 +1690,14 @@ process_arg(struct tep_event_format *event, struct print_arg *arg, char **tok) | |||
| 1690 | } | 1690 | } |
| 1691 | 1691 | ||
| 1692 | static enum tep_event_type | 1692 | static enum tep_event_type |
| 1693 | process_op(struct tep_event_format *event, struct print_arg *arg, char **tok); | 1693 | process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok); |
| 1694 | 1694 | ||
| 1695 | /* | 1695 | /* |
| 1696 | * For __print_symbolic() and __print_flags, we need to completely | 1696 | * For __print_symbolic() and __print_flags, we need to completely |
| 1697 | * evaluate the first argument, which defines what to print next. | 1697 | * evaluate the first argument, which defines what to print next. |
| 1698 | */ | 1698 | */ |
| 1699 | static enum tep_event_type | 1699 | static enum tep_event_type |
| 1700 | process_field_arg(struct tep_event_format *event, struct print_arg *arg, char **tok) | 1700 | process_field_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 1701 | { | 1701 | { |
| 1702 | enum tep_event_type type; | 1702 | enum tep_event_type type; |
| 1703 | 1703 | ||
| @@ -1711,9 +1711,9 @@ process_field_arg(struct tep_event_format *event, struct print_arg *arg, char ** | |||
| 1711 | } | 1711 | } |
| 1712 | 1712 | ||
| 1713 | static enum tep_event_type | 1713 | static enum tep_event_type |
| 1714 | process_cond(struct tep_event_format *event, struct print_arg *top, char **tok) | 1714 | process_cond(struct tep_event_format *event, struct tep_print_arg *top, char **tok) |
| 1715 | { | 1715 | { |
| 1716 | struct print_arg *arg, *left, *right; | 1716 | struct tep_print_arg *arg, *left, *right; |
| 1717 | enum tep_event_type type; | 1717 | enum tep_event_type type; |
| 1718 | char *token = NULL; | 1718 | char *token = NULL; |
| 1719 | 1719 | ||
| @@ -1767,9 +1767,9 @@ out_free: | |||
| 1767 | } | 1767 | } |
| 1768 | 1768 | ||
| 1769 | static enum tep_event_type | 1769 | static enum tep_event_type |
| 1770 | process_array(struct tep_event_format *event, struct print_arg *top, char **tok) | 1770 | process_array(struct tep_event_format *event, struct tep_print_arg *top, char **tok) |
| 1771 | { | 1771 | { |
| 1772 | struct print_arg *arg; | 1772 | struct tep_print_arg *arg; |
| 1773 | enum tep_event_type type; | 1773 | enum tep_event_type type; |
| 1774 | char *token = NULL; | 1774 | char *token = NULL; |
| 1775 | 1775 | ||
| @@ -1855,7 +1855,7 @@ static int get_op_prio(char *op) | |||
| 1855 | } | 1855 | } |
| 1856 | } | 1856 | } |
| 1857 | 1857 | ||
| 1858 | static int set_op_prio(struct print_arg *arg) | 1858 | static int set_op_prio(struct tep_print_arg *arg) |
| 1859 | { | 1859 | { |
| 1860 | 1860 | ||
| 1861 | /* single ops are the greatest */ | 1861 | /* single ops are the greatest */ |
| @@ -1869,9 +1869,9 @@ static int set_op_prio(struct print_arg *arg) | |||
| 1869 | 1869 | ||
| 1870 | /* Note, *tok does not get freed, but will most likely be saved */ | 1870 | /* Note, *tok does not get freed, but will most likely be saved */ |
| 1871 | static enum tep_event_type | 1871 | static enum tep_event_type |
| 1872 | process_op(struct tep_event_format *event, struct print_arg *arg, char **tok) | 1872 | process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 1873 | { | 1873 | { |
| 1874 | struct print_arg *left, *right = NULL; | 1874 | struct tep_print_arg *left, *right = NULL; |
| 1875 | enum tep_event_type type; | 1875 | enum tep_event_type type; |
| 1876 | char *token; | 1876 | char *token; |
| 1877 | 1877 | ||
| @@ -2009,7 +2009,7 @@ process_op(struct tep_event_format *event, struct print_arg *arg, char **tok) | |||
| 2009 | 2009 | ||
| 2010 | if (right->type == PRINT_OP && | 2010 | if (right->type == PRINT_OP && |
| 2011 | get_op_prio(arg->op.op) < get_op_prio(right->op.op)) { | 2011 | get_op_prio(arg->op.op) < get_op_prio(right->op.op)) { |
| 2012 | struct print_arg tmp; | 2012 | struct tep_print_arg tmp; |
| 2013 | 2013 | ||
| 2014 | /* rotate ops according to the priority */ | 2014 | /* rotate ops according to the priority */ |
| 2015 | arg->op.right = right->op.left; | 2015 | arg->op.right = right->op.left; |
| @@ -2070,7 +2070,7 @@ out_free: | |||
| 2070 | } | 2070 | } |
| 2071 | 2071 | ||
| 2072 | static enum tep_event_type | 2072 | static enum tep_event_type |
| 2073 | process_entry(struct tep_event_format *event __maybe_unused, struct print_arg *arg, | 2073 | process_entry(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, |
| 2074 | char **tok) | 2074 | char **tok) |
| 2075 | { | 2075 | { |
| 2076 | enum tep_event_type type; | 2076 | enum tep_event_type type; |
| @@ -2110,9 +2110,9 @@ process_entry(struct tep_event_format *event __maybe_unused, struct print_arg *a | |||
| 2110 | } | 2110 | } |
| 2111 | 2111 | ||
| 2112 | static int alloc_and_process_delim(struct tep_event_format *event, char *next_token, | 2112 | static int alloc_and_process_delim(struct tep_event_format *event, char *next_token, |
| 2113 | struct print_arg **print_arg) | 2113 | struct tep_print_arg **print_arg) |
| 2114 | { | 2114 | { |
| 2115 | struct print_arg *field; | 2115 | struct tep_print_arg *field; |
| 2116 | enum tep_event_type type; | 2116 | enum tep_event_type type; |
| 2117 | char *token; | 2117 | char *token; |
| 2118 | int ret = 0; | 2118 | int ret = 0; |
| @@ -2141,7 +2141,7 @@ out_free_token: | |||
| 2141 | return ret; | 2141 | return ret; |
| 2142 | } | 2142 | } |
| 2143 | 2143 | ||
| 2144 | static char *arg_eval (struct print_arg *arg); | 2144 | static char *arg_eval (struct tep_print_arg *arg); |
| 2145 | 2145 | ||
| 2146 | static unsigned long long | 2146 | static unsigned long long |
| 2147 | eval_type_str(unsigned long long val, const char *type, int pointer) | 2147 | eval_type_str(unsigned long long val, const char *type, int pointer) |
| @@ -2238,7 +2238,7 @@ eval_type_str(unsigned long long val, const char *type, int pointer) | |||
| 2238 | * Try to figure out the type. | 2238 | * Try to figure out the type. |
| 2239 | */ | 2239 | */ |
| 2240 | static unsigned long long | 2240 | static unsigned long long |
| 2241 | eval_type(unsigned long long val, struct print_arg *arg, int pointer) | 2241 | eval_type(unsigned long long val, struct tep_print_arg *arg, int pointer) |
| 2242 | { | 2242 | { |
| 2243 | if (arg->type != PRINT_TYPE) { | 2243 | if (arg->type != PRINT_TYPE) { |
| 2244 | do_warning("expected type argument"); | 2244 | do_warning("expected type argument"); |
| @@ -2248,7 +2248,7 @@ eval_type(unsigned long long val, struct print_arg *arg, int pointer) | |||
| 2248 | return eval_type_str(val, arg->typecast.type, pointer); | 2248 | return eval_type_str(val, arg->typecast.type, pointer); |
| 2249 | } | 2249 | } |
| 2250 | 2250 | ||
| 2251 | static int arg_num_eval(struct print_arg *arg, long long *val) | 2251 | static int arg_num_eval(struct tep_print_arg *arg, long long *val) |
| 2252 | { | 2252 | { |
| 2253 | long long left, right; | 2253 | long long left, right; |
| 2254 | int ret = 1; | 2254 | int ret = 1; |
| @@ -2414,7 +2414,7 @@ static int arg_num_eval(struct print_arg *arg, long long *val) | |||
| 2414 | return ret; | 2414 | return ret; |
| 2415 | } | 2415 | } |
| 2416 | 2416 | ||
| 2417 | static char *arg_eval (struct print_arg *arg) | 2417 | static char *arg_eval (struct tep_print_arg *arg) |
| 2418 | { | 2418 | { |
| 2419 | long long val; | 2419 | long long val; |
| 2420 | static char buf[20]; | 2420 | static char buf[20]; |
| @@ -2444,11 +2444,11 @@ static char *arg_eval (struct print_arg *arg) | |||
| 2444 | } | 2444 | } |
| 2445 | 2445 | ||
| 2446 | static enum tep_event_type | 2446 | static enum tep_event_type |
| 2447 | process_fields(struct tep_event_format *event, struct print_flag_sym **list, char **tok) | 2447 | process_fields(struct tep_event_format *event, struct tep_print_flag_sym **list, char **tok) |
| 2448 | { | 2448 | { |
| 2449 | enum tep_event_type type; | 2449 | enum tep_event_type type; |
| 2450 | struct print_arg *arg = NULL; | 2450 | struct tep_print_arg *arg = NULL; |
| 2451 | struct print_flag_sym *field; | 2451 | struct tep_print_flag_sym *field; |
| 2452 | char *token = *tok; | 2452 | char *token = *tok; |
| 2453 | char *value; | 2453 | char *value; |
| 2454 | 2454 | ||
| @@ -2525,9 +2525,9 @@ out_free: | |||
| 2525 | } | 2525 | } |
| 2526 | 2526 | ||
| 2527 | static enum tep_event_type | 2527 | static enum tep_event_type |
| 2528 | process_flags(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2528 | process_flags(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2529 | { | 2529 | { |
| 2530 | struct print_arg *field; | 2530 | struct tep_print_arg *field; |
| 2531 | enum tep_event_type type; | 2531 | enum tep_event_type type; |
| 2532 | char *token = NULL; | 2532 | char *token = NULL; |
| 2533 | 2533 | ||
| @@ -2578,9 +2578,9 @@ out_free: | |||
| 2578 | } | 2578 | } |
| 2579 | 2579 | ||
| 2580 | static enum tep_event_type | 2580 | static enum tep_event_type |
| 2581 | process_symbols(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2581 | process_symbols(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2582 | { | 2582 | { |
| 2583 | struct print_arg *field; | 2583 | struct tep_print_arg *field; |
| 2584 | enum tep_event_type type; | 2584 | enum tep_event_type type; |
| 2585 | char *token = NULL; | 2585 | char *token = NULL; |
| 2586 | 2586 | ||
| @@ -2617,7 +2617,7 @@ out_free: | |||
| 2617 | } | 2617 | } |
| 2618 | 2618 | ||
| 2619 | static enum tep_event_type | 2619 | static enum tep_event_type |
| 2620 | process_hex_common(struct tep_event_format *event, struct print_arg *arg, | 2620 | process_hex_common(struct tep_event_format *event, struct tep_print_arg *arg, |
| 2621 | char **tok, enum print_arg_type type) | 2621 | char **tok, enum print_arg_type type) |
| 2622 | { | 2622 | { |
| 2623 | memset(arg, 0, sizeof(*arg)); | 2623 | memset(arg, 0, sizeof(*arg)); |
| @@ -2640,20 +2640,20 @@ out: | |||
| 2640 | } | 2640 | } |
| 2641 | 2641 | ||
| 2642 | static enum tep_event_type | 2642 | static enum tep_event_type |
| 2643 | process_hex(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2643 | process_hex(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2644 | { | 2644 | { |
| 2645 | return process_hex_common(event, arg, tok, PRINT_HEX); | 2645 | return process_hex_common(event, arg, tok, PRINT_HEX); |
| 2646 | } | 2646 | } |
| 2647 | 2647 | ||
| 2648 | static enum tep_event_type | 2648 | static enum tep_event_type |
| 2649 | process_hex_str(struct tep_event_format *event, struct print_arg *arg, | 2649 | process_hex_str(struct tep_event_format *event, struct tep_print_arg *arg, |
| 2650 | char **tok) | 2650 | char **tok) |
| 2651 | { | 2651 | { |
| 2652 | return process_hex_common(event, arg, tok, PRINT_HEX_STR); | 2652 | return process_hex_common(event, arg, tok, PRINT_HEX_STR); |
| 2653 | } | 2653 | } |
| 2654 | 2654 | ||
| 2655 | static enum tep_event_type | 2655 | static enum tep_event_type |
| 2656 | process_int_array(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2656 | process_int_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2657 | { | 2657 | { |
| 2658 | memset(arg, 0, sizeof(*arg)); | 2658 | memset(arg, 0, sizeof(*arg)); |
| 2659 | arg->type = PRINT_INT_ARRAY; | 2659 | arg->type = PRINT_INT_ARRAY; |
| @@ -2681,7 +2681,7 @@ out: | |||
| 2681 | } | 2681 | } |
| 2682 | 2682 | ||
| 2683 | static enum tep_event_type | 2683 | static enum tep_event_type |
| 2684 | process_dynamic_array(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2684 | process_dynamic_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2685 | { | 2685 | { |
| 2686 | struct tep_format_field *field; | 2686 | struct tep_format_field *field; |
| 2687 | enum tep_event_type type; | 2687 | enum tep_event_type type; |
| @@ -2745,7 +2745,7 @@ process_dynamic_array(struct tep_event_format *event, struct print_arg *arg, cha | |||
| 2745 | } | 2745 | } |
| 2746 | 2746 | ||
| 2747 | static enum tep_event_type | 2747 | static enum tep_event_type |
| 2748 | process_dynamic_array_len(struct tep_event_format *event, struct print_arg *arg, | 2748 | process_dynamic_array_len(struct tep_event_format *event, struct tep_print_arg *arg, |
| 2749 | char **tok) | 2749 | char **tok) |
| 2750 | { | 2750 | { |
| 2751 | struct tep_format_field *field; | 2751 | struct tep_format_field *field; |
| @@ -2781,9 +2781,9 @@ process_dynamic_array_len(struct tep_event_format *event, struct print_arg *arg, | |||
| 2781 | } | 2781 | } |
| 2782 | 2782 | ||
| 2783 | static enum tep_event_type | 2783 | static enum tep_event_type |
| 2784 | process_paren(struct tep_event_format *event, struct print_arg *arg, char **tok) | 2784 | process_paren(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) |
| 2785 | { | 2785 | { |
| 2786 | struct print_arg *item_arg; | 2786 | struct tep_print_arg *item_arg; |
| 2787 | enum tep_event_type type; | 2787 | enum tep_event_type type; |
| 2788 | char *token; | 2788 | char *token; |
| 2789 | 2789 | ||
| @@ -2844,7 +2844,7 @@ process_paren(struct tep_event_format *event, struct print_arg *arg, char **tok) | |||
| 2844 | 2844 | ||
| 2845 | 2845 | ||
| 2846 | static enum tep_event_type | 2846 | static enum tep_event_type |
| 2847 | process_str(struct tep_event_format *event __maybe_unused, struct print_arg *arg, | 2847 | process_str(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, |
| 2848 | char **tok) | 2848 | char **tok) |
| 2849 | { | 2849 | { |
| 2850 | enum tep_event_type type; | 2850 | enum tep_event_type type; |
| @@ -2873,7 +2873,7 @@ process_str(struct tep_event_format *event __maybe_unused, struct print_arg *arg | |||
| 2873 | } | 2873 | } |
| 2874 | 2874 | ||
| 2875 | static enum tep_event_type | 2875 | static enum tep_event_type |
| 2876 | process_bitmask(struct tep_event_format *event __maybe_unused, struct print_arg *arg, | 2876 | process_bitmask(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, |
| 2877 | char **tok) | 2877 | char **tok) |
| 2878 | { | 2878 | { |
| 2879 | enum tep_event_type type; | 2879 | enum tep_event_type type; |
| @@ -2935,10 +2935,10 @@ static void remove_func_handler(struct tep_handle *pevent, char *func_name) | |||
| 2935 | 2935 | ||
| 2936 | static enum tep_event_type | 2936 | static enum tep_event_type |
| 2937 | process_func_handler(struct tep_event_format *event, struct tep_function_handler *func, | 2937 | process_func_handler(struct tep_event_format *event, struct tep_function_handler *func, |
| 2938 | struct print_arg *arg, char **tok) | 2938 | struct tep_print_arg *arg, char **tok) |
| 2939 | { | 2939 | { |
| 2940 | struct print_arg **next_arg; | 2940 | struct tep_print_arg **next_arg; |
| 2941 | struct print_arg *farg; | 2941 | struct tep_print_arg *farg; |
| 2942 | enum tep_event_type type; | 2942 | enum tep_event_type type; |
| 2943 | char *token; | 2943 | char *token; |
| 2944 | int i; | 2944 | int i; |
| @@ -2992,7 +2992,7 @@ err: | |||
| 2992 | } | 2992 | } |
| 2993 | 2993 | ||
| 2994 | static enum tep_event_type | 2994 | static enum tep_event_type |
| 2995 | process_function(struct tep_event_format *event, struct print_arg *arg, | 2995 | process_function(struct tep_event_format *event, struct tep_print_arg *arg, |
| 2996 | char *token, char **tok) | 2996 | char *token, char **tok) |
| 2997 | { | 2997 | { |
| 2998 | struct tep_function_handler *func; | 2998 | struct tep_function_handler *func; |
| @@ -3048,7 +3048,7 @@ process_function(struct tep_event_format *event, struct print_arg *arg, | |||
| 3048 | } | 3048 | } |
| 3049 | 3049 | ||
| 3050 | static enum tep_event_type | 3050 | static enum tep_event_type |
| 3051 | process_arg_token(struct tep_event_format *event, struct print_arg *arg, | 3051 | process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg, |
| 3052 | char **tok, enum tep_event_type type) | 3052 | char **tok, enum tep_event_type type) |
| 3053 | { | 3053 | { |
| 3054 | char *token; | 3054 | char *token; |
| @@ -3136,10 +3136,10 @@ process_arg_token(struct tep_event_format *event, struct print_arg *arg, | |||
| 3136 | return type; | 3136 | return type; |
| 3137 | } | 3137 | } |
| 3138 | 3138 | ||
| 3139 | static int event_read_print_args(struct tep_event_format *event, struct print_arg **list) | 3139 | static int event_read_print_args(struct tep_event_format *event, struct tep_print_arg **list) |
| 3140 | { | 3140 | { |
| 3141 | enum tep_event_type type = TEP_EVENT_ERROR; | 3141 | enum tep_event_type type = TEP_EVENT_ERROR; |
| 3142 | struct print_arg *arg; | 3142 | struct tep_print_arg *arg; |
| 3143 | char *token; | 3143 | char *token; |
| 3144 | int args = 0; | 3144 | int args = 0; |
| 3145 | 3145 | ||
| @@ -3522,13 +3522,13 @@ tep_find_event_by_name(struct tep_handle *pevent, | |||
| 3522 | } | 3522 | } |
| 3523 | 3523 | ||
| 3524 | static unsigned long long | 3524 | static unsigned long long |
| 3525 | eval_num_arg(void *data, int size, struct tep_event_format *event, struct print_arg *arg) | 3525 | eval_num_arg(void *data, int size, struct tep_event_format *event, struct tep_print_arg *arg) |
| 3526 | { | 3526 | { |
| 3527 | struct tep_handle *pevent = event->pevent; | 3527 | struct tep_handle *pevent = event->pevent; |
| 3528 | unsigned long long val = 0; | 3528 | unsigned long long val = 0; |
| 3529 | unsigned long long left, right; | 3529 | unsigned long long left, right; |
| 3530 | struct print_arg *typearg = NULL; | 3530 | struct tep_print_arg *typearg = NULL; |
| 3531 | struct print_arg *larg; | 3531 | struct tep_print_arg *larg; |
| 3532 | unsigned long offset; | 3532 | unsigned long offset; |
| 3533 | unsigned int field_size; | 3533 | unsigned int field_size; |
| 3534 | 3534 | ||
| @@ -3863,10 +3863,10 @@ static void print_bitmask_to_seq(struct tep_handle *pevent, | |||
| 3863 | 3863 | ||
| 3864 | static void print_str_arg(struct trace_seq *s, void *data, int size, | 3864 | static void print_str_arg(struct trace_seq *s, void *data, int size, |
| 3865 | struct tep_event_format *event, const char *format, | 3865 | struct tep_event_format *event, const char *format, |
| 3866 | int len_arg, struct print_arg *arg) | 3866 | int len_arg, struct tep_print_arg *arg) |
| 3867 | { | 3867 | { |
| 3868 | struct tep_handle *pevent = event->pevent; | 3868 | struct tep_handle *pevent = event->pevent; |
| 3869 | struct print_flag_sym *flag; | 3869 | struct tep_print_flag_sym *flag; |
| 3870 | struct tep_format_field *field; | 3870 | struct tep_format_field *field; |
| 3871 | struct printk_map *printk; | 3871 | struct printk_map *printk; |
| 3872 | long long val, fval; | 3872 | long long val, fval; |
| @@ -4117,13 +4117,13 @@ out_warning_field: | |||
| 4117 | 4117 | ||
| 4118 | static unsigned long long | 4118 | static unsigned long long |
| 4119 | process_defined_func(struct trace_seq *s, void *data, int size, | 4119 | process_defined_func(struct trace_seq *s, void *data, int size, |
| 4120 | struct tep_event_format *event, struct print_arg *arg) | 4120 | struct tep_event_format *event, struct tep_print_arg *arg) |
| 4121 | { | 4121 | { |
| 4122 | struct tep_function_handler *func_handle = arg->func.func; | 4122 | struct tep_function_handler *func_handle = arg->func.func; |
| 4123 | struct func_params *param; | 4123 | struct func_params *param; |
| 4124 | unsigned long long *args; | 4124 | unsigned long long *args; |
| 4125 | unsigned long long ret; | 4125 | unsigned long long ret; |
| 4126 | struct print_arg *farg; | 4126 | struct tep_print_arg *farg; |
| 4127 | struct trace_seq str; | 4127 | struct trace_seq str; |
| 4128 | struct save_str { | 4128 | struct save_str { |
| 4129 | struct save_str *next; | 4129 | struct save_str *next; |
| @@ -4200,9 +4200,9 @@ out_free: | |||
| 4200 | return ret; | 4200 | return ret; |
| 4201 | } | 4201 | } |
| 4202 | 4202 | ||
| 4203 | static void free_args(struct print_arg *args) | 4203 | static void free_args(struct tep_print_arg *args) |
| 4204 | { | 4204 | { |
| 4205 | struct print_arg *next; | 4205 | struct tep_print_arg *next; |
| 4206 | 4206 | ||
| 4207 | while (args) { | 4207 | while (args) { |
| 4208 | next = args->next; | 4208 | next = args->next; |
| @@ -4212,11 +4212,11 @@ static void free_args(struct print_arg *args) | |||
| 4212 | } | 4212 | } |
| 4213 | } | 4213 | } |
| 4214 | 4214 | ||
| 4215 | static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event) | 4215 | static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event) |
| 4216 | { | 4216 | { |
| 4217 | struct tep_handle *pevent = event->pevent; | 4217 | struct tep_handle *pevent = event->pevent; |
| 4218 | struct tep_format_field *field, *ip_field; | 4218 | struct tep_format_field *field, *ip_field; |
| 4219 | struct print_arg *args, *arg, **next; | 4219 | struct tep_print_arg *args, *arg, **next; |
| 4220 | unsigned long long ip, val; | 4220 | unsigned long long ip, val; |
| 4221 | char *ptr; | 4221 | char *ptr; |
| 4222 | void *bptr; | 4222 | void *bptr; |
| @@ -4424,7 +4424,7 @@ get_bprint_format(void *data, int size __maybe_unused, | |||
| 4424 | } | 4424 | } |
| 4425 | 4425 | ||
| 4426 | static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, | 4426 | static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, |
| 4427 | struct tep_event_format *event, struct print_arg *arg) | 4427 | struct tep_event_format *event, struct tep_print_arg *arg) |
| 4428 | { | 4428 | { |
| 4429 | unsigned char *buf; | 4429 | unsigned char *buf; |
| 4430 | const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; | 4430 | const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; |
| @@ -4578,7 +4578,7 @@ static void print_ip6_addr(struct trace_seq *s, char i, unsigned char *buf) | |||
| 4578 | */ | 4578 | */ |
| 4579 | static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, | 4579 | static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, |
| 4580 | void *data, int size, struct tep_event_format *event, | 4580 | void *data, int size, struct tep_event_format *event, |
| 4581 | struct print_arg *arg) | 4581 | struct tep_print_arg *arg) |
| 4582 | { | 4582 | { |
| 4583 | unsigned char *buf; | 4583 | unsigned char *buf; |
| 4584 | 4584 | ||
| @@ -4615,7 +4615,7 @@ static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, | |||
| 4615 | 4615 | ||
| 4616 | static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, | 4616 | static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, |
| 4617 | void *data, int size, struct tep_event_format *event, | 4617 | void *data, int size, struct tep_event_format *event, |
| 4618 | struct print_arg *arg) | 4618 | struct tep_print_arg *arg) |
| 4619 | { | 4619 | { |
| 4620 | char have_c = 0; | 4620 | char have_c = 0; |
| 4621 | unsigned char *buf; | 4621 | unsigned char *buf; |
| @@ -4665,7 +4665,7 @@ static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, | |||
| 4665 | 4665 | ||
| 4666 | static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, | 4666 | static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, |
| 4667 | void *data, int size, struct tep_event_format *event, | 4667 | void *data, int size, struct tep_event_format *event, |
| 4668 | struct print_arg *arg) | 4668 | struct tep_print_arg *arg) |
| 4669 | { | 4669 | { |
| 4670 | char have_c = 0, have_p = 0; | 4670 | char have_c = 0, have_p = 0; |
| 4671 | unsigned char *buf; | 4671 | unsigned char *buf; |
| @@ -4747,7 +4747,7 @@ static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, | |||
| 4747 | 4747 | ||
| 4748 | static int print_ip_arg(struct trace_seq *s, const char *ptr, | 4748 | static int print_ip_arg(struct trace_seq *s, const char *ptr, |
| 4749 | void *data, int size, struct tep_event_format *event, | 4749 | void *data, int size, struct tep_event_format *event, |
| 4750 | struct print_arg *arg) | 4750 | struct tep_print_arg *arg) |
| 4751 | { | 4751 | { |
| 4752 | char i = *ptr; /* 'i' or 'I' */ | 4752 | char i = *ptr; /* 'i' or 'I' */ |
| 4753 | char ver; | 4753 | char ver; |
| @@ -4868,9 +4868,9 @@ void tep_print_fields(struct trace_seq *s, void *data, | |||
| 4868 | static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event_format *event) | 4868 | static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event_format *event) |
| 4869 | { | 4869 | { |
| 4870 | struct tep_handle *pevent = event->pevent; | 4870 | struct tep_handle *pevent = event->pevent; |
| 4871 | struct print_fmt *print_fmt = &event->print_fmt; | 4871 | struct tep_print_fmt *print_fmt = &event->print_fmt; |
| 4872 | struct print_arg *arg = print_fmt->args; | 4872 | struct tep_print_arg *arg = print_fmt->args; |
| 4873 | struct print_arg *args = NULL; | 4873 | struct tep_print_arg *args = NULL; |
| 4874 | const char *ptr = print_fmt->format; | 4874 | const char *ptr = print_fmt->format; |
| 4875 | unsigned long long val; | 4875 | unsigned long long val; |
| 4876 | struct func_map *func; | 4876 | struct func_map *func; |
| @@ -5723,7 +5723,7 @@ struct tep_format_field **tep_event_fields(struct tep_event_format *event) | |||
| 5723 | event->format.fields); | 5723 | event->format.fields); |
| 5724 | } | 5724 | } |
| 5725 | 5725 | ||
| 5726 | static void print_fields(struct trace_seq *s, struct print_flag_sym *field) | 5726 | static void print_fields(struct trace_seq *s, struct tep_print_flag_sym *field) |
| 5727 | { | 5727 | { |
| 5728 | trace_seq_printf(s, "{ %s, %s }", field->value, field->str); | 5728 | trace_seq_printf(s, "{ %s, %s }", field->value, field->str); |
| 5729 | if (field->next) { | 5729 | if (field->next) { |
| @@ -5733,7 +5733,7 @@ static void print_fields(struct trace_seq *s, struct print_flag_sym *field) | |||
| 5733 | } | 5733 | } |
| 5734 | 5734 | ||
| 5735 | /* for debugging */ | 5735 | /* for debugging */ |
| 5736 | static void print_args(struct print_arg *args) | 5736 | static void print_args(struct tep_print_arg *args) |
| 5737 | { | 5737 | { |
| 5738 | int print_paren = 1; | 5738 | int print_paren = 1; |
| 5739 | struct trace_seq s; | 5739 | struct trace_seq s; |
| @@ -6091,7 +6091,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
| 6091 | 6091 | ||
| 6092 | if (!ret && (event->flags & TEP_EVENT_FL_ISFTRACE)) { | 6092 | if (!ret && (event->flags & TEP_EVENT_FL_ISFTRACE)) { |
| 6093 | struct tep_format_field *field; | 6093 | struct tep_format_field *field; |
| 6094 | struct print_arg *arg, **list; | 6094 | struct tep_print_arg *arg, **list; |
| 6095 | 6095 | ||
| 6096 | /* old ftrace had no args */ | 6096 | /* old ftrace had no args */ |
| 6097 | list = &event->print_fmt.args; | 6097 | list = &event->print_fmt.args; |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index b7798d91607e..21923a11c9c0 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
| @@ -161,77 +161,77 @@ struct tep_format { | |||
| 161 | struct tep_format_field *fields; | 161 | struct tep_format_field *fields; |
| 162 | }; | 162 | }; |
| 163 | 163 | ||
| 164 | struct print_arg_atom { | 164 | struct tep_print_arg_atom { |
| 165 | char *atom; | 165 | char *atom; |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | struct print_arg_string { | 168 | struct tep_print_arg_string { |
| 169 | char *string; | 169 | char *string; |
| 170 | int offset; | 170 | int offset; |
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | struct print_arg_bitmask { | 173 | struct tep_print_arg_bitmask { |
| 174 | char *bitmask; | 174 | char *bitmask; |
| 175 | int offset; | 175 | int offset; |
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | struct print_arg_field { | 178 | struct tep_print_arg_field { |
| 179 | char *name; | 179 | char *name; |
| 180 | struct tep_format_field *field; | 180 | struct tep_format_field *field; |
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | struct print_flag_sym { | 183 | struct tep_print_flag_sym { |
| 184 | struct print_flag_sym *next; | 184 | struct tep_print_flag_sym *next; |
| 185 | char *value; | 185 | char *value; |
| 186 | char *str; | 186 | char *str; |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | struct print_arg_typecast { | 189 | struct tep_print_arg_typecast { |
| 190 | char *type; | 190 | char *type; |
| 191 | struct print_arg *item; | 191 | struct tep_print_arg *item; |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | struct print_arg_flags { | 194 | struct tep_print_arg_flags { |
| 195 | struct print_arg *field; | 195 | struct tep_print_arg *field; |
| 196 | char *delim; | 196 | char *delim; |
| 197 | struct print_flag_sym *flags; | 197 | struct tep_print_flag_sym *flags; |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | struct print_arg_symbol { | 200 | struct tep_print_arg_symbol { |
| 201 | struct print_arg *field; | 201 | struct tep_print_arg *field; |
| 202 | struct print_flag_sym *symbols; | 202 | struct tep_print_flag_sym *symbols; |
| 203 | }; | 203 | }; |
| 204 | 204 | ||
| 205 | struct print_arg_hex { | 205 | struct tep_print_arg_hex { |
| 206 | struct print_arg *field; | 206 | struct tep_print_arg *field; |
| 207 | struct print_arg *size; | 207 | struct tep_print_arg *size; |
| 208 | }; | 208 | }; |
| 209 | 209 | ||
| 210 | struct print_arg_int_array { | 210 | struct tep_print_arg_int_array { |
| 211 | struct print_arg *field; | 211 | struct tep_print_arg *field; |
| 212 | struct print_arg *count; | 212 | struct tep_print_arg *count; |
| 213 | struct print_arg *el_size; | 213 | struct tep_print_arg *el_size; |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | struct print_arg_dynarray { | 216 | struct tep_print_arg_dynarray { |
| 217 | struct tep_format_field *field; | 217 | struct tep_format_field *field; |
| 218 | struct print_arg *index; | 218 | struct tep_print_arg *index; |
| 219 | }; | 219 | }; |
| 220 | 220 | ||
| 221 | struct print_arg; | 221 | struct tep_print_arg; |
| 222 | 222 | ||
| 223 | struct print_arg_op { | 223 | struct tep_print_arg_op { |
| 224 | char *op; | 224 | char *op; |
| 225 | int prio; | 225 | int prio; |
| 226 | struct print_arg *left; | 226 | struct tep_print_arg *left; |
| 227 | struct print_arg *right; | 227 | struct tep_print_arg *right; |
| 228 | }; | 228 | }; |
| 229 | 229 | ||
| 230 | struct tep_function_handler; | 230 | struct tep_function_handler; |
| 231 | 231 | ||
| 232 | struct print_arg_func { | 232 | struct tep_print_arg_func { |
| 233 | struct tep_function_handler *func; | 233 | struct tep_function_handler *func; |
| 234 | struct print_arg *args; | 234 | struct tep_print_arg *args; |
| 235 | }; | 235 | }; |
| 236 | 236 | ||
| 237 | enum print_arg_type { | 237 | enum print_arg_type { |
| @@ -253,28 +253,28 @@ enum print_arg_type { | |||
| 253 | PRINT_HEX_STR, | 253 | PRINT_HEX_STR, |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | struct print_arg { | 256 | struct tep_print_arg { |
| 257 | struct print_arg *next; | 257 | struct tep_print_arg *next; |
| 258 | enum print_arg_type type; | 258 | enum print_arg_type type; |
| 259 | union { | 259 | union { |
| 260 | struct print_arg_atom atom; | 260 | struct tep_print_arg_atom atom; |
| 261 | struct print_arg_field field; | 261 | struct tep_print_arg_field field; |
| 262 | struct print_arg_typecast typecast; | 262 | struct tep_print_arg_typecast typecast; |
| 263 | struct print_arg_flags flags; | 263 | struct tep_print_arg_flags flags; |
| 264 | struct print_arg_symbol symbol; | 264 | struct tep_print_arg_symbol symbol; |
| 265 | struct print_arg_hex hex; | 265 | struct tep_print_arg_hex hex; |
| 266 | struct print_arg_int_array int_array; | 266 | struct tep_print_arg_int_array int_array; |
| 267 | struct print_arg_func func; | 267 | struct tep_print_arg_func func; |
| 268 | struct print_arg_string string; | 268 | struct tep_print_arg_string string; |
| 269 | struct print_arg_bitmask bitmask; | 269 | struct tep_print_arg_bitmask bitmask; |
| 270 | struct print_arg_op op; | 270 | struct tep_print_arg_op op; |
| 271 | struct print_arg_dynarray dynarray; | 271 | struct tep_print_arg_dynarray dynarray; |
| 272 | }; | 272 | }; |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | struct print_fmt { | 275 | struct tep_print_fmt { |
| 276 | char *format; | 276 | char *format; |
| 277 | struct print_arg *args; | 277 | struct tep_print_arg *args; |
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | struct tep_event_format { | 280 | struct tep_event_format { |
| @@ -283,7 +283,7 @@ struct tep_event_format { | |||
| 283 | int id; | 283 | int id; |
| 284 | int flags; | 284 | int flags; |
| 285 | struct tep_format format; | 285 | struct tep_format format; |
| 286 | struct print_fmt print_fmt; | 286 | struct tep_print_fmt print_fmt; |
| 287 | char *system; | 287 | char *system; |
| 288 | tep_event_handler_func handler; | 288 | tep_event_handler_func handler; |
| 289 | void *context; | 289 | void *context; |
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 5d6a55183ad6..481a1ecb1eaf 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
| @@ -99,7 +99,7 @@ static void define_symbolic_value(const char *ev_name, | |||
| 99 | LEAVE; | 99 | LEAVE; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static void define_symbolic_values(struct print_flag_sym *field, | 102 | static void define_symbolic_values(struct tep_print_flag_sym *field, |
| 103 | const char *ev_name, | 103 | const char *ev_name, |
| 104 | const char *field_name) | 104 | const char *field_name) |
| 105 | { | 105 | { |
| @@ -157,7 +157,7 @@ static void define_flag_value(const char *ev_name, | |||
| 157 | LEAVE; | 157 | LEAVE; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | static void define_flag_values(struct print_flag_sym *field, | 160 | static void define_flag_values(struct tep_print_flag_sym *field, |
| 161 | const char *ev_name, | 161 | const char *ev_name, |
| 162 | const char *field_name) | 162 | const char *field_name) |
| 163 | { | 163 | { |
| @@ -191,7 +191,7 @@ static void define_flag_field(const char *ev_name, | |||
| 191 | 191 | ||
| 192 | static void define_event_symbols(struct tep_event_format *event, | 192 | static void define_event_symbols(struct tep_event_format *event, |
| 193 | const char *ev_name, | 193 | const char *ev_name, |
| 194 | struct print_arg *args) | 194 | struct tep_print_arg *args) |
| 195 | { | 195 | { |
| 196 | if (args == NULL) | 196 | if (args == NULL) |
| 197 | return; | 197 | return; |
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index ba191def1ea9..35dc5f3b581b 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
| @@ -224,7 +224,7 @@ static void define_value(enum print_arg_type field_type, | |||
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | static void define_values(enum print_arg_type field_type, | 226 | static void define_values(enum print_arg_type field_type, |
| 227 | struct print_flag_sym *field, | 227 | struct tep_print_flag_sym *field, |
| 228 | const char *ev_name, | 228 | const char *ev_name, |
| 229 | const char *field_name) | 229 | const char *field_name) |
| 230 | { | 230 | { |
| @@ -266,7 +266,7 @@ static void define_field(enum print_arg_type field_type, | |||
| 266 | 266 | ||
| 267 | static void define_event_symbols(struct tep_event_format *event, | 267 | static void define_event_symbols(struct tep_event_format *event, |
| 268 | const char *ev_name, | 268 | const char *ev_name, |
| 269 | struct print_arg *args) | 269 | struct tep_print_arg *args) |
| 270 | { | 270 | { |
| 271 | if (args == NULL) | 271 | if (args == NULL) |
| 272 | return; | 272 | return; |
