diff options
author | Tzvetomir Stoyanov <tstoyanov@vmware.com> | 2018-11-30 10:44:07 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-12-17 12:56:02 -0500 |
commit | 97fbf3f0e0aa854ed33141dc9a5410f0ac6c71f3 (patch) | |
tree | af372b9195ebb0b8ec0c5eefece85c030a45e7c5 /tools/lib | |
parent | 4c784894ac29195af24362125a72beda4aeb8b9f (diff) |
tools lib traceevent, perf tools: Rename 'struct tep_event_format' to 'struct tep_event'
In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts.
This renames 'struct tep_event_format' to 'struct tep_event', which
describes more closely the purpose of the struct.
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181130154647.436403995@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[ Fixup conflict with 6e33c250a88f ("tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c") ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/traceevent/event-parse-api.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse-local.h | 6 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 188 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 62 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 42 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_function.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_hrtimer.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kmem.c | 2 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kvm.c | 14 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_mac80211.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_sched_switch.c | 4 |
11 files changed, 165 insertions, 165 deletions
diff --git a/tools/lib/traceevent/event-parse-api.c b/tools/lib/traceevent/event-parse-api.c index 61f7149085ee..0dc011154ee9 100644 --- a/tools/lib/traceevent/event-parse-api.c +++ b/tools/lib/traceevent/event-parse-api.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * This returns pointer to the first element of the events array | 15 | * This returns pointer to the first element of the events array |
16 | * If @tep is NULL, NULL is returned. | 16 | * If @tep is NULL, NULL is returned. |
17 | */ | 17 | */ |
18 | struct tep_event_format *tep_get_first_event(struct tep_handle *tep) | 18 | struct tep_event *tep_get_first_event(struct tep_handle *tep) |
19 | { | 19 | { |
20 | if (tep && tep->events) | 20 | if (tep && tep->events) |
21 | return tep->events[0]; | 21 | return tep->events[0]; |
diff --git a/tools/lib/traceevent/event-parse-local.h b/tools/lib/traceevent/event-parse-local.h index b9bddde577f8..94746efef433 100644 --- a/tools/lib/traceevent/event-parse-local.h +++ b/tools/lib/traceevent/event-parse-local.h | |||
@@ -50,9 +50,9 @@ struct tep_handle { | |||
50 | unsigned int printk_count; | 50 | unsigned int printk_count; |
51 | 51 | ||
52 | 52 | ||
53 | struct tep_event_format **events; | 53 | struct tep_event **events; |
54 | int nr_events; | 54 | int nr_events; |
55 | struct tep_event_format **sort_events; | 55 | struct tep_event **sort_events; |
56 | enum tep_event_sort_type last_type; | 56 | enum tep_event_sort_type last_type; |
57 | 57 | ||
58 | int type_offset; | 58 | int type_offset; |
@@ -84,7 +84,7 @@ struct tep_handle { | |||
84 | struct tep_function_handler *func_handlers; | 84 | struct tep_function_handler *func_handlers; |
85 | 85 | ||
86 | /* cache */ | 86 | /* cache */ |
87 | struct tep_event_format *last_event; | 87 | struct tep_event *last_event; |
88 | 88 | ||
89 | char *trace_clock; | 89 | char *trace_clock; |
90 | }; | 90 | }; |
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index d1e6ee3d43cf..047be5f700b5 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -96,7 +96,7 @@ struct tep_function_handler { | |||
96 | 96 | ||
97 | static unsigned long long | 97 | static unsigned long long |
98 | process_defined_func(struct trace_seq *s, void *data, int size, | 98 | process_defined_func(struct trace_seq *s, void *data, int size, |
99 | struct tep_event_format *event, struct tep_print_arg *arg); | 99 | struct tep_event *event, struct tep_print_arg *arg); |
100 | 100 | ||
101 | static void free_func_handle(struct tep_function_handler *func); | 101 | static void free_func_handle(struct tep_function_handler *func); |
102 | 102 | ||
@@ -739,16 +739,16 @@ void tep_print_printk(struct tep_handle *pevent) | |||
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | static struct tep_event_format *alloc_event(void) | 742 | static struct tep_event *alloc_event(void) |
743 | { | 743 | { |
744 | return calloc(1, sizeof(struct tep_event_format)); | 744 | return calloc(1, sizeof(struct tep_event)); |
745 | } | 745 | } |
746 | 746 | ||
747 | static int add_event(struct tep_handle *pevent, struct tep_event_format *event) | 747 | static int add_event(struct tep_handle *pevent, struct tep_event *event) |
748 | { | 748 | { |
749 | int i; | 749 | int i; |
750 | struct tep_event_format **events = realloc(pevent->events, sizeof(event) * | 750 | struct tep_event **events = realloc(pevent->events, sizeof(event) * |
751 | (pevent->nr_events + 1)); | 751 | (pevent->nr_events + 1)); |
752 | if (!events) | 752 | if (!events) |
753 | return -1; | 753 | return -1; |
754 | 754 | ||
@@ -1355,7 +1355,7 @@ static unsigned int type_size(const char *name) | |||
1355 | return 0; | 1355 | return 0; |
1356 | } | 1356 | } |
1357 | 1357 | ||
1358 | static int event_read_fields(struct tep_event_format *event, struct tep_format_field **fields) | 1358 | static int event_read_fields(struct tep_event *event, struct tep_format_field **fields) |
1359 | { | 1359 | { |
1360 | struct tep_format_field *field = NULL; | 1360 | struct tep_format_field *field = NULL; |
1361 | enum tep_event_type type; | 1361 | enum tep_event_type type; |
@@ -1642,7 +1642,7 @@ fail_expect: | |||
1642 | return -1; | 1642 | return -1; |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | static int event_read_format(struct tep_event_format *event) | 1645 | static int event_read_format(struct tep_event *event) |
1646 | { | 1646 | { |
1647 | char *token; | 1647 | char *token; |
1648 | int ret; | 1648 | int ret; |
@@ -1675,11 +1675,11 @@ static int event_read_format(struct tep_event_format *event) | |||
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | static enum tep_event_type | 1677 | static enum tep_event_type |
1678 | process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg, | 1678 | process_arg_token(struct tep_event *event, struct tep_print_arg *arg, |
1679 | char **tok, enum tep_event_type type); | 1679 | char **tok, enum tep_event_type type); |
1680 | 1680 | ||
1681 | static enum tep_event_type | 1681 | static enum tep_event_type |
1682 | process_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 1682 | process_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
1683 | { | 1683 | { |
1684 | enum tep_event_type type; | 1684 | enum tep_event_type type; |
1685 | char *token; | 1685 | char *token; |
@@ -1691,14 +1691,14 @@ process_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **to | |||
1691 | } | 1691 | } |
1692 | 1692 | ||
1693 | static enum tep_event_type | 1693 | static enum tep_event_type |
1694 | process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok); | 1694 | process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok); |
1695 | 1695 | ||
1696 | /* | 1696 | /* |
1697 | * For __print_symbolic() and __print_flags, we need to completely | 1697 | * For __print_symbolic() and __print_flags, we need to completely |
1698 | * evaluate the first argument, which defines what to print next. | 1698 | * evaluate the first argument, which defines what to print next. |
1699 | */ | 1699 | */ |
1700 | static enum tep_event_type | 1700 | static enum tep_event_type |
1701 | process_field_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 1701 | process_field_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
1702 | { | 1702 | { |
1703 | enum tep_event_type type; | 1703 | enum tep_event_type type; |
1704 | 1704 | ||
@@ -1712,7 +1712,7 @@ process_field_arg(struct tep_event_format *event, struct tep_print_arg *arg, cha | |||
1712 | } | 1712 | } |
1713 | 1713 | ||
1714 | static enum tep_event_type | 1714 | static enum tep_event_type |
1715 | process_cond(struct tep_event_format *event, struct tep_print_arg *top, char **tok) | 1715 | process_cond(struct tep_event *event, struct tep_print_arg *top, char **tok) |
1716 | { | 1716 | { |
1717 | struct tep_print_arg *arg, *left, *right; | 1717 | struct tep_print_arg *arg, *left, *right; |
1718 | enum tep_event_type type; | 1718 | enum tep_event_type type; |
@@ -1768,7 +1768,7 @@ out_free: | |||
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | static enum tep_event_type | 1770 | static enum tep_event_type |
1771 | process_array(struct tep_event_format *event, struct tep_print_arg *top, char **tok) | 1771 | process_array(struct tep_event *event, struct tep_print_arg *top, char **tok) |
1772 | { | 1772 | { |
1773 | struct tep_print_arg *arg; | 1773 | struct tep_print_arg *arg; |
1774 | enum tep_event_type type; | 1774 | enum tep_event_type type; |
@@ -1870,7 +1870,7 @@ static int set_op_prio(struct tep_print_arg *arg) | |||
1870 | 1870 | ||
1871 | /* Note, *tok does not get freed, but will most likely be saved */ | 1871 | /* Note, *tok does not get freed, but will most likely be saved */ |
1872 | static enum tep_event_type | 1872 | static enum tep_event_type |
1873 | process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 1873 | process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
1874 | { | 1874 | { |
1875 | struct tep_print_arg *left, *right = NULL; | 1875 | struct tep_print_arg *left, *right = NULL; |
1876 | enum tep_event_type type; | 1876 | enum tep_event_type type; |
@@ -2071,7 +2071,7 @@ out_free: | |||
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | static enum tep_event_type | 2073 | static enum tep_event_type |
2074 | process_entry(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, | 2074 | process_entry(struct tep_event *event __maybe_unused, struct tep_print_arg *arg, |
2075 | char **tok) | 2075 | char **tok) |
2076 | { | 2076 | { |
2077 | enum tep_event_type type; | 2077 | enum tep_event_type type; |
@@ -2110,7 +2110,7 @@ process_entry(struct tep_event_format *event __maybe_unused, struct tep_print_ar | |||
2110 | return TEP_EVENT_ERROR; | 2110 | return TEP_EVENT_ERROR; |
2111 | } | 2111 | } |
2112 | 2112 | ||
2113 | static int alloc_and_process_delim(struct tep_event_format *event, char *next_token, | 2113 | static int alloc_and_process_delim(struct tep_event *event, char *next_token, |
2114 | struct tep_print_arg **print_arg) | 2114 | struct tep_print_arg **print_arg) |
2115 | { | 2115 | { |
2116 | struct tep_print_arg *field; | 2116 | struct tep_print_arg *field; |
@@ -2445,7 +2445,7 @@ static char *arg_eval (struct tep_print_arg *arg) | |||
2445 | } | 2445 | } |
2446 | 2446 | ||
2447 | static enum tep_event_type | 2447 | static enum tep_event_type |
2448 | process_fields(struct tep_event_format *event, struct tep_print_flag_sym **list, char **tok) | 2448 | process_fields(struct tep_event *event, struct tep_print_flag_sym **list, char **tok) |
2449 | { | 2449 | { |
2450 | enum tep_event_type type; | 2450 | enum tep_event_type type; |
2451 | struct tep_print_arg *arg = NULL; | 2451 | struct tep_print_arg *arg = NULL; |
@@ -2526,7 +2526,7 @@ out_free: | |||
2526 | } | 2526 | } |
2527 | 2527 | ||
2528 | static enum tep_event_type | 2528 | static enum tep_event_type |
2529 | process_flags(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2529 | process_flags(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2530 | { | 2530 | { |
2531 | struct tep_print_arg *field; | 2531 | struct tep_print_arg *field; |
2532 | enum tep_event_type type; | 2532 | enum tep_event_type type; |
@@ -2579,7 +2579,7 @@ out_free: | |||
2579 | } | 2579 | } |
2580 | 2580 | ||
2581 | static enum tep_event_type | 2581 | static enum tep_event_type |
2582 | process_symbols(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2582 | process_symbols(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2583 | { | 2583 | { |
2584 | struct tep_print_arg *field; | 2584 | struct tep_print_arg *field; |
2585 | enum tep_event_type type; | 2585 | enum tep_event_type type; |
@@ -2618,7 +2618,7 @@ out_free: | |||
2618 | } | 2618 | } |
2619 | 2619 | ||
2620 | static enum tep_event_type | 2620 | static enum tep_event_type |
2621 | process_hex_common(struct tep_event_format *event, struct tep_print_arg *arg, | 2621 | process_hex_common(struct tep_event *event, struct tep_print_arg *arg, |
2622 | char **tok, enum tep_print_arg_type type) | 2622 | char **tok, enum tep_print_arg_type type) |
2623 | { | 2623 | { |
2624 | memset(arg, 0, sizeof(*arg)); | 2624 | memset(arg, 0, sizeof(*arg)); |
@@ -2641,20 +2641,20 @@ out: | |||
2641 | } | 2641 | } |
2642 | 2642 | ||
2643 | static enum tep_event_type | 2643 | static enum tep_event_type |
2644 | process_hex(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2644 | process_hex(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2645 | { | 2645 | { |
2646 | return process_hex_common(event, arg, tok, TEP_PRINT_HEX); | 2646 | return process_hex_common(event, arg, tok, TEP_PRINT_HEX); |
2647 | } | 2647 | } |
2648 | 2648 | ||
2649 | static enum tep_event_type | 2649 | static enum tep_event_type |
2650 | process_hex_str(struct tep_event_format *event, struct tep_print_arg *arg, | 2650 | process_hex_str(struct tep_event *event, struct tep_print_arg *arg, |
2651 | char **tok) | 2651 | char **tok) |
2652 | { | 2652 | { |
2653 | return process_hex_common(event, arg, tok, TEP_PRINT_HEX_STR); | 2653 | return process_hex_common(event, arg, tok, TEP_PRINT_HEX_STR); |
2654 | } | 2654 | } |
2655 | 2655 | ||
2656 | static enum tep_event_type | 2656 | static enum tep_event_type |
2657 | process_int_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2657 | process_int_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2658 | { | 2658 | { |
2659 | memset(arg, 0, sizeof(*arg)); | 2659 | memset(arg, 0, sizeof(*arg)); |
2660 | arg->type = TEP_PRINT_INT_ARRAY; | 2660 | arg->type = TEP_PRINT_INT_ARRAY; |
@@ -2682,7 +2682,7 @@ out: | |||
2682 | } | 2682 | } |
2683 | 2683 | ||
2684 | static enum tep_event_type | 2684 | static enum tep_event_type |
2685 | process_dynamic_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2685 | process_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2686 | { | 2686 | { |
2687 | struct tep_format_field *field; | 2687 | struct tep_format_field *field; |
2688 | enum tep_event_type type; | 2688 | enum tep_event_type type; |
@@ -2746,7 +2746,7 @@ process_dynamic_array(struct tep_event_format *event, struct tep_print_arg *arg, | |||
2746 | } | 2746 | } |
2747 | 2747 | ||
2748 | static enum tep_event_type | 2748 | static enum tep_event_type |
2749 | process_dynamic_array_len(struct tep_event_format *event, struct tep_print_arg *arg, | 2749 | process_dynamic_array_len(struct tep_event *event, struct tep_print_arg *arg, |
2750 | char **tok) | 2750 | char **tok) |
2751 | { | 2751 | { |
2752 | struct tep_format_field *field; | 2752 | struct tep_format_field *field; |
@@ -2782,7 +2782,7 @@ process_dynamic_array_len(struct tep_event_format *event, struct tep_print_arg * | |||
2782 | } | 2782 | } |
2783 | 2783 | ||
2784 | static enum tep_event_type | 2784 | static enum tep_event_type |
2785 | process_paren(struct tep_event_format *event, struct tep_print_arg *arg, char **tok) | 2785 | process_paren(struct tep_event *event, struct tep_print_arg *arg, char **tok) |
2786 | { | 2786 | { |
2787 | struct tep_print_arg *item_arg; | 2787 | struct tep_print_arg *item_arg; |
2788 | enum tep_event_type type; | 2788 | enum tep_event_type type; |
@@ -2845,7 +2845,7 @@ process_paren(struct tep_event_format *event, struct tep_print_arg *arg, char ** | |||
2845 | 2845 | ||
2846 | 2846 | ||
2847 | static enum tep_event_type | 2847 | static enum tep_event_type |
2848 | process_str(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, | 2848 | process_str(struct tep_event *event __maybe_unused, struct tep_print_arg *arg, |
2849 | char **tok) | 2849 | char **tok) |
2850 | { | 2850 | { |
2851 | enum tep_event_type type; | 2851 | enum tep_event_type type; |
@@ -2874,7 +2874,7 @@ process_str(struct tep_event_format *event __maybe_unused, struct tep_print_arg | |||
2874 | } | 2874 | } |
2875 | 2875 | ||
2876 | static enum tep_event_type | 2876 | static enum tep_event_type |
2877 | process_bitmask(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg, | 2877 | process_bitmask(struct tep_event *event __maybe_unused, struct tep_print_arg *arg, |
2878 | char **tok) | 2878 | char **tok) |
2879 | { | 2879 | { |
2880 | enum tep_event_type type; | 2880 | enum tep_event_type type; |
@@ -2935,7 +2935,7 @@ static void remove_func_handler(struct tep_handle *pevent, char *func_name) | |||
2935 | } | 2935 | } |
2936 | 2936 | ||
2937 | static enum tep_event_type | 2937 | static enum tep_event_type |
2938 | process_func_handler(struct tep_event_format *event, struct tep_function_handler *func, | 2938 | process_func_handler(struct tep_event *event, struct tep_function_handler *func, |
2939 | struct tep_print_arg *arg, char **tok) | 2939 | struct tep_print_arg *arg, char **tok) |
2940 | { | 2940 | { |
2941 | struct tep_print_arg **next_arg; | 2941 | struct tep_print_arg **next_arg; |
@@ -2993,7 +2993,7 @@ err: | |||
2993 | } | 2993 | } |
2994 | 2994 | ||
2995 | static enum tep_event_type | 2995 | static enum tep_event_type |
2996 | process_function(struct tep_event_format *event, struct tep_print_arg *arg, | 2996 | process_function(struct tep_event *event, struct tep_print_arg *arg, |
2997 | char *token, char **tok) | 2997 | char *token, char **tok) |
2998 | { | 2998 | { |
2999 | struct tep_function_handler *func; | 2999 | struct tep_function_handler *func; |
@@ -3049,7 +3049,7 @@ process_function(struct tep_event_format *event, struct tep_print_arg *arg, | |||
3049 | } | 3049 | } |
3050 | 3050 | ||
3051 | static enum tep_event_type | 3051 | static enum tep_event_type |
3052 | process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg, | 3052 | process_arg_token(struct tep_event *event, struct tep_print_arg *arg, |
3053 | char **tok, enum tep_event_type type) | 3053 | char **tok, enum tep_event_type type) |
3054 | { | 3054 | { |
3055 | char *token; | 3055 | char *token; |
@@ -3137,7 +3137,7 @@ process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg, | |||
3137 | return type; | 3137 | return type; |
3138 | } | 3138 | } |
3139 | 3139 | ||
3140 | static int event_read_print_args(struct tep_event_format *event, struct tep_print_arg **list) | 3140 | static int event_read_print_args(struct tep_event *event, struct tep_print_arg **list) |
3141 | { | 3141 | { |
3142 | enum tep_event_type type = TEP_EVENT_ERROR; | 3142 | enum tep_event_type type = TEP_EVENT_ERROR; |
3143 | struct tep_print_arg *arg; | 3143 | struct tep_print_arg *arg; |
@@ -3195,7 +3195,7 @@ static int event_read_print_args(struct tep_event_format *event, struct tep_prin | |||
3195 | return args; | 3195 | return args; |
3196 | } | 3196 | } |
3197 | 3197 | ||
3198 | static int event_read_print(struct tep_event_format *event) | 3198 | static int event_read_print(struct tep_event *event) |
3199 | { | 3199 | { |
3200 | enum tep_event_type type; | 3200 | enum tep_event_type type; |
3201 | char *token; | 3201 | char *token; |
@@ -3261,7 +3261,7 @@ static int event_read_print(struct tep_event_format *event) | |||
3261 | * This only searchs the common fields and not all field. | 3261 | * This only searchs the common fields and not all field. |
3262 | */ | 3262 | */ |
3263 | struct tep_format_field * | 3263 | struct tep_format_field * |
3264 | tep_find_common_field(struct tep_event_format *event, const char *name) | 3264 | tep_find_common_field(struct tep_event *event, const char *name) |
3265 | { | 3265 | { |
3266 | struct tep_format_field *format; | 3266 | struct tep_format_field *format; |
3267 | 3267 | ||
@@ -3283,7 +3283,7 @@ tep_find_common_field(struct tep_event_format *event, const char *name) | |||
3283 | * This does not search common fields. | 3283 | * This does not search common fields. |
3284 | */ | 3284 | */ |
3285 | struct tep_format_field * | 3285 | struct tep_format_field * |
3286 | tep_find_field(struct tep_event_format *event, const char *name) | 3286 | tep_find_field(struct tep_event *event, const char *name) |
3287 | { | 3287 | { |
3288 | struct tep_format_field *format; | 3288 | struct tep_format_field *format; |
3289 | 3289 | ||
@@ -3306,7 +3306,7 @@ tep_find_field(struct tep_event_format *event, const char *name) | |||
3306 | * the non-common ones if a common one was not found. | 3306 | * the non-common ones if a common one was not found. |
3307 | */ | 3307 | */ |
3308 | struct tep_format_field * | 3308 | struct tep_format_field * |
3309 | tep_find_any_field(struct tep_event_format *event, const char *name) | 3309 | tep_find_any_field(struct tep_event *event, const char *name) |
3310 | { | 3310 | { |
3311 | struct tep_format_field *format; | 3311 | struct tep_format_field *format; |
3312 | 3312 | ||
@@ -3375,7 +3375,7 @@ int tep_read_number_field(struct tep_format_field *field, const void *data, | |||
3375 | static int get_common_info(struct tep_handle *pevent, | 3375 | static int get_common_info(struct tep_handle *pevent, |
3376 | const char *type, int *offset, int *size) | 3376 | const char *type, int *offset, int *size) |
3377 | { | 3377 | { |
3378 | struct tep_event_format *event; | 3378 | struct tep_event *event; |
3379 | struct tep_format_field *field; | 3379 | struct tep_format_field *field; |
3380 | 3380 | ||
3381 | /* | 3381 | /* |
@@ -3462,11 +3462,11 @@ static int events_id_cmp(const void *a, const void *b); | |||
3462 | * | 3462 | * |
3463 | * Returns an event that has a given @id. | 3463 | * Returns an event that has a given @id. |
3464 | */ | 3464 | */ |
3465 | struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id) | 3465 | struct tep_event *tep_find_event(struct tep_handle *pevent, int id) |
3466 | { | 3466 | { |
3467 | struct tep_event_format **eventptr; | 3467 | struct tep_event **eventptr; |
3468 | struct tep_event_format key; | 3468 | struct tep_event key; |
3469 | struct tep_event_format *pkey = &key; | 3469 | struct tep_event *pkey = &key; |
3470 | 3470 | ||
3471 | /* Check cache first */ | 3471 | /* Check cache first */ |
3472 | if (pevent->last_event && pevent->last_event->id == id) | 3472 | if (pevent->last_event && pevent->last_event->id == id) |
@@ -3494,11 +3494,11 @@ struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id) | |||
3494 | * This returns an event with a given @name and under the system | 3494 | * This returns an event with a given @name and under the system |
3495 | * @sys. If @sys is NULL the first event with @name is returned. | 3495 | * @sys. If @sys is NULL the first event with @name is returned. |
3496 | */ | 3496 | */ |
3497 | struct tep_event_format * | 3497 | struct tep_event * |
3498 | tep_find_event_by_name(struct tep_handle *pevent, | 3498 | tep_find_event_by_name(struct tep_handle *pevent, |
3499 | const char *sys, const char *name) | 3499 | const char *sys, const char *name) |
3500 | { | 3500 | { |
3501 | struct tep_event_format *event = NULL; | 3501 | struct tep_event *event = NULL; |
3502 | int i; | 3502 | int i; |
3503 | 3503 | ||
3504 | if (pevent->last_event && | 3504 | if (pevent->last_event && |
@@ -3523,7 +3523,7 @@ tep_find_event_by_name(struct tep_handle *pevent, | |||
3523 | } | 3523 | } |
3524 | 3524 | ||
3525 | static unsigned long long | 3525 | static unsigned long long |
3526 | eval_num_arg(void *data, int size, struct tep_event_format *event, struct tep_print_arg *arg) | 3526 | eval_num_arg(void *data, int size, struct tep_event *event, struct tep_print_arg *arg) |
3527 | { | 3527 | { |
3528 | struct tep_handle *pevent = event->pevent; | 3528 | struct tep_handle *pevent = event->pevent; |
3529 | unsigned long long val = 0; | 3529 | unsigned long long val = 0; |
@@ -3863,7 +3863,7 @@ static void print_bitmask_to_seq(struct tep_handle *pevent, | |||
3863 | } | 3863 | } |
3864 | 3864 | ||
3865 | static void print_str_arg(struct trace_seq *s, void *data, int size, | 3865 | static void print_str_arg(struct trace_seq *s, void *data, int size, |
3866 | struct tep_event_format *event, const char *format, | 3866 | struct tep_event *event, const char *format, |
3867 | int len_arg, struct tep_print_arg *arg) | 3867 | int len_arg, struct tep_print_arg *arg) |
3868 | { | 3868 | { |
3869 | struct tep_handle *pevent = event->pevent; | 3869 | struct tep_handle *pevent = event->pevent; |
@@ -4118,7 +4118,7 @@ out_warning_field: | |||
4118 | 4118 | ||
4119 | static unsigned long long | 4119 | static unsigned long long |
4120 | process_defined_func(struct trace_seq *s, void *data, int size, | 4120 | process_defined_func(struct trace_seq *s, void *data, int size, |
4121 | struct tep_event_format *event, struct tep_print_arg *arg) | 4121 | struct tep_event *event, struct tep_print_arg *arg) |
4122 | { | 4122 | { |
4123 | struct tep_function_handler *func_handle = arg->func.func; | 4123 | struct tep_function_handler *func_handle = arg->func.func; |
4124 | struct func_params *param; | 4124 | struct func_params *param; |
@@ -4213,7 +4213,7 @@ static void free_args(struct tep_print_arg *args) | |||
4213 | } | 4213 | } |
4214 | } | 4214 | } |
4215 | 4215 | ||
4216 | static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event) | 4216 | static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event *event) |
4217 | { | 4217 | { |
4218 | struct tep_handle *pevent = event->pevent; | 4218 | struct tep_handle *pevent = event->pevent; |
4219 | struct tep_format_field *field, *ip_field; | 4219 | struct tep_format_field *field, *ip_field; |
@@ -4390,7 +4390,7 @@ out_free: | |||
4390 | 4390 | ||
4391 | static char * | 4391 | static char * |
4392 | get_bprint_format(void *data, int size __maybe_unused, | 4392 | get_bprint_format(void *data, int size __maybe_unused, |
4393 | struct tep_event_format *event) | 4393 | struct tep_event *event) |
4394 | { | 4394 | { |
4395 | struct tep_handle *pevent = event->pevent; | 4395 | struct tep_handle *pevent = event->pevent; |
4396 | unsigned long long addr; | 4396 | unsigned long long addr; |
@@ -4425,7 +4425,7 @@ get_bprint_format(void *data, int size __maybe_unused, | |||
4425 | } | 4425 | } |
4426 | 4426 | ||
4427 | static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, | 4427 | static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, |
4428 | struct tep_event_format *event, struct tep_print_arg *arg) | 4428 | struct tep_event *event, struct tep_print_arg *arg) |
4429 | { | 4429 | { |
4430 | unsigned char *buf; | 4430 | unsigned char *buf; |
4431 | const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; | 4431 | 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 | * %pISpc print an IP address based on sockaddr; p adds port. | 4578 | * %pISpc print an IP address based on sockaddr; p adds port. |
4579 | */ | 4579 | */ |
4580 | static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, | 4580 | static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, |
4581 | void *data, int size, struct tep_event_format *event, | 4581 | void *data, int size, struct tep_event *event, |
4582 | struct tep_print_arg *arg) | 4582 | struct tep_print_arg *arg) |
4583 | { | 4583 | { |
4584 | unsigned char *buf; | 4584 | unsigned char *buf; |
@@ -4615,7 +4615,7 @@ static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, | |||
4615 | } | 4615 | } |
4616 | 4616 | ||
4617 | static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, | 4617 | static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, |
4618 | void *data, int size, struct tep_event_format *event, | 4618 | void *data, int size, struct tep_event *event, |
4619 | struct tep_print_arg *arg) | 4619 | struct tep_print_arg *arg) |
4620 | { | 4620 | { |
4621 | char have_c = 0; | 4621 | char have_c = 0; |
@@ -4665,7 +4665,7 @@ static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, | |||
4665 | } | 4665 | } |
4666 | 4666 | ||
4667 | static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, | 4667 | static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, |
4668 | void *data, int size, struct tep_event_format *event, | 4668 | void *data, int size, struct tep_event *event, |
4669 | struct tep_print_arg *arg) | 4669 | struct tep_print_arg *arg) |
4670 | { | 4670 | { |
4671 | char have_c = 0, have_p = 0; | 4671 | char have_c = 0, have_p = 0; |
@@ -4747,7 +4747,7 @@ static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, | |||
4747 | } | 4747 | } |
4748 | 4748 | ||
4749 | static int print_ip_arg(struct trace_seq *s, const char *ptr, | 4749 | static int print_ip_arg(struct trace_seq *s, const char *ptr, |
4750 | void *data, int size, struct tep_event_format *event, | 4750 | void *data, int size, struct tep_event *event, |
4751 | struct tep_print_arg *arg) | 4751 | struct tep_print_arg *arg) |
4752 | { | 4752 | { |
4753 | char i = *ptr; /* 'i' or 'I' */ | 4753 | char i = *ptr; /* 'i' or 'I' */ |
@@ -4854,7 +4854,7 @@ void tep_print_field(struct trace_seq *s, void *data, | |||
4854 | } | 4854 | } |
4855 | 4855 | ||
4856 | void tep_print_fields(struct trace_seq *s, void *data, | 4856 | void tep_print_fields(struct trace_seq *s, void *data, |
4857 | int size __maybe_unused, struct tep_event_format *event) | 4857 | int size __maybe_unused, struct tep_event *event) |
4858 | { | 4858 | { |
4859 | struct tep_format_field *field; | 4859 | struct tep_format_field *field; |
4860 | 4860 | ||
@@ -4866,7 +4866,7 @@ void tep_print_fields(struct trace_seq *s, void *data, | |||
4866 | } | 4866 | } |
4867 | } | 4867 | } |
4868 | 4868 | ||
4869 | static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event_format *event) | 4869 | static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event *event) |
4870 | { | 4870 | { |
4871 | struct tep_handle *pevent = event->pevent; | 4871 | struct tep_handle *pevent = event->pevent; |
4872 | struct tep_print_fmt *print_fmt = &event->print_fmt; | 4872 | struct tep_print_fmt *print_fmt = &event->print_fmt; |
@@ -5229,7 +5229,7 @@ int tep_data_type(struct tep_handle *pevent, struct tep_record *rec) | |||
5229 | * | 5229 | * |
5230 | * This returns the event form a given @type; | 5230 | * This returns the event form a given @type; |
5231 | */ | 5231 | */ |
5232 | struct tep_event_format *tep_data_event_from_type(struct tep_handle *pevent, int type) | 5232 | struct tep_event *tep_data_event_from_type(struct tep_handle *pevent, int type) |
5233 | { | 5233 | { |
5234 | return tep_find_event(pevent, type); | 5234 | return tep_find_event(pevent, type); |
5235 | } | 5235 | } |
@@ -5387,7 +5387,7 @@ int tep_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline) | |||
5387 | * This parses the raw @data using the given @event information and | 5387 | * This parses the raw @data using the given @event information and |
5388 | * writes the print format into the trace_seq. | 5388 | * writes the print format into the trace_seq. |
5389 | */ | 5389 | */ |
5390 | void tep_event_info(struct trace_seq *s, struct tep_event_format *event, | 5390 | void tep_event_info(struct trace_seq *s, struct tep_event *event, |
5391 | struct tep_record *record) | 5391 | struct tep_record *record) |
5392 | { | 5392 | { |
5393 | int print_pretty = 1; | 5393 | int print_pretty = 1; |
@@ -5428,7 +5428,7 @@ static bool is_timestamp_in_us(char *trace_clock, bool use_trace_clock) | |||
5428 | * Returns the associated event for a given record, or NULL if non is | 5428 | * Returns the associated event for a given record, or NULL if non is |
5429 | * is found. | 5429 | * is found. |
5430 | */ | 5430 | */ |
5431 | struct tep_event_format * | 5431 | struct tep_event * |
5432 | tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record) | 5432 | tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record) |
5433 | { | 5433 | { |
5434 | int type; | 5434 | int type; |
@@ -5453,7 +5453,7 @@ tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record) | |||
5453 | * Writes the tasks comm, pid and CPU to @s. | 5453 | * Writes the tasks comm, pid and CPU to @s. |
5454 | */ | 5454 | */ |
5455 | void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | 5455 | void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
5456 | struct tep_event_format *event, | 5456 | struct tep_event *event, |
5457 | struct tep_record *record) | 5457 | struct tep_record *record) |
5458 | { | 5458 | { |
5459 | void *data = record->data; | 5459 | void *data = record->data; |
@@ -5481,7 +5481,7 @@ void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | |||
5481 | * Writes the timestamp of the record into @s. | 5481 | * Writes the timestamp of the record into @s. |
5482 | */ | 5482 | */ |
5483 | void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | 5483 | void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
5484 | struct tep_event_format *event, | 5484 | struct tep_event *event, |
5485 | struct tep_record *record, | 5485 | struct tep_record *record, |
5486 | bool use_trace_clock) | 5486 | bool use_trace_clock) |
5487 | { | 5487 | { |
@@ -5531,7 +5531,7 @@ void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | |||
5531 | * Writes the parsing of the record's data to @s. | 5531 | * Writes the parsing of the record's data to @s. |
5532 | */ | 5532 | */ |
5533 | void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | 5533 | void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
5534 | struct tep_event_format *event, | 5534 | struct tep_event *event, |
5535 | struct tep_record *record) | 5535 | struct tep_record *record) |
5536 | { | 5536 | { |
5537 | static const char *spaces = " "; /* 20 spaces */ | 5537 | static const char *spaces = " "; /* 20 spaces */ |
@@ -5550,7 +5550,7 @@ void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | |||
5550 | void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, | 5550 | void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, |
5551 | struct tep_record *record, bool use_trace_clock) | 5551 | struct tep_record *record, bool use_trace_clock) |
5552 | { | 5552 | { |
5553 | struct tep_event_format *event; | 5553 | struct tep_event *event; |
5554 | 5554 | ||
5555 | event = tep_find_event_by_record(pevent, record); | 5555 | event = tep_find_event_by_record(pevent, record); |
5556 | if (!event) { | 5556 | if (!event) { |
@@ -5572,8 +5572,8 @@ void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, | |||
5572 | 5572 | ||
5573 | static int events_id_cmp(const void *a, const void *b) | 5573 | static int events_id_cmp(const void *a, const void *b) |
5574 | { | 5574 | { |
5575 | struct tep_event_format * const * ea = a; | 5575 | struct tep_event * const * ea = a; |
5576 | struct tep_event_format * const * eb = b; | 5576 | struct tep_event * const * eb = b; |
5577 | 5577 | ||
5578 | if ((*ea)->id < (*eb)->id) | 5578 | if ((*ea)->id < (*eb)->id) |
5579 | return -1; | 5579 | return -1; |
@@ -5586,8 +5586,8 @@ static int events_id_cmp(const void *a, const void *b) | |||
5586 | 5586 | ||
5587 | static int events_name_cmp(const void *a, const void *b) | 5587 | static int events_name_cmp(const void *a, const void *b) |
5588 | { | 5588 | { |
5589 | struct tep_event_format * const * ea = a; | 5589 | struct tep_event * const * ea = a; |
5590 | struct tep_event_format * const * eb = b; | 5590 | struct tep_event * const * eb = b; |
5591 | int res; | 5591 | int res; |
5592 | 5592 | ||
5593 | res = strcmp((*ea)->name, (*eb)->name); | 5593 | res = strcmp((*ea)->name, (*eb)->name); |
@@ -5603,8 +5603,8 @@ static int events_name_cmp(const void *a, const void *b) | |||
5603 | 5603 | ||
5604 | static int events_system_cmp(const void *a, const void *b) | 5604 | static int events_system_cmp(const void *a, const void *b) |
5605 | { | 5605 | { |
5606 | struct tep_event_format * const * ea = a; | 5606 | struct tep_event * const * ea = a; |
5607 | struct tep_event_format * const * eb = b; | 5607 | struct tep_event * const * eb = b; |
5608 | int res; | 5608 | int res; |
5609 | 5609 | ||
5610 | res = strcmp((*ea)->system, (*eb)->system); | 5610 | res = strcmp((*ea)->system, (*eb)->system); |
@@ -5618,9 +5618,9 @@ static int events_system_cmp(const void *a, const void *b) | |||
5618 | return events_id_cmp(a, b); | 5618 | return events_id_cmp(a, b); |
5619 | } | 5619 | } |
5620 | 5620 | ||
5621 | struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum tep_event_sort_type sort_type) | 5621 | struct tep_event **tep_list_events(struct tep_handle *pevent, enum tep_event_sort_type sort_type) |
5622 | { | 5622 | { |
5623 | struct tep_event_format **events; | 5623 | struct tep_event **events; |
5624 | int (*sort)(const void *a, const void *b); | 5624 | int (*sort)(const void *a, const void *b); |
5625 | 5625 | ||
5626 | events = pevent->sort_events; | 5626 | events = pevent->sort_events; |
@@ -5703,7 +5703,7 @@ get_event_fields(const char *type, const char *name, | |||
5703 | * Returns an allocated array of fields. The last item in the array is NULL. | 5703 | * Returns an allocated array of fields. The last item in the array is NULL. |
5704 | * The array must be freed with free(). | 5704 | * The array must be freed with free(). |
5705 | */ | 5705 | */ |
5706 | struct tep_format_field **tep_event_common_fields(struct tep_event_format *event) | 5706 | struct tep_format_field **tep_event_common_fields(struct tep_event *event) |
5707 | { | 5707 | { |
5708 | return get_event_fields("common", event->name, | 5708 | return get_event_fields("common", event->name, |
5709 | event->format.nr_common, | 5709 | event->format.nr_common, |
@@ -5717,7 +5717,7 @@ struct tep_format_field **tep_event_common_fields(struct tep_event_format *event | |||
5717 | * Returns an allocated array of fields. The last item in the array is NULL. | 5717 | * Returns an allocated array of fields. The last item in the array is NULL. |
5718 | * The array must be freed with free(). | 5718 | * The array must be freed with free(). |
5719 | */ | 5719 | */ |
5720 | struct tep_format_field **tep_event_fields(struct tep_event_format *event) | 5720 | struct tep_format_field **tep_event_fields(struct tep_event *event) |
5721 | { | 5721 | { |
5722 | return get_event_fields("event", event->name, | 5722 | return get_event_fields("event", event->name, |
5723 | event->format.nr_fields, | 5723 | event->format.nr_fields, |
@@ -5959,7 +5959,7 @@ int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long si | |||
5959 | return 0; | 5959 | return 0; |
5960 | } | 5960 | } |
5961 | 5961 | ||
5962 | static int event_matches(struct tep_event_format *event, | 5962 | static int event_matches(struct tep_event *event, |
5963 | int id, const char *sys_name, | 5963 | int id, const char *sys_name, |
5964 | const char *event_name) | 5964 | const char *event_name) |
5965 | { | 5965 | { |
@@ -5982,7 +5982,7 @@ static void free_handler(struct event_handler *handle) | |||
5982 | free(handle); | 5982 | free(handle); |
5983 | } | 5983 | } |
5984 | 5984 | ||
5985 | static int find_event_handle(struct tep_handle *pevent, struct tep_event_format *event) | 5985 | static int find_event_handle(struct tep_handle *pevent, struct tep_event *event) |
5986 | { | 5986 | { |
5987 | struct event_handler *handle, **next; | 5987 | struct event_handler *handle, **next; |
5988 | 5988 | ||
@@ -6023,11 +6023,11 @@ static int find_event_handle(struct tep_handle *pevent, struct tep_event_format | |||
6023 | * | 6023 | * |
6024 | * /sys/kernel/debug/tracing/events/.../.../format | 6024 | * /sys/kernel/debug/tracing/events/.../.../format |
6025 | */ | 6025 | */ |
6026 | enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | 6026 | enum tep_errno __tep_parse_format(struct tep_event **eventp, |
6027 | struct tep_handle *pevent, const char *buf, | 6027 | struct tep_handle *pevent, const char *buf, |
6028 | unsigned long size, const char *sys) | 6028 | unsigned long size, const char *sys) |
6029 | { | 6029 | { |
6030 | struct tep_event_format *event; | 6030 | struct tep_event *event; |
6031 | int ret; | 6031 | int ret; |
6032 | 6032 | ||
6033 | init_input_buf(buf, size); | 6033 | init_input_buf(buf, size); |
@@ -6132,12 +6132,12 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, | |||
6132 | 6132 | ||
6133 | static enum tep_errno | 6133 | static enum tep_errno |
6134 | __parse_event(struct tep_handle *pevent, | 6134 | __parse_event(struct tep_handle *pevent, |
6135 | struct tep_event_format **eventp, | 6135 | struct tep_event **eventp, |
6136 | const char *buf, unsigned long size, | 6136 | const char *buf, unsigned long size, |
6137 | const char *sys) | 6137 | const char *sys) |
6138 | { | 6138 | { |
6139 | int ret = __tep_parse_format(eventp, pevent, buf, size, sys); | 6139 | int ret = __tep_parse_format(eventp, pevent, buf, size, sys); |
6140 | struct tep_event_format *event = *eventp; | 6140 | struct tep_event *event = *eventp; |
6141 | 6141 | ||
6142 | if (event == NULL) | 6142 | if (event == NULL) |
6143 | return ret; | 6143 | return ret; |
@@ -6174,7 +6174,7 @@ event_add_failed: | |||
6174 | * /sys/kernel/debug/tracing/events/.../.../format | 6174 | * /sys/kernel/debug/tracing/events/.../.../format |
6175 | */ | 6175 | */ |
6176 | enum tep_errno tep_parse_format(struct tep_handle *pevent, | 6176 | enum tep_errno tep_parse_format(struct tep_handle *pevent, |
6177 | struct tep_event_format **eventp, | 6177 | struct tep_event **eventp, |
6178 | const char *buf, | 6178 | const char *buf, |
6179 | unsigned long size, const char *sys) | 6179 | unsigned long size, const char *sys) |
6180 | { | 6180 | { |
@@ -6198,7 +6198,7 @@ enum tep_errno tep_parse_format(struct tep_handle *pevent, | |||
6198 | enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, | 6198 | enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, |
6199 | unsigned long size, const char *sys) | 6199 | unsigned long size, const char *sys) |
6200 | { | 6200 | { |
6201 | struct tep_event_format *event = NULL; | 6201 | struct tep_event *event = NULL; |
6202 | return __parse_event(pevent, &event, buf, size, sys); | 6202 | return __parse_event(pevent, &event, buf, size, sys); |
6203 | } | 6203 | } |
6204 | 6204 | ||
@@ -6235,7 +6235,7 @@ int get_field_val(struct trace_seq *s, struct tep_format_field *field, | |||
6235 | * | 6235 | * |
6236 | * On failure, it returns NULL. | 6236 | * On failure, it returns NULL. |
6237 | */ | 6237 | */ |
6238 | void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, | 6238 | void *tep_get_field_raw(struct trace_seq *s, struct tep_event *event, |
6239 | const char *name, struct tep_record *record, | 6239 | const char *name, struct tep_record *record, |
6240 | int *len, int err) | 6240 | int *len, int err) |
6241 | { | 6241 | { |
@@ -6282,7 +6282,7 @@ void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, | |||
6282 | * | 6282 | * |
6283 | * Returns 0 on success -1 on field not found. | 6283 | * Returns 0 on success -1 on field not found. |
6284 | */ | 6284 | */ |
6285 | int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, | 6285 | int tep_get_field_val(struct trace_seq *s, struct tep_event *event, |
6286 | const char *name, struct tep_record *record, | 6286 | const char *name, struct tep_record *record, |
6287 | unsigned long long *val, int err) | 6287 | unsigned long long *val, int err) |
6288 | { | 6288 | { |
@@ -6307,7 +6307,7 @@ int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, | |||
6307 | * | 6307 | * |
6308 | * Returns 0 on success -1 on field not found. | 6308 | * Returns 0 on success -1 on field not found. |
6309 | */ | 6309 | */ |
6310 | int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event, | 6310 | int tep_get_common_field_val(struct trace_seq *s, struct tep_event *event, |
6311 | const char *name, struct tep_record *record, | 6311 | const char *name, struct tep_record *record, |
6312 | unsigned long long *val, int err) | 6312 | unsigned long long *val, int err) |
6313 | { | 6313 | { |
@@ -6332,7 +6332,7 @@ int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event | |||
6332 | * | 6332 | * |
6333 | * Returns 0 on success -1 on field not found. | 6333 | * Returns 0 on success -1 on field not found. |
6334 | */ | 6334 | */ |
6335 | int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, | 6335 | int tep_get_any_field_val(struct trace_seq *s, struct tep_event *event, |
6336 | const char *name, struct tep_record *record, | 6336 | const char *name, struct tep_record *record, |
6337 | unsigned long long *val, int err) | 6337 | unsigned long long *val, int err) |
6338 | { | 6338 | { |
@@ -6358,7 +6358,7 @@ int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, | |||
6358 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. | 6358 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. |
6359 | */ | 6359 | */ |
6360 | int tep_print_num_field(struct trace_seq *s, const char *fmt, | 6360 | int tep_print_num_field(struct trace_seq *s, const char *fmt, |
6361 | struct tep_event_format *event, const char *name, | 6361 | struct tep_event *event, const char *name, |
6362 | struct tep_record *record, int err) | 6362 | struct tep_record *record, int err) |
6363 | { | 6363 | { |
6364 | struct tep_format_field *field = tep_find_field(event, name); | 6364 | struct tep_format_field *field = tep_find_field(event, name); |
@@ -6390,7 +6390,7 @@ int tep_print_num_field(struct trace_seq *s, const char *fmt, | |||
6390 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. | 6390 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. |
6391 | */ | 6391 | */ |
6392 | int tep_print_func_field(struct trace_seq *s, const char *fmt, | 6392 | int tep_print_func_field(struct trace_seq *s, const char *fmt, |
6393 | struct tep_event_format *event, const char *name, | 6393 | struct tep_event *event, const char *name, |
6394 | struct tep_record *record, int err) | 6394 | struct tep_record *record, int err) |
6395 | { | 6395 | { |
6396 | struct tep_format_field *field = tep_find_field(event, name); | 6396 | struct tep_format_field *field = tep_find_field(event, name); |
@@ -6550,11 +6550,11 @@ int tep_unregister_print_function(struct tep_handle *pevent, | |||
6550 | return -1; | 6550 | return -1; |
6551 | } | 6551 | } |
6552 | 6552 | ||
6553 | static struct tep_event_format *search_event(struct tep_handle *pevent, int id, | 6553 | static struct tep_event *search_event(struct tep_handle *pevent, int id, |
6554 | const char *sys_name, | 6554 | const char *sys_name, |
6555 | const char *event_name) | 6555 | const char *event_name) |
6556 | { | 6556 | { |
6557 | struct tep_event_format *event; | 6557 | struct tep_event *event; |
6558 | 6558 | ||
6559 | if (id >= 0) { | 6559 | if (id >= 0) { |
6560 | /* search by id */ | 6560 | /* search by id */ |
@@ -6594,7 +6594,7 @@ int tep_register_event_handler(struct tep_handle *pevent, int id, | |||
6594 | const char *sys_name, const char *event_name, | 6594 | const char *sys_name, const char *event_name, |
6595 | tep_event_handler_func func, void *context) | 6595 | tep_event_handler_func func, void *context) |
6596 | { | 6596 | { |
6597 | struct tep_event_format *event; | 6597 | struct tep_event *event; |
6598 | struct event_handler *handle; | 6598 | struct event_handler *handle; |
6599 | 6599 | ||
6600 | event = search_event(pevent, id, sys_name, event_name); | 6600 | event = search_event(pevent, id, sys_name, event_name); |
@@ -6678,7 +6678,7 @@ int tep_unregister_event_handler(struct tep_handle *pevent, int id, | |||
6678 | const char *sys_name, const char *event_name, | 6678 | const char *sys_name, const char *event_name, |
6679 | tep_event_handler_func func, void *context) | 6679 | tep_event_handler_func func, void *context) |
6680 | { | 6680 | { |
6681 | struct tep_event_format *event; | 6681 | struct tep_event *event; |
6682 | struct event_handler *handle; | 6682 | struct event_handler *handle; |
6683 | struct event_handler **next; | 6683 | struct event_handler **next; |
6684 | 6684 | ||
@@ -6763,7 +6763,7 @@ static void free_formats(struct tep_format *format) | |||
6763 | free_format_fields(format->fields); | 6763 | free_format_fields(format->fields); |
6764 | } | 6764 | } |
6765 | 6765 | ||
6766 | void tep_free_format(struct tep_event_format *event) | 6766 | void tep_free_format(struct tep_event *event) |
6767 | { | 6767 | { |
6768 | free(event->name); | 6768 | free(event->name); |
6769 | free(event->system); | 6769 | free(event->system); |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 44ec26c72c2e..2a1a644c5ec8 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -57,11 +57,11 @@ struct tep_record { | |||
57 | /* ----------------------- tep ----------------------- */ | 57 | /* ----------------------- tep ----------------------- */ |
58 | 58 | ||
59 | struct tep_handle; | 59 | struct tep_handle; |
60 | struct tep_event_format; | 60 | struct tep_event; |
61 | 61 | ||
62 | typedef int (*tep_event_handler_func)(struct trace_seq *s, | 62 | typedef int (*tep_event_handler_func)(struct trace_seq *s, |
63 | struct tep_record *record, | 63 | struct tep_record *record, |
64 | struct tep_event_format *event, | 64 | struct tep_event *event, |
65 | void *context); | 65 | void *context); |
66 | 66 | ||
67 | typedef int (*tep_plugin_load_func)(struct tep_handle *pevent); | 67 | typedef int (*tep_plugin_load_func)(struct tep_handle *pevent); |
@@ -143,7 +143,7 @@ enum tep_format_flags { | |||
143 | 143 | ||
144 | struct tep_format_field { | 144 | struct tep_format_field { |
145 | struct tep_format_field *next; | 145 | struct tep_format_field *next; |
146 | struct tep_event_format *event; | 146 | struct tep_event *event; |
147 | char *type; | 147 | char *type; |
148 | char *name; | 148 | char *name; |
149 | char *alias; | 149 | char *alias; |
@@ -277,7 +277,7 @@ struct tep_print_fmt { | |||
277 | struct tep_print_arg *args; | 277 | struct tep_print_arg *args; |
278 | }; | 278 | }; |
279 | 279 | ||
280 | struct tep_event_format { | 280 | struct tep_event { |
281 | struct tep_handle *pevent; | 281 | struct tep_handle *pevent; |
282 | char *name; | 282 | char *name; |
283 | int id; | 283 | int id; |
@@ -454,14 +454,14 @@ int tep_register_print_string(struct tep_handle *pevent, const char *fmt, | |||
454 | int tep_pid_is_registered(struct tep_handle *pevent, int pid); | 454 | int tep_pid_is_registered(struct tep_handle *pevent, int pid); |
455 | 455 | ||
456 | void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, | 456 | void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
457 | struct tep_event_format *event, | 457 | struct tep_event *event, |
458 | struct tep_record *record); | 458 | struct tep_record *record); |
459 | void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, | 459 | void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
460 | struct tep_event_format *event, | 460 | struct tep_event *event, |
461 | struct tep_record *record, | 461 | struct tep_record *record, |
462 | bool use_trace_clock); | 462 | bool use_trace_clock); |
463 | void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, | 463 | void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
464 | struct tep_event_format *event, | 464 | struct tep_event *event, |
465 | struct tep_record *record); | 465 | struct tep_record *record); |
466 | void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, | 466 | void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, |
467 | struct tep_record *record, bool use_trace_clock); | 467 | struct tep_record *record, bool use_trace_clock); |
@@ -472,32 +472,32 @@ int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long si | |||
472 | enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, | 472 | enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, |
473 | unsigned long size, const char *sys); | 473 | unsigned long size, const char *sys); |
474 | enum tep_errno tep_parse_format(struct tep_handle *pevent, | 474 | enum tep_errno tep_parse_format(struct tep_handle *pevent, |
475 | struct tep_event_format **eventp, | 475 | struct tep_event **eventp, |
476 | const char *buf, | 476 | const char *buf, |
477 | unsigned long size, const char *sys); | 477 | unsigned long size, const char *sys); |
478 | void tep_free_format(struct tep_event_format *event); | 478 | void tep_free_format(struct tep_event *event); |
479 | void tep_free_format_field(struct tep_format_field *field); | 479 | void tep_free_format_field(struct tep_format_field *field); |
480 | 480 | ||
481 | void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, | 481 | void *tep_get_field_raw(struct trace_seq *s, struct tep_event *event, |
482 | const char *name, struct tep_record *record, | 482 | const char *name, struct tep_record *record, |
483 | int *len, int err); | 483 | int *len, int err); |
484 | 484 | ||
485 | int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, | 485 | int tep_get_field_val(struct trace_seq *s, struct tep_event *event, |
486 | const char *name, struct tep_record *record, | 486 | const char *name, struct tep_record *record, |
487 | unsigned long long *val, int err); | 487 | unsigned long long *val, int err); |
488 | int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event, | 488 | int tep_get_common_field_val(struct trace_seq *s, struct tep_event *event, |
489 | const char *name, struct tep_record *record, | 489 | const char *name, struct tep_record *record, |
490 | unsigned long long *val, int err); | 490 | unsigned long long *val, int err); |
491 | int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, | 491 | int tep_get_any_field_val(struct trace_seq *s, struct tep_event *event, |
492 | const char *name, struct tep_record *record, | 492 | const char *name, struct tep_record *record, |
493 | unsigned long long *val, int err); | 493 | unsigned long long *val, int err); |
494 | 494 | ||
495 | int tep_print_num_field(struct trace_seq *s, const char *fmt, | 495 | int tep_print_num_field(struct trace_seq *s, const char *fmt, |
496 | struct tep_event_format *event, const char *name, | 496 | struct tep_event *event, const char *name, |
497 | struct tep_record *record, int err); | 497 | struct tep_record *record, int err); |
498 | 498 | ||
499 | int tep_print_func_field(struct trace_seq *s, const char *fmt, | 499 | int tep_print_func_field(struct trace_seq *s, const char *fmt, |
500 | struct tep_event_format *event, const char *name, | 500 | struct tep_event *event, const char *name, |
501 | struct tep_record *record, int err); | 501 | struct tep_record *record, int err); |
502 | 502 | ||
503 | int tep_register_event_handler(struct tep_handle *pevent, int id, | 503 | int tep_register_event_handler(struct tep_handle *pevent, int id, |
@@ -513,9 +513,9 @@ int tep_register_print_function(struct tep_handle *pevent, | |||
513 | int tep_unregister_print_function(struct tep_handle *pevent, | 513 | int tep_unregister_print_function(struct tep_handle *pevent, |
514 | tep_func_handler func, char *name); | 514 | tep_func_handler func, char *name); |
515 | 515 | ||
516 | struct tep_format_field *tep_find_common_field(struct tep_event_format *event, const char *name); | 516 | struct tep_format_field *tep_find_common_field(struct tep_event *event, const char *name); |
517 | struct tep_format_field *tep_find_field(struct tep_event_format *event, const char *name); | 517 | struct tep_format_field *tep_find_field(struct tep_event *event, const char *name); |
518 | struct tep_format_field *tep_find_any_field(struct tep_event_format *event, const char *name); | 518 | struct tep_format_field *tep_find_any_field(struct tep_event *event, const char *name); |
519 | 519 | ||
520 | const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr); | 520 | const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr); |
521 | unsigned long long | 521 | unsigned long long |
@@ -524,19 +524,19 @@ unsigned long long tep_read_number(struct tep_handle *pevent, const void *ptr, i | |||
524 | int tep_read_number_field(struct tep_format_field *field, const void *data, | 524 | int tep_read_number_field(struct tep_format_field *field, const void *data, |
525 | unsigned long long *value); | 525 | unsigned long long *value); |
526 | 526 | ||
527 | struct tep_event_format *tep_get_first_event(struct tep_handle *tep); | 527 | struct tep_event *tep_get_first_event(struct tep_handle *tep); |
528 | int tep_get_events_count(struct tep_handle *tep); | 528 | int tep_get_events_count(struct tep_handle *tep); |
529 | struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id); | 529 | struct tep_event *tep_find_event(struct tep_handle *pevent, int id); |
530 | 530 | ||
531 | struct tep_event_format * | 531 | struct tep_event * |
532 | tep_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); | 532 | tep_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); |
533 | struct tep_event_format * | 533 | struct tep_event * |
534 | tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record); | 534 | tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record); |
535 | 535 | ||
536 | void tep_data_lat_fmt(struct tep_handle *pevent, | 536 | void tep_data_lat_fmt(struct tep_handle *pevent, |
537 | struct trace_seq *s, struct tep_record *record); | 537 | struct trace_seq *s, struct tep_record *record); |
538 | int tep_data_type(struct tep_handle *pevent, struct tep_record *rec); | 538 | int tep_data_type(struct tep_handle *pevent, struct tep_record *rec); |
539 | struct tep_event_format *tep_data_event_from_type(struct tep_handle *pevent, int type); | 539 | struct tep_event *tep_data_event_from_type(struct tep_handle *pevent, int type); |
540 | int tep_data_pid(struct tep_handle *pevent, struct tep_record *rec); | 540 | int tep_data_pid(struct tep_handle *pevent, struct tep_record *rec); |
541 | int tep_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec); | 541 | int tep_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec); |
542 | int tep_data_flags(struct tep_handle *pevent, struct tep_record *rec); | 542 | int tep_data_flags(struct tep_handle *pevent, struct tep_record *rec); |
@@ -549,15 +549,15 @@ int tep_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline); | |||
549 | void tep_print_field(struct trace_seq *s, void *data, | 549 | void tep_print_field(struct trace_seq *s, void *data, |
550 | struct tep_format_field *field); | 550 | struct tep_format_field *field); |
551 | void tep_print_fields(struct trace_seq *s, void *data, | 551 | void tep_print_fields(struct trace_seq *s, void *data, |
552 | int size __maybe_unused, struct tep_event_format *event); | 552 | int size __maybe_unused, struct tep_event *event); |
553 | void tep_event_info(struct trace_seq *s, struct tep_event_format *event, | 553 | void tep_event_info(struct trace_seq *s, struct tep_event *event, |
554 | struct tep_record *record); | 554 | struct tep_record *record); |
555 | int tep_strerror(struct tep_handle *pevent, enum tep_errno errnum, | 555 | int tep_strerror(struct tep_handle *pevent, enum tep_errno errnum, |
556 | char *buf, size_t buflen); | 556 | char *buf, size_t buflen); |
557 | 557 | ||
558 | struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum tep_event_sort_type); | 558 | struct tep_event **tep_list_events(struct tep_handle *pevent, enum tep_event_sort_type); |
559 | struct tep_format_field **tep_event_common_fields(struct tep_event_format *event); | 559 | struct tep_format_field **tep_event_common_fields(struct tep_event *event); |
560 | struct tep_format_field **tep_event_fields(struct tep_event_format *event); | 560 | struct tep_format_field **tep_event_fields(struct tep_event *event); |
561 | 561 | ||
562 | enum tep_endian { | 562 | enum tep_endian { |
563 | TEP_LITTLE_ENDIAN = 0, | 563 | TEP_LITTLE_ENDIAN = 0, |
@@ -713,7 +713,7 @@ struct tep_filter_arg { | |||
713 | 713 | ||
714 | struct tep_filter_type { | 714 | struct tep_filter_type { |
715 | int event_id; | 715 | int event_id; |
716 | struct tep_event_format *event; | 716 | struct tep_event *event; |
717 | struct tep_filter_arg *filter; | 717 | struct tep_filter_arg *filter; |
718 | }; | 718 | }; |
719 | 719 | ||
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index ed87cb56713d..cb5ce66dab6e 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -27,7 +27,7 @@ static struct tep_format_field cpu = { | |||
27 | 27 | ||
28 | struct event_list { | 28 | struct event_list { |
29 | struct event_list *next; | 29 | struct event_list *next; |
30 | struct tep_event_format *event; | 30 | struct tep_event *event; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static void show_error(char *error_buf, const char *fmt, ...) | 33 | static void show_error(char *error_buf, const char *fmt, ...) |
@@ -229,7 +229,7 @@ static void free_arg(struct tep_filter_arg *arg) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | static int add_event(struct event_list **events, | 231 | static int add_event(struct event_list **events, |
232 | struct tep_event_format *event) | 232 | struct tep_event *event) |
233 | { | 233 | { |
234 | struct event_list *list; | 234 | struct event_list *list; |
235 | 235 | ||
@@ -243,7 +243,7 @@ static int add_event(struct event_list **events, | |||
243 | return 0; | 243 | return 0; |
244 | } | 244 | } |
245 | 245 | ||
246 | static int event_match(struct tep_event_format *event, | 246 | static int event_match(struct tep_event *event, |
247 | regex_t *sreg, regex_t *ereg) | 247 | regex_t *sreg, regex_t *ereg) |
248 | { | 248 | { |
249 | if (sreg) { | 249 | if (sreg) { |
@@ -259,7 +259,7 @@ static enum tep_errno | |||
259 | find_event(struct tep_handle *pevent, struct event_list **events, | 259 | find_event(struct tep_handle *pevent, struct event_list **events, |
260 | char *sys_name, char *event_name) | 260 | char *sys_name, char *event_name) |
261 | { | 261 | { |
262 | struct tep_event_format *event; | 262 | struct tep_event *event; |
263 | regex_t ereg; | 263 | regex_t ereg; |
264 | regex_t sreg; | 264 | regex_t sreg; |
265 | int match = 0; | 265 | int match = 0; |
@@ -334,7 +334,7 @@ static void free_events(struct event_list *events) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | static enum tep_errno | 336 | static enum tep_errno |
337 | create_arg_item(struct tep_event_format *event, const char *token, | 337 | create_arg_item(struct tep_event *event, const char *token, |
338 | enum tep_event_type type, struct tep_filter_arg **parg, char *error_str) | 338 | enum tep_event_type type, struct tep_filter_arg **parg, char *error_str) |
339 | { | 339 | { |
340 | struct tep_format_field *field; | 340 | struct tep_format_field *field; |
@@ -940,7 +940,7 @@ static int collapse_tree(struct tep_filter_arg *arg, | |||
940 | } | 940 | } |
941 | 941 | ||
942 | static enum tep_errno | 942 | static enum tep_errno |
943 | process_filter(struct tep_event_format *event, struct tep_filter_arg **parg, | 943 | process_filter(struct tep_event *event, struct tep_filter_arg **parg, |
944 | char *error_str, int not) | 944 | char *error_str, int not) |
945 | { | 945 | { |
946 | enum tep_event_type type; | 946 | enum tep_event_type type; |
@@ -1180,7 +1180,7 @@ process_filter(struct tep_event_format *event, struct tep_filter_arg **parg, | |||
1180 | } | 1180 | } |
1181 | 1181 | ||
1182 | static enum tep_errno | 1182 | static enum tep_errno |
1183 | process_event(struct tep_event_format *event, const char *filter_str, | 1183 | process_event(struct tep_event *event, const char *filter_str, |
1184 | struct tep_filter_arg **parg, char *error_str) | 1184 | struct tep_filter_arg **parg, char *error_str) |
1185 | { | 1185 | { |
1186 | int ret; | 1186 | int ret; |
@@ -1205,7 +1205,7 @@ process_event(struct tep_event_format *event, const char *filter_str, | |||
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | static enum tep_errno | 1207 | static enum tep_errno |
1208 | filter_event(struct tep_event_filter *filter, struct tep_event_format *event, | 1208 | filter_event(struct tep_event_filter *filter, struct tep_event *event, |
1209 | const char *filter_str, char *error_str) | 1209 | const char *filter_str, char *error_str) |
1210 | { | 1210 | { |
1211 | struct tep_filter_type *filter_type; | 1211 | struct tep_filter_type *filter_type; |
@@ -1457,7 +1457,7 @@ static int copy_filter_type(struct tep_event_filter *filter, | |||
1457 | struct tep_filter_type *filter_type) | 1457 | struct tep_filter_type *filter_type) |
1458 | { | 1458 | { |
1459 | struct tep_filter_arg *arg; | 1459 | struct tep_filter_arg *arg; |
1460 | struct tep_event_format *event; | 1460 | struct tep_event *event; |
1461 | const char *sys; | 1461 | const char *sys; |
1462 | const char *name; | 1462 | const char *name; |
1463 | char *str; | 1463 | char *str; |
@@ -1539,7 +1539,7 @@ int tep_update_trivial(struct tep_event_filter *dest, struct tep_event_filter *s | |||
1539 | { | 1539 | { |
1540 | struct tep_handle *src_pevent; | 1540 | struct tep_handle *src_pevent; |
1541 | struct tep_handle *dest_pevent; | 1541 | struct tep_handle *dest_pevent; |
1542 | struct tep_event_format *event; | 1542 | struct tep_event *event; |
1543 | struct tep_filter_type *filter_type; | 1543 | struct tep_filter_type *filter_type; |
1544 | struct tep_filter_arg *arg; | 1544 | struct tep_filter_arg *arg; |
1545 | char *str; | 1545 | char *str; |
@@ -1683,11 +1683,11 @@ int tep_filter_event_has_trivial(struct tep_event_filter *filter, | |||
1683 | } | 1683 | } |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | static int test_filter(struct tep_event_format *event, struct tep_filter_arg *arg, | 1686 | static int test_filter(struct tep_event *event, struct tep_filter_arg *arg, |
1687 | struct tep_record *record, enum tep_errno *err); | 1687 | struct tep_record *record, enum tep_errno *err); |
1688 | 1688 | ||
1689 | static const char * | 1689 | static const char * |
1690 | get_comm(struct tep_event_format *event, struct tep_record *record) | 1690 | get_comm(struct tep_event *event, struct tep_record *record) |
1691 | { | 1691 | { |
1692 | const char *comm; | 1692 | const char *comm; |
1693 | int pid; | 1693 | int pid; |
@@ -1698,7 +1698,7 @@ get_comm(struct tep_event_format *event, struct tep_record *record) | |||
1698 | } | 1698 | } |
1699 | 1699 | ||
1700 | static unsigned long long | 1700 | static unsigned long long |
1701 | get_value(struct tep_event_format *event, | 1701 | get_value(struct tep_event *event, |
1702 | struct tep_format_field *field, struct tep_record *record) | 1702 | struct tep_format_field *field, struct tep_record *record) |
1703 | { | 1703 | { |
1704 | unsigned long long val; | 1704 | unsigned long long val; |
@@ -1734,11 +1734,11 @@ get_value(struct tep_event_format *event, | |||
1734 | } | 1734 | } |
1735 | 1735 | ||
1736 | static unsigned long long | 1736 | static unsigned long long |
1737 | get_arg_value(struct tep_event_format *event, struct tep_filter_arg *arg, | 1737 | get_arg_value(struct tep_event *event, struct tep_filter_arg *arg, |
1738 | struct tep_record *record, enum tep_errno *err); | 1738 | struct tep_record *record, enum tep_errno *err); |
1739 | 1739 | ||
1740 | static unsigned long long | 1740 | static unsigned long long |
1741 | get_exp_value(struct tep_event_format *event, struct tep_filter_arg *arg, | 1741 | get_exp_value(struct tep_event *event, struct tep_filter_arg *arg, |
1742 | struct tep_record *record, enum tep_errno *err) | 1742 | struct tep_record *record, enum tep_errno *err) |
1743 | { | 1743 | { |
1744 | unsigned long long lval, rval; | 1744 | unsigned long long lval, rval; |
@@ -1793,7 +1793,7 @@ get_exp_value(struct tep_event_format *event, struct tep_filter_arg *arg, | |||
1793 | } | 1793 | } |
1794 | 1794 | ||
1795 | static unsigned long long | 1795 | static unsigned long long |
1796 | get_arg_value(struct tep_event_format *event, struct tep_filter_arg *arg, | 1796 | get_arg_value(struct tep_event *event, struct tep_filter_arg *arg, |
1797 | struct tep_record *record, enum tep_errno *err) | 1797 | struct tep_record *record, enum tep_errno *err) |
1798 | { | 1798 | { |
1799 | switch (arg->type) { | 1799 | switch (arg->type) { |
@@ -1817,7 +1817,7 @@ get_arg_value(struct tep_event_format *event, struct tep_filter_arg *arg, | |||
1817 | return 0; | 1817 | return 0; |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | static int test_num(struct tep_event_format *event, struct tep_filter_arg *arg, | 1820 | static int test_num(struct tep_event *event, struct tep_filter_arg *arg, |
1821 | struct tep_record *record, enum tep_errno *err) | 1821 | struct tep_record *record, enum tep_errno *err) |
1822 | { | 1822 | { |
1823 | unsigned long long lval, rval; | 1823 | unsigned long long lval, rval; |
@@ -1860,7 +1860,7 @@ static int test_num(struct tep_event_format *event, struct tep_filter_arg *arg, | |||
1860 | 1860 | ||
1861 | static const char *get_field_str(struct tep_filter_arg *arg, struct tep_record *record) | 1861 | static const char *get_field_str(struct tep_filter_arg *arg, struct tep_record *record) |
1862 | { | 1862 | { |
1863 | struct tep_event_format *event; | 1863 | struct tep_event *event; |
1864 | struct tep_handle *pevent; | 1864 | struct tep_handle *pevent; |
1865 | unsigned long long addr; | 1865 | unsigned long long addr; |
1866 | const char *val = NULL; | 1866 | const char *val = NULL; |
@@ -1908,7 +1908,7 @@ static const char *get_field_str(struct tep_filter_arg *arg, struct tep_record * | |||
1908 | return val; | 1908 | return val; |
1909 | } | 1909 | } |
1910 | 1910 | ||
1911 | static int test_str(struct tep_event_format *event, struct tep_filter_arg *arg, | 1911 | static int test_str(struct tep_event *event, struct tep_filter_arg *arg, |
1912 | struct tep_record *record, enum tep_errno *err) | 1912 | struct tep_record *record, enum tep_errno *err) |
1913 | { | 1913 | { |
1914 | const char *val; | 1914 | const char *val; |
@@ -1939,7 +1939,7 @@ static int test_str(struct tep_event_format *event, struct tep_filter_arg *arg, | |||
1939 | } | 1939 | } |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | static int test_op(struct tep_event_format *event, struct tep_filter_arg *arg, | 1942 | static int test_op(struct tep_event *event, struct tep_filter_arg *arg, |
1943 | struct tep_record *record, enum tep_errno *err) | 1943 | struct tep_record *record, enum tep_errno *err) |
1944 | { | 1944 | { |
1945 | switch (arg->op.type) { | 1945 | switch (arg->op.type) { |
@@ -1961,7 +1961,7 @@ static int test_op(struct tep_event_format *event, struct tep_filter_arg *arg, | |||
1961 | } | 1961 | } |
1962 | } | 1962 | } |
1963 | 1963 | ||
1964 | static int test_filter(struct tep_event_format *event, struct tep_filter_arg *arg, | 1964 | static int test_filter(struct tep_event *event, struct tep_filter_arg *arg, |
1965 | struct tep_record *record, enum tep_errno *err) | 1965 | struct tep_record *record, enum tep_errno *err) |
1966 | { | 1966 | { |
1967 | if (*err) { | 1967 | if (*err) { |
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugin_function.c index 528acc75d81a..a73eca34a8f9 100644 --- a/tools/lib/traceevent/plugin_function.c +++ b/tools/lib/traceevent/plugin_function.c | |||
@@ -124,7 +124,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | static int function_handler(struct trace_seq *s, struct tep_record *record, | 126 | static int function_handler(struct trace_seq *s, struct tep_record *record, |
127 | struct tep_event_format *event, void *context) | 127 | struct tep_event *event, void *context) |
128 | { | 128 | { |
129 | struct tep_handle *pevent = event->pevent; | 129 | struct tep_handle *pevent = event->pevent; |
130 | unsigned long long function; | 130 | unsigned long long function; |
diff --git a/tools/lib/traceevent/plugin_hrtimer.c b/tools/lib/traceevent/plugin_hrtimer.c index 9aa05b4ca811..5db5e401275f 100644 --- a/tools/lib/traceevent/plugin_hrtimer.c +++ b/tools/lib/traceevent/plugin_hrtimer.c | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | static int timer_expire_handler(struct trace_seq *s, | 28 | static int timer_expire_handler(struct trace_seq *s, |
29 | struct tep_record *record, | 29 | struct tep_record *record, |
30 | struct tep_event_format *event, void *context) | 30 | struct tep_event *event, void *context) |
31 | { | 31 | { |
32 | trace_seq_printf(s, "hrtimer="); | 32 | trace_seq_printf(s, "hrtimer="); |
33 | 33 | ||
@@ -47,7 +47,7 @@ static int timer_expire_handler(struct trace_seq *s, | |||
47 | 47 | ||
48 | static int timer_start_handler(struct trace_seq *s, | 48 | static int timer_start_handler(struct trace_seq *s, |
49 | struct tep_record *record, | 49 | struct tep_record *record, |
50 | struct tep_event_format *event, void *context) | 50 | struct tep_event *event, void *context) |
51 | { | 51 | { |
52 | trace_seq_printf(s, "hrtimer="); | 52 | trace_seq_printf(s, "hrtimer="); |
53 | 53 | ||
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugin_kmem.c index 1beb4eaddfdf..0e3c601f9ed1 100644 --- a/tools/lib/traceevent/plugin_kmem.c +++ b/tools/lib/traceevent/plugin_kmem.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "trace-seq.h" | 25 | #include "trace-seq.h" |
26 | 26 | ||
27 | static int call_site_handler(struct trace_seq *s, struct tep_record *record, | 27 | static int call_site_handler(struct trace_seq *s, struct tep_record *record, |
28 | struct tep_event_format *event, void *context) | 28 | struct tep_event *event, void *context) |
29 | { | 29 | { |
30 | struct tep_format_field *field; | 30 | struct tep_format_field *field; |
31 | unsigned long long val, addr; | 31 | unsigned long long val, addr; |
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c index d13c22846fa9..637be7c18476 100644 --- a/tools/lib/traceevent/plugin_kvm.c +++ b/tools/lib/traceevent/plugin_kvm.c | |||
@@ -249,7 +249,7 @@ static const char *find_exit_reason(unsigned isa, int val) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | static int print_exit_reason(struct trace_seq *s, struct tep_record *record, | 251 | static int print_exit_reason(struct trace_seq *s, struct tep_record *record, |
252 | struct tep_event_format *event, const char *field) | 252 | struct tep_event *event, const char *field) |
253 | { | 253 | { |
254 | unsigned long long isa; | 254 | unsigned long long isa; |
255 | unsigned long long val; | 255 | unsigned long long val; |
@@ -270,7 +270,7 @@ static int print_exit_reason(struct trace_seq *s, struct tep_record *record, | |||
270 | } | 270 | } |
271 | 271 | ||
272 | static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, | 272 | static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, |
273 | struct tep_event_format *event, void *context) | 273 | struct tep_event *event, void *context) |
274 | { | 274 | { |
275 | unsigned long long info1 = 0, info2 = 0; | 275 | unsigned long long info1 = 0, info2 = 0; |
276 | 276 | ||
@@ -293,7 +293,7 @@ static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, | |||
293 | 293 | ||
294 | static int kvm_emulate_insn_handler(struct trace_seq *s, | 294 | static int kvm_emulate_insn_handler(struct trace_seq *s, |
295 | struct tep_record *record, | 295 | struct tep_record *record, |
296 | struct tep_event_format *event, void *context) | 296 | struct tep_event *event, void *context) |
297 | { | 297 | { |
298 | unsigned long long rip, csbase, len, flags, failed; | 298 | unsigned long long rip, csbase, len, flags, failed; |
299 | int llen; | 299 | int llen; |
@@ -332,7 +332,7 @@ static int kvm_emulate_insn_handler(struct trace_seq *s, | |||
332 | 332 | ||
333 | 333 | ||
334 | static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_record *record, | 334 | static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_record *record, |
335 | struct tep_event_format *event, void *context) | 335 | struct tep_event *event, void *context) |
336 | { | 336 | { |
337 | if (print_exit_reason(s, record, event, "exit_code") < 0) | 337 | if (print_exit_reason(s, record, event, "exit_code") < 0) |
338 | return -1; | 338 | return -1; |
@@ -346,7 +346,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_reco | |||
346 | } | 346 | } |
347 | 347 | ||
348 | static int kvm_nested_vmexit_handler(struct trace_seq *s, struct tep_record *record, | 348 | static int kvm_nested_vmexit_handler(struct trace_seq *s, struct tep_record *record, |
349 | struct tep_event_format *event, void *context) | 349 | struct tep_event *event, void *context) |
350 | { | 350 | { |
351 | tep_print_num_field(s, "rip %llx ", event, "rip", record, 1); | 351 | tep_print_num_field(s, "rip %llx ", event, "rip", record, 1); |
352 | 352 | ||
@@ -372,7 +372,7 @@ union kvm_mmu_page_role { | |||
372 | }; | 372 | }; |
373 | 373 | ||
374 | static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, | 374 | static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, |
375 | struct tep_event_format *event, void *context) | 375 | struct tep_event *event, void *context) |
376 | { | 376 | { |
377 | unsigned long long val; | 377 | unsigned long long val; |
378 | static const char *access_str[] = { | 378 | static const char *access_str[] = { |
@@ -419,7 +419,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, | |||
419 | 419 | ||
420 | static int kvm_mmu_get_page_handler(struct trace_seq *s, | 420 | static int kvm_mmu_get_page_handler(struct trace_seq *s, |
421 | struct tep_record *record, | 421 | struct tep_record *record, |
422 | struct tep_event_format *event, void *context) | 422 | struct tep_event *event, void *context) |
423 | { | 423 | { |
424 | unsigned long long val; | 424 | unsigned long long val; |
425 | 425 | ||
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugin_mac80211.c index da3855e7b86f..e38b9477aad2 100644 --- a/tools/lib/traceevent/plugin_mac80211.c +++ b/tools/lib/traceevent/plugin_mac80211.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #define INDENT 65 | 27 | #define INDENT 65 |
28 | 28 | ||
29 | static void print_string(struct trace_seq *s, struct tep_event_format *event, | 29 | static void print_string(struct trace_seq *s, struct tep_event *event, |
30 | const char *name, const void *data) | 30 | const char *name, const void *data) |
31 | { | 31 | { |
32 | struct tep_format_field *f = tep_find_field(event, name); | 32 | struct tep_format_field *f = tep_find_field(event, name); |
@@ -60,7 +60,7 @@ static void print_string(struct trace_seq *s, struct tep_event_format *event, | |||
60 | 60 | ||
61 | static int drv_bss_info_changed(struct trace_seq *s, | 61 | static int drv_bss_info_changed(struct trace_seq *s, |
62 | struct tep_record *record, | 62 | struct tep_record *record, |
63 | struct tep_event_format *event, void *context) | 63 | struct tep_event *event, void *context) |
64 | { | 64 | { |
65 | void *data = record->data; | 65 | void *data = record->data; |
66 | 66 | ||
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugin_sched_switch.c index 77882272672f..834c9e378ff8 100644 --- a/tools/lib/traceevent/plugin_sched_switch.c +++ b/tools/lib/traceevent/plugin_sched_switch.c | |||
@@ -67,7 +67,7 @@ static void write_and_save_comm(struct tep_format_field *field, | |||
67 | 67 | ||
68 | static int sched_wakeup_handler(struct trace_seq *s, | 68 | static int sched_wakeup_handler(struct trace_seq *s, |
69 | struct tep_record *record, | 69 | struct tep_record *record, |
70 | struct tep_event_format *event, void *context) | 70 | struct tep_event *event, void *context) |
71 | { | 71 | { |
72 | struct tep_format_field *field; | 72 | struct tep_format_field *field; |
73 | unsigned long long val; | 73 | unsigned long long val; |
@@ -96,7 +96,7 @@ static int sched_wakeup_handler(struct trace_seq *s, | |||
96 | 96 | ||
97 | static int sched_switch_handler(struct trace_seq *s, | 97 | static int sched_switch_handler(struct trace_seq *s, |
98 | struct tep_record *record, | 98 | struct tep_record *record, |
99 | struct tep_event_format *event, void *context) | 99 | struct tep_event *event, void *context) |
100 | { | 100 | { |
101 | struct tep_format_field *field; | 101 | struct tep_format_field *field; |
102 | unsigned long long val; | 102 | unsigned long long val; |