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

tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format

In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_". This renames struct event_format
to struct tep_event_format

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180919185722.495820809@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Tzvetomir Stoyanov (VMware) and committed by
Arnaldo Carvalho de Melo
4963b0f8 a78cdee6

+194 -194
+93 -93
tools/lib/traceevent/event-parse.c
··· 95 95 96 96 static unsigned long long 97 97 process_defined_func(struct trace_seq *s, void *data, int size, 98 - struct event_format *event, struct print_arg *arg); 98 + struct tep_event_format *event, struct print_arg *arg); 99 99 100 100 static void free_func_handle(struct tep_function_handler *func); 101 101 ··· 738 738 } 739 739 } 740 740 741 - static struct event_format *alloc_event(void) 741 + static struct tep_event_format *alloc_event(void) 742 742 { 743 - return calloc(1, sizeof(struct event_format)); 743 + return calloc(1, sizeof(struct tep_event_format)); 744 744 } 745 745 746 - static int add_event(struct tep_handle *pevent, struct event_format *event) 746 + static int add_event(struct tep_handle *pevent, struct tep_event_format *event) 747 747 { 748 748 int i; 749 - struct event_format **events = realloc(pevent->events, sizeof(event) * 750 - (pevent->nr_events + 1)); 749 + struct tep_event_format **events = realloc(pevent->events, sizeof(event) * 750 + (pevent->nr_events + 1)); 751 751 if (!events) 752 752 return -1; 753 753 ··· 1354 1354 return 0; 1355 1355 } 1356 1356 1357 - static int event_read_fields(struct event_format *event, struct format_field **fields) 1357 + static int event_read_fields(struct tep_event_format *event, struct format_field **fields) 1358 1358 { 1359 1359 struct format_field *field = NULL; 1360 1360 enum event_type type; ··· 1641 1641 return -1; 1642 1642 } 1643 1643 1644 - static int event_read_format(struct event_format *event) 1644 + static int event_read_format(struct tep_event_format *event) 1645 1645 { 1646 1646 char *token; 1647 1647 int ret; ··· 1674 1674 } 1675 1675 1676 1676 static enum event_type 1677 - process_arg_token(struct event_format *event, struct print_arg *arg, 1677 + process_arg_token(struct tep_event_format *event, struct print_arg *arg, 1678 1678 char **tok, enum event_type type); 1679 1679 1680 1680 static enum event_type 1681 - process_arg(struct event_format *event, struct print_arg *arg, char **tok) 1681 + process_arg(struct tep_event_format *event, struct print_arg *arg, char **tok) 1682 1682 { 1683 1683 enum event_type type; 1684 1684 char *token; ··· 1690 1690 } 1691 1691 1692 1692 static enum event_type 1693 - process_op(struct event_format *event, struct print_arg *arg, char **tok); 1693 + process_op(struct tep_event_format *event, struct print_arg *arg, char **tok); 1694 1694 1695 1695 /* 1696 1696 * For __print_symbolic() and __print_flags, we need to completely 1697 1697 * evaluate the first argument, which defines what to print next. 1698 1698 */ 1699 1699 static enum event_type 1700 - process_field_arg(struct event_format *event, struct print_arg *arg, char **tok) 1700 + process_field_arg(struct tep_event_format *event, struct print_arg *arg, char **tok) 1701 1701 { 1702 1702 enum event_type type; 1703 1703 ··· 1711 1711 } 1712 1712 1713 1713 static enum event_type 1714 - process_cond(struct event_format *event, struct print_arg *top, char **tok) 1714 + process_cond(struct tep_event_format *event, struct print_arg *top, char **tok) 1715 1715 { 1716 1716 struct print_arg *arg, *left, *right; 1717 1717 enum event_type type; ··· 1767 1767 } 1768 1768 1769 1769 static enum event_type 1770 - process_array(struct event_format *event, struct print_arg *top, char **tok) 1770 + process_array(struct tep_event_format *event, struct print_arg *top, char **tok) 1771 1771 { 1772 1772 struct print_arg *arg; 1773 1773 enum event_type type; ··· 1869 1869 1870 1870 /* Note, *tok does not get freed, but will most likely be saved */ 1871 1871 static enum event_type 1872 - process_op(struct event_format *event, struct print_arg *arg, char **tok) 1872 + process_op(struct tep_event_format *event, struct print_arg *arg, char **tok) 1873 1873 { 1874 1874 struct print_arg *left, *right = NULL; 1875 1875 enum event_type type; ··· 2070 2070 } 2071 2071 2072 2072 static enum event_type 2073 - process_entry(struct event_format *event __maybe_unused, struct print_arg *arg, 2073 + process_entry(struct tep_event_format *event __maybe_unused, struct print_arg *arg, 2074 2074 char **tok) 2075 2075 { 2076 2076 enum event_type type; ··· 2109 2109 return EVENT_ERROR; 2110 2110 } 2111 2111 2112 - static int alloc_and_process_delim(struct event_format *event, char *next_token, 2112 + static int alloc_and_process_delim(struct tep_event_format *event, char *next_token, 2113 2113 struct print_arg **print_arg) 2114 2114 { 2115 2115 struct print_arg *field; ··· 2444 2444 } 2445 2445 2446 2446 static enum event_type 2447 - process_fields(struct event_format *event, struct print_flag_sym **list, char **tok) 2447 + process_fields(struct tep_event_format *event, struct print_flag_sym **list, char **tok) 2448 2448 { 2449 2449 enum event_type type; 2450 2450 struct print_arg *arg = NULL; ··· 2525 2525 } 2526 2526 2527 2527 static enum event_type 2528 - process_flags(struct event_format *event, struct print_arg *arg, char **tok) 2528 + process_flags(struct tep_event_format *event, struct print_arg *arg, char **tok) 2529 2529 { 2530 2530 struct print_arg *field; 2531 2531 enum event_type type; ··· 2578 2578 } 2579 2579 2580 2580 static enum event_type 2581 - process_symbols(struct event_format *event, struct print_arg *arg, char **tok) 2581 + process_symbols(struct tep_event_format *event, struct print_arg *arg, char **tok) 2582 2582 { 2583 2583 struct print_arg *field; 2584 2584 enum event_type type; ··· 2617 2617 } 2618 2618 2619 2619 static enum event_type 2620 - process_hex_common(struct event_format *event, struct print_arg *arg, 2620 + process_hex_common(struct tep_event_format *event, struct print_arg *arg, 2621 2621 char **tok, enum print_arg_type type) 2622 2622 { 2623 2623 memset(arg, 0, sizeof(*arg)); ··· 2640 2640 } 2641 2641 2642 2642 static enum event_type 2643 - process_hex(struct event_format *event, struct print_arg *arg, char **tok) 2643 + process_hex(struct tep_event_format *event, struct print_arg *arg, char **tok) 2644 2644 { 2645 2645 return process_hex_common(event, arg, tok, PRINT_HEX); 2646 2646 } 2647 2647 2648 2648 static enum event_type 2649 - process_hex_str(struct event_format *event, struct print_arg *arg, 2649 + process_hex_str(struct tep_event_format *event, struct print_arg *arg, 2650 2650 char **tok) 2651 2651 { 2652 2652 return process_hex_common(event, arg, tok, PRINT_HEX_STR); 2653 2653 } 2654 2654 2655 2655 static enum event_type 2656 - process_int_array(struct event_format *event, struct print_arg *arg, char **tok) 2656 + process_int_array(struct tep_event_format *event, struct print_arg *arg, char **tok) 2657 2657 { 2658 2658 memset(arg, 0, sizeof(*arg)); 2659 2659 arg->type = PRINT_INT_ARRAY; ··· 2681 2681 } 2682 2682 2683 2683 static enum event_type 2684 - process_dynamic_array(struct event_format *event, struct print_arg *arg, char **tok) 2684 + process_dynamic_array(struct tep_event_format *event, struct print_arg *arg, char **tok) 2685 2685 { 2686 2686 struct format_field *field; 2687 2687 enum event_type type; ··· 2745 2745 } 2746 2746 2747 2747 static enum event_type 2748 - process_dynamic_array_len(struct event_format *event, struct print_arg *arg, 2748 + process_dynamic_array_len(struct tep_event_format *event, struct print_arg *arg, 2749 2749 char **tok) 2750 2750 { 2751 2751 struct format_field *field; ··· 2781 2781 } 2782 2782 2783 2783 static enum event_type 2784 - process_paren(struct event_format *event, struct print_arg *arg, char **tok) 2784 + process_paren(struct tep_event_format *event, struct print_arg *arg, char **tok) 2785 2785 { 2786 2786 struct print_arg *item_arg; 2787 2787 enum event_type type; ··· 2844 2844 2845 2845 2846 2846 static enum event_type 2847 - process_str(struct event_format *event __maybe_unused, struct print_arg *arg, 2847 + process_str(struct tep_event_format *event __maybe_unused, struct print_arg *arg, 2848 2848 char **tok) 2849 2849 { 2850 2850 enum event_type type; ··· 2873 2873 } 2874 2874 2875 2875 static enum event_type 2876 - process_bitmask(struct event_format *event __maybe_unused, struct print_arg *arg, 2877 - char **tok) 2876 + process_bitmask(struct tep_event_format *event __maybe_unused, struct print_arg *arg, 2877 + char **tok) 2878 2878 { 2879 2879 enum event_type type; 2880 2880 char *token; ··· 2934 2934 } 2935 2935 2936 2936 static enum event_type 2937 - process_func_handler(struct event_format *event, struct tep_function_handler *func, 2937 + process_func_handler(struct tep_event_format *event, struct tep_function_handler *func, 2938 2938 struct print_arg *arg, char **tok) 2939 2939 { 2940 2940 struct print_arg **next_arg; ··· 2992 2992 } 2993 2993 2994 2994 static enum event_type 2995 - process_function(struct event_format *event, struct print_arg *arg, 2995 + process_function(struct tep_event_format *event, struct print_arg *arg, 2996 2996 char *token, char **tok) 2997 2997 { 2998 2998 struct tep_function_handler *func; ··· 3048 3048 } 3049 3049 3050 3050 static enum event_type 3051 - process_arg_token(struct event_format *event, struct print_arg *arg, 3051 + process_arg_token(struct tep_event_format *event, struct print_arg *arg, 3052 3052 char **tok, enum event_type type) 3053 3053 { 3054 3054 char *token; ··· 3136 3136 return type; 3137 3137 } 3138 3138 3139 - static int event_read_print_args(struct event_format *event, struct print_arg **list) 3139 + static int event_read_print_args(struct tep_event_format *event, struct print_arg **list) 3140 3140 { 3141 3141 enum event_type type = EVENT_ERROR; 3142 3142 struct print_arg *arg; ··· 3194 3194 return args; 3195 3195 } 3196 3196 3197 - static int event_read_print(struct event_format *event) 3197 + static int event_read_print(struct tep_event_format *event) 3198 3198 { 3199 3199 enum event_type type; 3200 3200 char *token; ··· 3260 3260 * This only searchs the common fields and not all field. 3261 3261 */ 3262 3262 struct format_field * 3263 - tep_find_common_field(struct event_format *event, const char *name) 3263 + tep_find_common_field(struct tep_event_format *event, const char *name) 3264 3264 { 3265 3265 struct format_field *format; 3266 3266 ··· 3282 3282 * This does not search common fields. 3283 3283 */ 3284 3284 struct format_field * 3285 - tep_find_field(struct event_format *event, const char *name) 3285 + tep_find_field(struct tep_event_format *event, const char *name) 3286 3286 { 3287 3287 struct format_field *format; 3288 3288 ··· 3305 3305 * the non-common ones if a common one was not found. 3306 3306 */ 3307 3307 struct format_field * 3308 - tep_find_any_field(struct event_format *event, const char *name) 3308 + tep_find_any_field(struct tep_event_format *event, const char *name) 3309 3309 { 3310 3310 struct format_field *format; 3311 3311 ··· 3374 3374 static int get_common_info(struct tep_handle *pevent, 3375 3375 const char *type, int *offset, int *size) 3376 3376 { 3377 - struct event_format *event; 3377 + struct tep_event_format *event; 3378 3378 struct format_field *field; 3379 3379 3380 3380 /* ··· 3461 3461 * 3462 3462 * Returns an event that has a given @id. 3463 3463 */ 3464 - struct event_format *tep_find_event(struct tep_handle *pevent, int id) 3464 + struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id) 3465 3465 { 3466 - struct event_format **eventptr; 3467 - struct event_format key; 3468 - struct event_format *pkey = &key; 3466 + struct tep_event_format **eventptr; 3467 + struct tep_event_format key; 3468 + struct tep_event_format *pkey = &key; 3469 3469 3470 3470 /* Check cache first */ 3471 3471 if (pevent->last_event && pevent->last_event->id == id) ··· 3493 3493 * This returns an event with a given @name and under the system 3494 3494 * @sys. If @sys is NULL the first event with @name is returned. 3495 3495 */ 3496 - struct event_format * 3496 + struct tep_event_format * 3497 3497 tep_find_event_by_name(struct tep_handle *pevent, 3498 3498 const char *sys, const char *name) 3499 3499 { 3500 - struct event_format *event; 3500 + struct tep_event_format *event; 3501 3501 int i; 3502 3502 3503 3503 if (pevent->last_event && ··· 3522 3522 } 3523 3523 3524 3524 static unsigned long long 3525 - eval_num_arg(void *data, int size, struct event_format *event, struct print_arg *arg) 3525 + eval_num_arg(void *data, int size, struct tep_event_format *event, struct print_arg *arg) 3526 3526 { 3527 3527 struct tep_handle *pevent = event->pevent; 3528 3528 unsigned long long val = 0; ··· 3862 3862 } 3863 3863 3864 3864 static void print_str_arg(struct trace_seq *s, void *data, int size, 3865 - struct event_format *event, const char *format, 3865 + struct tep_event_format *event, const char *format, 3866 3866 int len_arg, struct print_arg *arg) 3867 3867 { 3868 3868 struct tep_handle *pevent = event->pevent; ··· 4117 4117 4118 4118 static unsigned long long 4119 4119 process_defined_func(struct trace_seq *s, void *data, int size, 4120 - struct event_format *event, struct print_arg *arg) 4120 + struct tep_event_format *event, struct print_arg *arg) 4121 4121 { 4122 4122 struct tep_function_handler *func_handle = arg->func.func; 4123 4123 struct func_params *param; ··· 4212 4212 } 4213 4213 } 4214 4214 4215 - static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct event_format *event) 4215 + static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event) 4216 4216 { 4217 4217 struct tep_handle *pevent = event->pevent; 4218 4218 struct format_field *field, *ip_field; ··· 4389 4389 4390 4390 static char * 4391 4391 get_bprint_format(void *data, int size __maybe_unused, 4392 - struct event_format *event) 4392 + struct tep_event_format *event) 4393 4393 { 4394 4394 struct tep_handle *pevent = event->pevent; 4395 4395 unsigned long long addr; ··· 4424 4424 } 4425 4425 4426 4426 static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size, 4427 - struct event_format *event, struct print_arg *arg) 4427 + struct tep_event_format *event, struct print_arg *arg) 4428 4428 { 4429 4429 unsigned char *buf; 4430 4430 const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; ··· 4577 4577 * %pISpc print an IP address based on sockaddr; p adds port. 4578 4578 */ 4579 4579 static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i, 4580 - void *data, int size, struct event_format *event, 4580 + void *data, int size, struct tep_event_format *event, 4581 4581 struct print_arg *arg) 4582 4582 { 4583 4583 unsigned char *buf; ··· 4614 4614 } 4615 4615 4616 4616 static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i, 4617 - void *data, int size, struct event_format *event, 4617 + void *data, int size, struct tep_event_format *event, 4618 4618 struct print_arg *arg) 4619 4619 { 4620 4620 char have_c = 0; ··· 4664 4664 } 4665 4665 4666 4666 static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i, 4667 - void *data, int size, struct event_format *event, 4667 + void *data, int size, struct tep_event_format *event, 4668 4668 struct print_arg *arg) 4669 4669 { 4670 4670 char have_c = 0, have_p = 0; ··· 4746 4746 } 4747 4747 4748 4748 static int print_ip_arg(struct trace_seq *s, const char *ptr, 4749 - void *data, int size, struct event_format *event, 4749 + void *data, int size, struct tep_event_format *event, 4750 4750 struct print_arg *arg) 4751 4751 { 4752 4752 char i = *ptr; /* 'i' or 'I' */ ··· 4853 4853 } 4854 4854 4855 4855 void tep_print_fields(struct trace_seq *s, void *data, 4856 - int size __maybe_unused, struct event_format *event) 4856 + int size __maybe_unused, struct tep_event_format *event) 4857 4857 { 4858 4858 struct format_field *field; 4859 4859 ··· 4865 4865 } 4866 4866 } 4867 4867 4868 - static void pretty_print(struct trace_seq *s, void *data, int size, struct event_format *event) 4868 + static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event_format *event) 4869 4869 { 4870 4870 struct tep_handle *pevent = event->pevent; 4871 4871 struct print_fmt *print_fmt = &event->print_fmt; ··· 5228 5228 * 5229 5229 * This returns the event form a given @type; 5230 5230 */ 5231 - struct event_format *tep_data_event_from_type(struct tep_handle *pevent, int type) 5231 + struct tep_event_format *tep_data_event_from_type(struct tep_handle *pevent, int type) 5232 5232 { 5233 5233 return tep_find_event(pevent, type); 5234 5234 } ··· 5386 5386 * This parses the raw @data using the given @event information and 5387 5387 * writes the print format into the trace_seq. 5388 5388 */ 5389 - void tep_event_info(struct trace_seq *s, struct event_format *event, 5389 + void tep_event_info(struct trace_seq *s, struct tep_event_format *event, 5390 5390 struct tep_record *record) 5391 5391 { 5392 5392 int print_pretty = 1; ··· 5427 5427 * Returns the associated event for a given record, or NULL if non is 5428 5428 * is found. 5429 5429 */ 5430 - struct event_format * 5430 + struct tep_event_format * 5431 5431 tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record) 5432 5432 { 5433 5433 int type; ··· 5452 5452 * Writes the tasks comm, pid and CPU to @s. 5453 5453 */ 5454 5454 void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, 5455 - struct event_format *event, 5455 + struct tep_event_format *event, 5456 5456 struct tep_record *record) 5457 5457 { 5458 5458 void *data = record->data; ··· 5480 5480 * Writes the timestamp of the record into @s. 5481 5481 */ 5482 5482 void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, 5483 - struct event_format *event, 5483 + struct tep_event_format *event, 5484 5484 struct tep_record *record, 5485 5485 bool use_trace_clock) 5486 5486 { ··· 5530 5530 * Writes the parsing of the record's data to @s. 5531 5531 */ 5532 5532 void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, 5533 - struct event_format *event, 5533 + struct tep_event_format *event, 5534 5534 struct tep_record *record) 5535 5535 { 5536 5536 static const char *spaces = " "; /* 20 spaces */ ··· 5549 5549 void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, 5550 5550 struct tep_record *record, bool use_trace_clock) 5551 5551 { 5552 - struct event_format *event; 5552 + struct tep_event_format *event; 5553 5553 5554 5554 event = tep_find_event_by_record(pevent, record); 5555 5555 if (!event) { ··· 5571 5571 5572 5572 static int events_id_cmp(const void *a, const void *b) 5573 5573 { 5574 - struct event_format * const * ea = a; 5575 - struct event_format * const * eb = b; 5574 + struct tep_event_format * const * ea = a; 5575 + struct tep_event_format * const * eb = b; 5576 5576 5577 5577 if ((*ea)->id < (*eb)->id) 5578 5578 return -1; ··· 5585 5585 5586 5586 static int events_name_cmp(const void *a, const void *b) 5587 5587 { 5588 - struct event_format * const * ea = a; 5589 - struct event_format * const * eb = b; 5588 + struct tep_event_format * const * ea = a; 5589 + struct tep_event_format * const * eb = b; 5590 5590 int res; 5591 5591 5592 5592 res = strcmp((*ea)->name, (*eb)->name); ··· 5602 5602 5603 5603 static int events_system_cmp(const void *a, const void *b) 5604 5604 { 5605 - struct event_format * const * ea = a; 5606 - struct event_format * const * eb = b; 5605 + struct tep_event_format * const * ea = a; 5606 + struct tep_event_format * const * eb = b; 5607 5607 int res; 5608 5608 5609 5609 res = strcmp((*ea)->system, (*eb)->system); ··· 5617 5617 return events_id_cmp(a, b); 5618 5618 } 5619 5619 5620 - struct event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type sort_type) 5620 + struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type sort_type) 5621 5621 { 5622 - struct event_format **events; 5622 + struct tep_event_format **events; 5623 5623 int (*sort)(const void *a, const void *b); 5624 5624 5625 5625 events = pevent->sort_events; ··· 5702 5702 * Returns an allocated array of fields. The last item in the array is NULL. 5703 5703 * The array must be freed with free(). 5704 5704 */ 5705 - struct format_field **tep_event_common_fields(struct event_format *event) 5705 + struct format_field **tep_event_common_fields(struct tep_event_format *event) 5706 5706 { 5707 5707 return get_event_fields("common", event->name, 5708 5708 event->format.nr_common, ··· 5716 5716 * Returns an allocated array of fields. The last item in the array is NULL. 5717 5717 * The array must be freed with free(). 5718 5718 */ 5719 - struct format_field **tep_event_fields(struct event_format *event) 5719 + struct format_field **tep_event_fields(struct tep_event_format *event) 5720 5720 { 5721 5721 return get_event_fields("event", event->name, 5722 5722 event->format.nr_fields, ··· 5958 5958 return 0; 5959 5959 } 5960 5960 5961 - static int event_matches(struct event_format *event, 5961 + static int event_matches(struct tep_event_format *event, 5962 5962 int id, const char *sys_name, 5963 5963 const char *event_name) 5964 5964 { ··· 5981 5981 free(handle); 5982 5982 } 5983 5983 5984 - static int find_event_handle(struct tep_handle *pevent, struct event_format *event) 5984 + static int find_event_handle(struct tep_handle *pevent, struct tep_event_format *event) 5985 5985 { 5986 5986 struct event_handler *handle, **next; 5987 5987 ··· 6022 6022 * 6023 6023 * /sys/kernel/debug/tracing/events/.../.../format 6024 6024 */ 6025 - enum tep_errno __tep_parse_format(struct event_format **eventp, 6025 + enum tep_errno __tep_parse_format(struct tep_event_format **eventp, 6026 6026 struct tep_handle *pevent, const char *buf, 6027 6027 unsigned long size, const char *sys) 6028 6028 { 6029 - struct event_format *event; 6029 + struct tep_event_format *event; 6030 6030 int ret; 6031 6031 6032 6032 init_input_buf(buf, size); ··· 6131 6131 6132 6132 static enum tep_errno 6133 6133 __parse_event(struct tep_handle *pevent, 6134 - struct event_format **eventp, 6134 + struct tep_event_format **eventp, 6135 6135 const char *buf, unsigned long size, 6136 6136 const char *sys) 6137 6137 { 6138 6138 int ret = __tep_parse_format(eventp, pevent, buf, size, sys); 6139 - struct event_format *event = *eventp; 6139 + struct tep_event_format *event = *eventp; 6140 6140 6141 6141 if (event == NULL) 6142 6142 return ret; ··· 6173 6173 * /sys/kernel/debug/tracing/events/.../.../format 6174 6174 */ 6175 6175 enum tep_errno tep_parse_format(struct tep_handle *pevent, 6176 - struct event_format **eventp, 6176 + struct tep_event_format **eventp, 6177 6177 const char *buf, 6178 6178 unsigned long size, const char *sys) 6179 6179 { ··· 6197 6197 enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, 6198 6198 unsigned long size, const char *sys) 6199 6199 { 6200 - struct event_format *event = NULL; 6200 + struct tep_event_format *event = NULL; 6201 6201 return __parse_event(pevent, &event, buf, size, sys); 6202 6202 } 6203 6203 ··· 6263 6263 * 6264 6264 * On failure, it returns NULL. 6265 6265 */ 6266 - void *tep_get_field_raw(struct trace_seq *s, struct event_format *event, 6266 + void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, 6267 6267 const char *name, struct tep_record *record, 6268 6268 int *len, int err) 6269 6269 { ··· 6310 6310 * 6311 6311 * Returns 0 on success -1 on field not found. 6312 6312 */ 6313 - int tep_get_field_val(struct trace_seq *s, struct event_format *event, 6313 + int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, 6314 6314 const char *name, struct tep_record *record, 6315 6315 unsigned long long *val, int err) 6316 6316 { ··· 6335 6335 * 6336 6336 * Returns 0 on success -1 on field not found. 6337 6337 */ 6338 - int tep_get_common_field_val(struct trace_seq *s, struct event_format *event, 6338 + int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event, 6339 6339 const char *name, struct tep_record *record, 6340 6340 unsigned long long *val, int err) 6341 6341 { ··· 6360 6360 * 6361 6361 * Returns 0 on success -1 on field not found. 6362 6362 */ 6363 - int tep_get_any_field_val(struct trace_seq *s, struct event_format *event, 6363 + int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, 6364 6364 const char *name, struct tep_record *record, 6365 6365 unsigned long long *val, int err) 6366 6366 { ··· 6386 6386 * Returns: 0 on success, -1 field not found, or 1 if buffer is full. 6387 6387 */ 6388 6388 int tep_print_num_field(struct trace_seq *s, const char *fmt, 6389 - struct event_format *event, const char *name, 6389 + struct tep_event_format *event, const char *name, 6390 6390 struct tep_record *record, int err) 6391 6391 { 6392 6392 struct format_field *field = tep_find_field(event, name); ··· 6418 6418 * Returns: 0 on success, -1 field not found, or 1 if buffer is full. 6419 6419 */ 6420 6420 int tep_print_func_field(struct trace_seq *s, const char *fmt, 6421 - struct event_format *event, const char *name, 6421 + struct tep_event_format *event, const char *name, 6422 6422 struct tep_record *record, int err) 6423 6423 { 6424 6424 struct format_field *field = tep_find_field(event, name); ··· 6578 6578 return -1; 6579 6579 } 6580 6580 6581 - static struct event_format *search_event(struct tep_handle *pevent, int id, 6581 + static struct tep_event_format *search_event(struct tep_handle *pevent, int id, 6582 6582 const char *sys_name, 6583 6583 const char *event_name) 6584 6584 { 6585 - struct event_format *event; 6585 + struct tep_event_format *event; 6586 6586 6587 6587 if (id >= 0) { 6588 6588 /* search by id */ ··· 6622 6622 const char *sys_name, const char *event_name, 6623 6623 tep_event_handler_func func, void *context) 6624 6624 { 6625 - struct event_format *event; 6625 + struct tep_event_format *event; 6626 6626 struct event_handler *handle; 6627 6627 6628 6628 event = search_event(pevent, id, sys_name, event_name); ··· 6706 6706 const char *sys_name, const char *event_name, 6707 6707 tep_event_handler_func func, void *context) 6708 6708 { 6709 - struct event_format *event; 6709 + struct tep_event_format *event; 6710 6710 struct event_handler *handle; 6711 6711 struct event_handler **next; 6712 6712 ··· 6784 6784 free_format_fields(format->fields); 6785 6785 } 6786 6786 6787 - void tep_free_format(struct event_format *event) 6787 + void tep_free_format(struct tep_event_format *event) 6788 6788 { 6789 6789 free(event->name); 6790 6790 free(event->system);
+33 -33
tools/lib/traceevent/event-parse.h
··· 54 54 #endif 55 55 }; 56 56 57 - /* ----------------------- pevent ----------------------- */ 57 + /* ----------------------- tep ----------------------- */ 58 58 59 59 struct tep_handle; 60 - struct event_format; 60 + struct tep_event_format; 61 61 62 62 typedef int (*tep_event_handler_func)(struct trace_seq *s, 63 63 struct tep_record *record, 64 - struct event_format *event, 64 + struct tep_event_format *event, 65 65 void *context); 66 66 67 67 typedef int (*tep_plugin_load_func)(struct tep_handle *pevent); ··· 143 143 144 144 struct format_field { 145 145 struct format_field *next; 146 - struct event_format *event; 146 + struct tep_event_format *event; 147 147 char *type; 148 148 char *name; 149 149 char *alias; ··· 277 277 struct print_arg *args; 278 278 }; 279 279 280 - struct event_format { 280 + struct tep_event_format { 281 281 struct tep_handle *pevent; 282 282 char *name; 283 283 int id; ··· 451 451 unsigned int printk_count; 452 452 453 453 454 - struct event_format **events; 454 + struct tep_event_format **events; 455 455 int nr_events; 456 - struct event_format **sort_events; 456 + struct tep_event_format **sort_events; 457 457 enum event_sort_type last_type; 458 458 459 459 int type_offset; ··· 485 485 struct tep_function_handler *func_handlers; 486 486 487 487 /* cache */ 488 - struct event_format *last_event; 488 + struct tep_event_format *last_event; 489 489 490 490 char *trace_clock; 491 491 }; ··· 585 585 int tep_pid_is_registered(struct tep_handle *pevent, int pid); 586 586 587 587 void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, 588 - struct event_format *event, 588 + struct tep_event_format *event, 589 589 struct tep_record *record); 590 590 void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s, 591 - struct event_format *event, 591 + struct tep_event_format *event, 592 592 struct tep_record *record, 593 593 bool use_trace_clock); 594 594 void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s, 595 - struct event_format *event, 595 + struct tep_event_format *event, 596 596 struct tep_record *record); 597 597 void tep_print_event(struct tep_handle *pevent, struct trace_seq *s, 598 598 struct tep_record *record, bool use_trace_clock); ··· 603 603 enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf, 604 604 unsigned long size, const char *sys); 605 605 enum tep_errno tep_parse_format(struct tep_handle *pevent, 606 - struct event_format **eventp, 606 + struct tep_event_format **eventp, 607 607 const char *buf, 608 608 unsigned long size, const char *sys); 609 - void tep_free_format(struct event_format *event); 609 + void tep_free_format(struct tep_event_format *event); 610 610 void tep_free_format_field(struct format_field *field); 611 611 612 - void *tep_get_field_raw(struct trace_seq *s, struct event_format *event, 612 + void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, 613 613 const char *name, struct tep_record *record, 614 614 int *len, int err); 615 615 616 - int tep_get_field_val(struct trace_seq *s, struct event_format *event, 616 + int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, 617 617 const char *name, struct tep_record *record, 618 618 unsigned long long *val, int err); 619 - int tep_get_common_field_val(struct trace_seq *s, struct event_format *event, 619 + int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event, 620 620 const char *name, struct tep_record *record, 621 621 unsigned long long *val, int err); 622 - int tep_get_any_field_val(struct trace_seq *s, struct event_format *event, 622 + int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, 623 623 const char *name, struct tep_record *record, 624 624 unsigned long long *val, int err); 625 625 626 626 int tep_print_num_field(struct trace_seq *s, const char *fmt, 627 - struct event_format *event, const char *name, 628 - struct tep_record *record, int err); 627 + struct tep_event_format *event, const char *name, 628 + struct tep_record *record, int err); 629 629 630 630 int tep_print_func_field(struct trace_seq *s, const char *fmt, 631 - struct event_format *event, const char *name, 631 + struct tep_event_format *event, const char *name, 632 632 struct tep_record *record, int err); 633 633 634 634 int tep_register_event_handler(struct tep_handle *pevent, int id, ··· 644 644 int tep_unregister_print_function(struct tep_handle *pevent, 645 645 tep_func_handler func, char *name); 646 646 647 - struct format_field *tep_find_common_field(struct event_format *event, const char *name); 648 - struct format_field *tep_find_field(struct event_format *event, const char *name); 649 - struct format_field *tep_find_any_field(struct event_format *event, const char *name); 647 + struct format_field *tep_find_common_field(struct tep_event_format *event, const char *name); 648 + struct format_field *tep_find_field(struct tep_event_format *event, const char *name); 649 + struct format_field *tep_find_any_field(struct tep_event_format *event, const char *name); 650 650 651 651 const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr); 652 652 unsigned long long ··· 655 655 int tep_read_number_field(struct format_field *field, const void *data, 656 656 unsigned long long *value); 657 657 658 - struct event_format *tep_find_event(struct tep_handle *pevent, int id); 658 + struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id); 659 659 660 - struct event_format * 660 + struct tep_event_format * 661 661 tep_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); 662 662 663 - struct event_format * 663 + struct tep_event_format * 664 664 tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record); 665 665 666 666 void tep_data_lat_fmt(struct tep_handle *pevent, 667 667 struct trace_seq *s, struct tep_record *record); 668 668 int tep_data_type(struct tep_handle *pevent, struct tep_record *rec); 669 - struct event_format *tep_data_event_from_type(struct tep_handle *pevent, int type); 669 + struct tep_event_format *tep_data_event_from_type(struct tep_handle *pevent, int type); 670 670 int tep_data_pid(struct tep_handle *pevent, struct tep_record *rec); 671 671 int tep_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec); 672 672 int tep_data_flags(struct tep_handle *pevent, struct tep_record *rec); ··· 679 679 void tep_print_field(struct trace_seq *s, void *data, 680 680 struct format_field *field); 681 681 void tep_print_fields(struct trace_seq *s, void *data, 682 - int size __maybe_unused, struct event_format *event); 683 - void tep_event_info(struct trace_seq *s, struct event_format *event, 682 + int size __maybe_unused, struct tep_event_format *event); 683 + void tep_event_info(struct trace_seq *s, struct tep_event_format *event, 684 684 struct tep_record *record); 685 685 int tep_strerror(struct tep_handle *pevent, enum tep_errno errnum, 686 686 char *buf, size_t buflen); 687 687 688 - struct event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type); 689 - struct format_field **tep_event_common_fields(struct event_format *event); 690 - struct format_field **tep_event_fields(struct event_format *event); 688 + struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type); 689 + struct format_field **tep_event_common_fields(struct tep_event_format *event); 690 + struct format_field **tep_event_fields(struct tep_event_format *event); 691 691 692 692 static inline int tep_get_cpus(struct tep_handle *pevent) 693 693 { ··· 884 884 885 885 struct filter_type { 886 886 int event_id; 887 - struct event_format *event; 887 + struct tep_event_format *event; 888 888 struct filter_arg *filter; 889 889 }; 890 890
+21 -21
tools/lib/traceevent/parse-filter.c
··· 26 26 27 27 struct event_list { 28 28 struct event_list *next; 29 - struct event_format *event; 29 + struct tep_event_format *event; 30 30 }; 31 31 32 32 static void show_error(char *error_buf, const char *fmt, ...) ··· 228 228 } 229 229 230 230 static int add_event(struct event_list **events, 231 - struct event_format *event) 231 + struct tep_event_format *event) 232 232 { 233 233 struct event_list *list; 234 234 ··· 242 242 return 0; 243 243 } 244 244 245 - static int event_match(struct event_format *event, 245 + static int event_match(struct tep_event_format *event, 246 246 regex_t *sreg, regex_t *ereg) 247 247 { 248 248 if (sreg) { ··· 258 258 find_event(struct tep_handle *pevent, struct event_list **events, 259 259 char *sys_name, char *event_name) 260 260 { 261 - struct event_format *event; 261 + struct tep_event_format *event; 262 262 regex_t ereg; 263 263 regex_t sreg; 264 264 int match = 0; ··· 333 333 } 334 334 335 335 static enum tep_errno 336 - create_arg_item(struct event_format *event, const char *token, 336 + create_arg_item(struct tep_event_format *event, const char *token, 337 337 enum event_type type, struct filter_arg **parg, char *error_str) 338 338 { 339 339 struct format_field *field; ··· 939 939 } 940 940 941 941 static enum tep_errno 942 - process_filter(struct event_format *event, struct filter_arg **parg, 942 + process_filter(struct tep_event_format *event, struct filter_arg **parg, 943 943 char *error_str, int not) 944 944 { 945 945 enum event_type type; ··· 1179 1179 } 1180 1180 1181 1181 static enum tep_errno 1182 - process_event(struct event_format *event, const char *filter_str, 1182 + process_event(struct tep_event_format *event, const char *filter_str, 1183 1183 struct filter_arg **parg, char *error_str) 1184 1184 { 1185 1185 int ret; ··· 1204 1204 } 1205 1205 1206 1206 static enum tep_errno 1207 - filter_event(struct event_filter *filter, struct event_format *event, 1207 + filter_event(struct event_filter *filter, struct tep_event_format *event, 1208 1208 const char *filter_str, char *error_str) 1209 1209 { 1210 1210 struct filter_type *filter_type; ··· 1456 1456 struct filter_type *filter_type) 1457 1457 { 1458 1458 struct filter_arg *arg; 1459 - struct event_format *event; 1459 + struct tep_event_format *event; 1460 1460 const char *sys; 1461 1461 const char *name; 1462 1462 char *str; ··· 1538 1538 { 1539 1539 struct tep_handle *src_pevent; 1540 1540 struct tep_handle *dest_pevent; 1541 - struct event_format *event; 1541 + struct tep_event_format *event; 1542 1542 struct filter_type *filter_type; 1543 1543 struct filter_arg *arg; 1544 1544 char *str; ··· 1682 1682 } 1683 1683 } 1684 1684 1685 - static int test_filter(struct event_format *event, struct filter_arg *arg, 1685 + static int test_filter(struct tep_event_format *event, struct filter_arg *arg, 1686 1686 struct tep_record *record, enum tep_errno *err); 1687 1687 1688 1688 static const char * 1689 - get_comm(struct event_format *event, struct tep_record *record) 1689 + get_comm(struct tep_event_format *event, struct tep_record *record) 1690 1690 { 1691 1691 const char *comm; 1692 1692 int pid; ··· 1697 1697 } 1698 1698 1699 1699 static unsigned long long 1700 - get_value(struct event_format *event, 1700 + get_value(struct tep_event_format *event, 1701 1701 struct format_field *field, struct tep_record *record) 1702 1702 { 1703 1703 unsigned long long val; ··· 1733 1733 } 1734 1734 1735 1735 static unsigned long long 1736 - get_arg_value(struct event_format *event, struct filter_arg *arg, 1736 + get_arg_value(struct tep_event_format *event, struct filter_arg *arg, 1737 1737 struct tep_record *record, enum tep_errno *err); 1738 1738 1739 1739 static unsigned long long 1740 - get_exp_value(struct event_format *event, struct filter_arg *arg, 1740 + get_exp_value(struct tep_event_format *event, struct filter_arg *arg, 1741 1741 struct tep_record *record, enum tep_errno *err) 1742 1742 { 1743 1743 unsigned long long lval, rval; ··· 1792 1792 } 1793 1793 1794 1794 static unsigned long long 1795 - get_arg_value(struct event_format *event, struct filter_arg *arg, 1795 + get_arg_value(struct tep_event_format *event, struct filter_arg *arg, 1796 1796 struct tep_record *record, enum tep_errno *err) 1797 1797 { 1798 1798 switch (arg->type) { ··· 1816 1816 return 0; 1817 1817 } 1818 1818 1819 - static int test_num(struct event_format *event, struct filter_arg *arg, 1819 + static int test_num(struct tep_event_format *event, struct filter_arg *arg, 1820 1820 struct tep_record *record, enum tep_errno *err) 1821 1821 { 1822 1822 unsigned long long lval, rval; ··· 1859 1859 1860 1860 static const char *get_field_str(struct filter_arg *arg, struct tep_record *record) 1861 1861 { 1862 - struct event_format *event; 1862 + struct tep_event_format *event; 1863 1863 struct tep_handle *pevent; 1864 1864 unsigned long long addr; 1865 1865 const char *val = NULL; ··· 1907 1907 return val; 1908 1908 } 1909 1909 1910 - static int test_str(struct event_format *event, struct filter_arg *arg, 1910 + static int test_str(struct tep_event_format *event, struct filter_arg *arg, 1911 1911 struct tep_record *record, enum tep_errno *err) 1912 1912 { 1913 1913 const char *val; ··· 1938 1938 } 1939 1939 } 1940 1940 1941 - static int test_op(struct event_format *event, struct filter_arg *arg, 1941 + static int test_op(struct tep_event_format *event, struct filter_arg *arg, 1942 1942 struct tep_record *record, enum tep_errno *err) 1943 1943 { 1944 1944 switch (arg->op.type) { ··· 1960 1960 } 1961 1961 } 1962 1962 1963 - static int test_filter(struct event_format *event, struct filter_arg *arg, 1963 + static int test_filter(struct tep_event_format *event, struct filter_arg *arg, 1964 1964 struct tep_record *record, enum tep_errno *err) 1965 1965 { 1966 1966 if (*err) {
+1 -1
tools/lib/traceevent/plugin_function.c
··· 124 124 } 125 125 126 126 static int function_handler(struct trace_seq *s, struct tep_record *record, 127 - struct event_format *event, void *context) 127 + struct tep_event_format *event, void *context) 128 128 { 129 129 struct tep_handle *pevent = event->pevent; 130 130 unsigned long long function;
+2 -2
tools/lib/traceevent/plugin_hrtimer.c
··· 27 27 28 28 static int timer_expire_handler(struct trace_seq *s, 29 29 struct tep_record *record, 30 - struct event_format *event, void *context) 30 + struct tep_event_format *event, void *context) 31 31 { 32 32 trace_seq_printf(s, "hrtimer="); 33 33 ··· 47 47 48 48 static int timer_start_handler(struct trace_seq *s, 49 49 struct tep_record *record, 50 - struct event_format *event, void *context) 50 + struct tep_event_format *event, void *context) 51 51 { 52 52 trace_seq_printf(s, "hrtimer="); 53 53
+1 -1
tools/lib/traceevent/plugin_kmem.c
··· 25 25 #include "trace-seq.h" 26 26 27 27 static int call_site_handler(struct trace_seq *s, struct tep_record *record, 28 - struct event_format *event, void *context) 28 + struct tep_event_format *event, void *context) 29 29 { 30 30 struct format_field *field; 31 31 unsigned long long val, addr;
+7 -7
tools/lib/traceevent/plugin_kvm.c
··· 249 249 } 250 250 251 251 static int print_exit_reason(struct trace_seq *s, struct tep_record *record, 252 - struct event_format *event, const char *field) 252 + struct tep_event_format *event, const char *field) 253 253 { 254 254 unsigned long long isa; 255 255 unsigned long long val; ··· 270 270 } 271 271 272 272 static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, 273 - struct event_format *event, void *context) 273 + struct tep_event_format *event, void *context) 274 274 { 275 275 unsigned long long info1 = 0, info2 = 0; 276 276 ··· 293 293 294 294 static int kvm_emulate_insn_handler(struct trace_seq *s, 295 295 struct tep_record *record, 296 - struct event_format *event, void *context) 296 + struct tep_event_format *event, void *context) 297 297 { 298 298 unsigned long long rip, csbase, len, flags, failed; 299 299 int llen; ··· 332 332 333 333 334 334 static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_record *record, 335 - struct event_format *event, void *context) 335 + struct tep_event_format *event, void *context) 336 336 { 337 337 if (print_exit_reason(s, record, event, "exit_code") < 0) 338 338 return -1; ··· 346 346 } 347 347 348 348 static int kvm_nested_vmexit_handler(struct trace_seq *s, struct tep_record *record, 349 - struct event_format *event, void *context) 349 + struct tep_event_format *event, void *context) 350 350 { 351 351 tep_print_num_field(s, "rip %llx ", event, "rip", record, 1); 352 352 ··· 372 372 }; 373 373 374 374 static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, 375 - struct event_format *event, void *context) 375 + struct tep_event_format *event, void *context) 376 376 { 377 377 unsigned long long val; 378 378 static const char *access_str[] = { ··· 419 419 420 420 static int kvm_mmu_get_page_handler(struct trace_seq *s, 421 421 struct tep_record *record, 422 - struct event_format *event, void *context) 422 + struct tep_event_format *event, void *context) 423 423 { 424 424 unsigned long long val; 425 425
+2 -2
tools/lib/traceevent/plugin_mac80211.c
··· 26 26 27 27 #define INDENT 65 28 28 29 - static void print_string(struct trace_seq *s, struct event_format *event, 29 + static void print_string(struct trace_seq *s, struct tep_event_format *event, 30 30 const char *name, const void *data) 31 31 { 32 32 struct format_field *f = tep_find_field(event, name); ··· 60 60 61 61 static int drv_bss_info_changed(struct trace_seq *s, 62 62 struct tep_record *record, 63 - struct event_format *event, void *context) 63 + struct tep_event_format *event, void *context) 64 64 { 65 65 void *data = record->data; 66 66
+2 -2
tools/lib/traceevent/plugin_sched_switch.c
··· 67 67 68 68 static int sched_wakeup_handler(struct trace_seq *s, 69 69 struct tep_record *record, 70 - struct event_format *event, void *context) 70 + struct tep_event_format *event, void *context) 71 71 { 72 72 struct format_field *field; 73 73 unsigned long long val; ··· 96 96 97 97 static int sched_switch_handler(struct trace_seq *s, 98 98 struct tep_record *record, 99 - struct event_format *event, void *context) 99 + struct tep_event_format *event, void *context) 100 100 { 101 101 struct format_field *field; 102 102 unsigned long long val;
+1 -1
tools/perf/builtin-trace.c
··· 862 862 * args_size: sum of the sizes of the syscall arguments, anything after that is augmented stuff: pathname for openat, etc. 863 863 */ 864 864 struct syscall { 865 - struct event_format *tp_format; 865 + struct tep_event_format *tp_format; 866 866 int nr_args; 867 867 int args_size; 868 868 bool is_exit;
+2 -2
tools/perf/util/evsel.h
··· 102 102 char *name; 103 103 double scale; 104 104 const char *unit; 105 - struct event_format *tp_format; 105 + struct tep_event_format *tp_format; 106 106 off_t id_offset; 107 107 struct perf_stat_evsel *stats; 108 108 void *priv; ··· 211 211 212 212 struct perf_evsel *perf_evsel__new_cycles(bool precise); 213 213 214 - struct event_format *event_format__new(const char *sys, const char *name); 214 + struct tep_event_format *event_format__new(const char *sys, const char *name); 215 215 216 216 void perf_evsel__init(struct perf_evsel *evsel, 217 217 struct perf_event_attr *attr, int idx);
+1 -1
tools/perf/util/header.c
··· 3206 3206 static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel, 3207 3207 struct tep_handle *pevent) 3208 3208 { 3209 - struct event_format *event; 3209 + struct tep_event_format *event; 3210 3210 char bf[128]; 3211 3211 3212 3212 /* already prepared */
+2 -2
tools/perf/util/python.c
··· 386 386 struct format_field *field; 387 387 388 388 if (!evsel->tp_format) { 389 - struct event_format *tp_format; 389 + struct tep_event_format *tp_format; 390 390 391 391 tp_format = trace_event__tp_format_id(evsel->attr.config); 392 392 if (!tp_format) ··· 1240 1240 static PyObject *pyrf__tracepoint(struct pyrf_evsel *pevsel, 1241 1241 PyObject *args, PyObject *kwargs) 1242 1242 { 1243 - struct event_format *tp_format; 1243 + struct tep_event_format *tp_format; 1244 1244 static char *kwlist[] = { "sys", "name", NULL }; 1245 1245 char *sys = NULL; 1246 1246 char *name = NULL;
+3 -3
tools/perf/util/scripting-engines/trace-event-perl.c
··· 189 189 LEAVE; 190 190 } 191 191 192 - static void define_event_symbols(struct event_format *event, 192 + static void define_event_symbols(struct tep_event_format *event, 193 193 const char *ev_name, 194 194 struct print_arg *args) 195 195 { ··· 338 338 struct addr_location *al) 339 339 { 340 340 struct thread *thread = al->thread; 341 - struct event_format *event = evsel->tp_format; 341 + struct tep_event_format *event = evsel->tp_format; 342 342 struct format_field *field; 343 343 static char handler[256]; 344 344 unsigned long long val; ··· 537 537 538 538 static int perl_generate_script(struct tep_handle *pevent, const char *outfile) 539 539 { 540 - struct event_format *event = NULL; 540 + struct tep_event_format *event = NULL; 541 541 struct format_field *f; 542 542 char fname[PATH_MAX]; 543 543 int not_first, count;
+4 -4
tools/perf/util/scripting-engines/trace-event-python.c
··· 264 264 Py_DECREF(t); 265 265 } 266 266 267 - static void define_event_symbols(struct event_format *event, 267 + static void define_event_symbols(struct tep_event_format *event, 268 268 const char *ev_name, 269 269 struct print_arg *args) 270 270 { ··· 332 332 define_event_symbols(event, ev_name, args->next); 333 333 } 334 334 335 - static PyObject *get_field_numeric_entry(struct event_format *event, 335 + static PyObject *get_field_numeric_entry(struct tep_event_format *event, 336 336 struct format_field *field, void *data) 337 337 { 338 338 bool is_array = field->flags & FIELD_IS_ARRAY; ··· 790 790 struct perf_evsel *evsel, 791 791 struct addr_location *al) 792 792 { 793 - struct event_format *event = evsel->tp_format; 793 + struct tep_event_format *event = evsel->tp_format; 794 794 PyObject *handler, *context, *t, *obj = NULL, *callchain; 795 795 PyObject *dict = NULL, *all_entries_dict = NULL; 796 796 static char handler_name[256]; ··· 1590 1590 1591 1591 static int python_generate_script(struct tep_handle *pevent, const char *outfile) 1592 1592 { 1593 - struct event_format *event = NULL; 1593 + struct tep_event_format *event = NULL; 1594 1594 struct format_field *f; 1595 1595 char fname[PATH_MAX]; 1596 1596 int not_first, count;
+7 -7
tools/perf/util/trace-event-parse.c
··· 33 33 int *offset, int *size, const char *type) 34 34 { 35 35 struct tep_handle *pevent = context->pevent; 36 - struct event_format *event; 36 + struct tep_event_format *event; 37 37 struct format_field *field; 38 38 39 39 if (!*size) { ··· 94 94 } 95 95 96 96 unsigned long long 97 - raw_field_value(struct event_format *event, const char *name, void *data) 97 + raw_field_value(struct tep_event_format *event, const char *name, void *data) 98 98 { 99 99 struct format_field *field; 100 100 unsigned long long val; ··· 108 108 return val; 109 109 } 110 110 111 - unsigned long long read_size(struct event_format *event, void *ptr, int size) 111 + unsigned long long read_size(struct tep_event_format *event, void *ptr, int size) 112 112 { 113 113 return tep_read_number(event->pevent, ptr, size); 114 114 } 115 115 116 - void event_format__fprintf(struct event_format *event, 116 + void event_format__fprintf(struct tep_event_format *event, 117 117 int cpu, void *data, int size, FILE *fp) 118 118 { 119 119 struct tep_record record; ··· 130 130 trace_seq_destroy(&s); 131 131 } 132 132 133 - void event_format__print(struct event_format *event, 133 + void event_format__print(struct tep_event_format *event, 134 134 int cpu, void *data, int size) 135 135 { 136 136 return event_format__fprintf(event, cpu, data, size, stdout); ··· 188 188 return tep_parse_event(pevent, buf, size, sys); 189 189 } 190 190 191 - struct event_format *trace_find_next_event(struct tep_handle *pevent, 192 - struct event_format *event) 191 + struct tep_event_format *trace_find_next_event(struct tep_handle *pevent, 192 + struct tep_event_format *event) 193 193 { 194 194 static int idx; 195 195
+4 -4
tools/perf/util/trace-event.c
··· 72 72 /* 73 73 * Returns pointer with encoded error via <linux/err.h> interface. 74 74 */ 75 - static struct event_format* 75 + static struct tep_event_format* 76 76 tp_format(const char *sys, const char *name) 77 77 { 78 78 char *tp_dir = get_events_file(sys); 79 79 struct tep_handle *pevent = tevent.pevent; 80 - struct event_format *event = NULL; 80 + struct tep_event_format *event = NULL; 81 81 char path[PATH_MAX]; 82 82 size_t size; 83 83 char *data; ··· 102 102 /* 103 103 * Returns pointer with encoded error via <linux/err.h> interface. 104 104 */ 105 - struct event_format* 105 + struct tep_event_format* 106 106 trace_event__tp_format(const char *sys, const char *name) 107 107 { 108 108 if (!tevent_initialized && trace_event__init2()) ··· 111 111 return tp_format(sys, name); 112 112 } 113 113 114 - struct event_format *trace_event__tp_format_id(int id) 114 + struct tep_event_format *trace_event__tp_format_id(int id) 115 115 { 116 116 if (!tevent_initialized && trace_event__init2()) 117 117 return ERR_PTR(-ENOMEM);
+8 -8
tools/perf/util/trace-event.h
··· 22 22 void trace_event__cleanup(struct trace_event *t); 23 23 int trace_event__register_resolver(struct machine *machine, 24 24 tep_func_resolver_t *func); 25 - struct event_format* 25 + struct tep_event_format* 26 26 trace_event__tp_format(const char *sys, const char *name); 27 27 28 - struct event_format *trace_event__tp_format_id(int id); 28 + struct tep_event_format *trace_event__tp_format_id(int id); 29 29 30 30 int bigendian(void); 31 31 32 - void event_format__fprintf(struct event_format *event, 32 + void event_format__fprintf(struct tep_event_format *event, 33 33 int cpu, void *data, int size, FILE *fp); 34 34 35 - void event_format__print(struct event_format *event, 35 + void event_format__print(struct tep_event_format *event, 36 36 int cpu, void *data, int size); 37 37 38 38 int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size); ··· 40 40 char *buf, unsigned long size, char *sys); 41 41 42 42 unsigned long long 43 - raw_field_value(struct event_format *event, const char *name, void *data); 43 + raw_field_value(struct tep_event_format *event, const char *name, void *data); 44 44 45 45 void parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size); 46 46 void parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size); ··· 48 48 49 49 ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe); 50 50 51 - struct event_format *trace_find_next_event(struct tep_handle *pevent, 52 - struct event_format *event); 53 - unsigned long long read_size(struct event_format *event, void *ptr, int size); 51 + struct tep_event_format *trace_find_next_event(struct tep_handle *pevent, 52 + struct tep_event_format *event); 53 + unsigned long long read_size(struct tep_event_format *event, void *ptr, int size); 54 54 unsigned long long eval_flag(const char *flag); 55 55 56 56 int read_tracing_data(int fd, struct list_head *pattrs);