diff options
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 148 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 136 | ||||
-rw-r--r-- | tools/lib/traceevent/event-plugin.c | 14 | ||||
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 14 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_cfg80211.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_function.c | 6 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_hrtimer.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_jbd2.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kmem.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_kvm.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_mac80211.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_sched_switch.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_scsi.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/plugin_xen.c | 4 |
14 files changed, 177 insertions, 177 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index e5f2acbb70cc..1eec313cc447 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -160,7 +160,7 @@ struct cmdline_list { | |||
160 | int pid; | 160 | int pid; |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static int cmdline_init(struct pevent *pevent) | 163 | static int cmdline_init(struct tep_handle *pevent) |
164 | { | 164 | { |
165 | struct cmdline_list *cmdlist = pevent->cmdlist; | 165 | struct cmdline_list *cmdlist = pevent->cmdlist; |
166 | struct cmdline_list *item; | 166 | struct cmdline_list *item; |
@@ -189,7 +189,7 @@ static int cmdline_init(struct pevent *pevent) | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | static const char *find_cmdline(struct pevent *pevent, int pid) | 192 | static const char *find_cmdline(struct tep_handle *pevent, int pid) |
193 | { | 193 | { |
194 | const struct cmdline *comm; | 194 | const struct cmdline *comm; |
195 | struct cmdline key; | 195 | struct cmdline key; |
@@ -218,7 +218,7 @@ static const char *find_cmdline(struct pevent *pevent, int pid) | |||
218 | * Returns 1 if the pid has a cmdline mapped to it | 218 | * Returns 1 if the pid has a cmdline mapped to it |
219 | * 0 otherwise. | 219 | * 0 otherwise. |
220 | */ | 220 | */ |
221 | int pevent_pid_is_registered(struct pevent *pevent, int pid) | 221 | int pevent_pid_is_registered(struct tep_handle *pevent, int pid) |
222 | { | 222 | { |
223 | const struct cmdline *comm; | 223 | const struct cmdline *comm; |
224 | struct cmdline key; | 224 | struct cmdline key; |
@@ -244,7 +244,7 @@ int pevent_pid_is_registered(struct pevent *pevent, int pid) | |||
244 | * we must add this pid. This is much slower than when cmdlines | 244 | * we must add this pid. This is much slower than when cmdlines |
245 | * are added before the array is initialized. | 245 | * are added before the array is initialized. |
246 | */ | 246 | */ |
247 | static int add_new_comm(struct pevent *pevent, const char *comm, int pid) | 247 | static int add_new_comm(struct tep_handle *pevent, const char *comm, int pid) |
248 | { | 248 | { |
249 | struct cmdline *cmdlines = pevent->cmdlines; | 249 | struct cmdline *cmdlines = pevent->cmdlines; |
250 | const struct cmdline *cmdline; | 250 | const struct cmdline *cmdline; |
@@ -296,7 +296,7 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid) | |||
296 | * This adds a mapping to search for command line names with | 296 | * This adds a mapping to search for command line names with |
297 | * a given pid. The comm is duplicated. | 297 | * a given pid. The comm is duplicated. |
298 | */ | 298 | */ |
299 | int pevent_register_comm(struct pevent *pevent, const char *comm, int pid) | 299 | int pevent_register_comm(struct tep_handle *pevent, const char *comm, int pid) |
300 | { | 300 | { |
301 | struct cmdline_list *item; | 301 | struct cmdline_list *item; |
302 | 302 | ||
@@ -324,7 +324,7 @@ int pevent_register_comm(struct pevent *pevent, const char *comm, int pid) | |||
324 | return 0; | 324 | return 0; |
325 | } | 325 | } |
326 | 326 | ||
327 | int pevent_register_trace_clock(struct pevent *pevent, const char *trace_clock) | 327 | int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock) |
328 | { | 328 | { |
329 | pevent->trace_clock = strdup(trace_clock); | 329 | pevent->trace_clock = strdup(trace_clock); |
330 | if (!pevent->trace_clock) { | 330 | if (!pevent->trace_clock) { |
@@ -381,7 +381,7 @@ static int func_bcmp(const void *a, const void *b) | |||
381 | return 1; | 381 | return 1; |
382 | } | 382 | } |
383 | 383 | ||
384 | static int func_map_init(struct pevent *pevent) | 384 | static int func_map_init(struct tep_handle *pevent) |
385 | { | 385 | { |
386 | struct func_list *funclist; | 386 | struct func_list *funclist; |
387 | struct func_list *item; | 387 | struct func_list *item; |
@@ -421,7 +421,7 @@ static int func_map_init(struct pevent *pevent) | |||
421 | } | 421 | } |
422 | 422 | ||
423 | static struct func_map * | 423 | static struct func_map * |
424 | __find_func(struct pevent *pevent, unsigned long long addr) | 424 | __find_func(struct tep_handle *pevent, unsigned long long addr) |
425 | { | 425 | { |
426 | struct func_map *func; | 426 | struct func_map *func; |
427 | struct func_map key; | 427 | struct func_map key; |
@@ -453,7 +453,7 @@ struct func_resolver { | |||
453 | * keep using it instead of duplicating all the entries inside | 453 | * keep using it instead of duplicating all the entries inside |
454 | * pevent->funclist. | 454 | * pevent->funclist. |
455 | */ | 455 | */ |
456 | int pevent_set_function_resolver(struct pevent *pevent, | 456 | int pevent_set_function_resolver(struct tep_handle *pevent, |
457 | pevent_func_resolver_t *func, void *priv) | 457 | pevent_func_resolver_t *func, void *priv) |
458 | { | 458 | { |
459 | struct func_resolver *resolver = malloc(sizeof(*resolver)); | 459 | struct func_resolver *resolver = malloc(sizeof(*resolver)); |
@@ -477,14 +477,14 @@ int pevent_set_function_resolver(struct pevent *pevent, | |||
477 | * Stop using whatever alternative resolver was set, use the default | 477 | * Stop using whatever alternative resolver was set, use the default |
478 | * one instead. | 478 | * one instead. |
479 | */ | 479 | */ |
480 | void pevent_reset_function_resolver(struct pevent *pevent) | 480 | void pevent_reset_function_resolver(struct tep_handle *pevent) |
481 | { | 481 | { |
482 | free(pevent->func_resolver); | 482 | free(pevent->func_resolver); |
483 | pevent->func_resolver = NULL; | 483 | pevent->func_resolver = NULL; |
484 | } | 484 | } |
485 | 485 | ||
486 | static struct func_map * | 486 | static struct func_map * |
487 | find_func(struct pevent *pevent, unsigned long long addr) | 487 | find_func(struct tep_handle *pevent, unsigned long long addr) |
488 | { | 488 | { |
489 | struct func_map *map; | 489 | struct func_map *map; |
490 | 490 | ||
@@ -511,7 +511,7 @@ find_func(struct pevent *pevent, unsigned long long addr) | |||
511 | * address. Note, the address does not have to be exact, it | 511 | * address. Note, the address does not have to be exact, it |
512 | * will select the function that would contain the address. | 512 | * will select the function that would contain the address. |
513 | */ | 513 | */ |
514 | const char *pevent_find_function(struct pevent *pevent, unsigned long long addr) | 514 | const char *pevent_find_function(struct tep_handle *pevent, unsigned long long addr) |
515 | { | 515 | { |
516 | struct func_map *map; | 516 | struct func_map *map; |
517 | 517 | ||
@@ -532,7 +532,7 @@ const char *pevent_find_function(struct pevent *pevent, unsigned long long addr) | |||
532 | * name and the function offset. | 532 | * name and the function offset. |
533 | */ | 533 | */ |
534 | unsigned long long | 534 | unsigned long long |
535 | pevent_find_function_address(struct pevent *pevent, unsigned long long addr) | 535 | pevent_find_function_address(struct tep_handle *pevent, unsigned long long addr) |
536 | { | 536 | { |
537 | struct func_map *map; | 537 | struct func_map *map; |
538 | 538 | ||
@@ -553,7 +553,7 @@ pevent_find_function_address(struct pevent *pevent, unsigned long long addr) | |||
553 | * This registers a function name with an address and module. | 553 | * This registers a function name with an address and module. |
554 | * The @func passed in is duplicated. | 554 | * The @func passed in is duplicated. |
555 | */ | 555 | */ |
556 | int pevent_register_function(struct pevent *pevent, char *func, | 556 | int pevent_register_function(struct tep_handle *pevent, char *func, |
557 | unsigned long long addr, char *mod) | 557 | unsigned long long addr, char *mod) |
558 | { | 558 | { |
559 | struct func_list *item = malloc(sizeof(*item)); | 559 | struct func_list *item = malloc(sizeof(*item)); |
@@ -594,7 +594,7 @@ out_free: | |||
594 | * | 594 | * |
595 | * This prints out the stored functions. | 595 | * This prints out the stored functions. |
596 | */ | 596 | */ |
597 | void pevent_print_funcs(struct pevent *pevent) | 597 | void pevent_print_funcs(struct tep_handle *pevent) |
598 | { | 598 | { |
599 | int i; | 599 | int i; |
600 | 600 | ||
@@ -636,7 +636,7 @@ static int printk_cmp(const void *a, const void *b) | |||
636 | return 0; | 636 | return 0; |
637 | } | 637 | } |
638 | 638 | ||
639 | static int printk_map_init(struct pevent *pevent) | 639 | static int printk_map_init(struct tep_handle *pevent) |
640 | { | 640 | { |
641 | struct printk_list *printklist; | 641 | struct printk_list *printklist; |
642 | struct printk_list *item; | 642 | struct printk_list *item; |
@@ -668,7 +668,7 @@ static int printk_map_init(struct pevent *pevent) | |||
668 | } | 668 | } |
669 | 669 | ||
670 | static struct printk_map * | 670 | static struct printk_map * |
671 | find_printk(struct pevent *pevent, unsigned long long addr) | 671 | find_printk(struct tep_handle *pevent, unsigned long long addr) |
672 | { | 672 | { |
673 | struct printk_map *printk; | 673 | struct printk_map *printk; |
674 | struct printk_map key; | 674 | struct printk_map key; |
@@ -693,7 +693,7 @@ find_printk(struct pevent *pevent, unsigned long long addr) | |||
693 | * This registers a string by the address it was stored in the kernel. | 693 | * This registers a string by the address it was stored in the kernel. |
694 | * The @fmt passed in is duplicated. | 694 | * The @fmt passed in is duplicated. |
695 | */ | 695 | */ |
696 | int pevent_register_print_string(struct pevent *pevent, const char *fmt, | 696 | int pevent_register_print_string(struct tep_handle *pevent, const char *fmt, |
697 | unsigned long long addr) | 697 | unsigned long long addr) |
698 | { | 698 | { |
699 | struct printk_list *item = malloc(sizeof(*item)); | 699 | struct printk_list *item = malloc(sizeof(*item)); |
@@ -737,7 +737,7 @@ out_free: | |||
737 | * | 737 | * |
738 | * This prints the string formats that were stored. | 738 | * This prints the string formats that were stored. |
739 | */ | 739 | */ |
740 | void pevent_print_printk(struct pevent *pevent) | 740 | void pevent_print_printk(struct tep_handle *pevent) |
741 | { | 741 | { |
742 | int i; | 742 | int i; |
743 | 743 | ||
@@ -756,7 +756,7 @@ static struct event_format *alloc_event(void) | |||
756 | return calloc(1, sizeof(struct event_format)); | 756 | return calloc(1, sizeof(struct event_format)); |
757 | } | 757 | } |
758 | 758 | ||
759 | static int add_event(struct pevent *pevent, struct event_format *event) | 759 | static int add_event(struct tep_handle *pevent, struct event_format *event) |
760 | { | 760 | { |
761 | int i; | 761 | int i; |
762 | struct event_format **events = realloc(pevent->events, sizeof(event) * | 762 | struct event_format **events = realloc(pevent->events, sizeof(event) * |
@@ -2915,7 +2915,7 @@ process_bitmask(struct event_format *event __maybe_unused, struct print_arg *arg | |||
2915 | } | 2915 | } |
2916 | 2916 | ||
2917 | static struct pevent_function_handler * | 2917 | static struct pevent_function_handler * |
2918 | find_func_handler(struct pevent *pevent, char *func_name) | 2918 | find_func_handler(struct tep_handle *pevent, char *func_name) |
2919 | { | 2919 | { |
2920 | struct pevent_function_handler *func; | 2920 | struct pevent_function_handler *func; |
2921 | 2921 | ||
@@ -2930,7 +2930,7 @@ find_func_handler(struct pevent *pevent, char *func_name) | |||
2930 | return func; | 2930 | return func; |
2931 | } | 2931 | } |
2932 | 2932 | ||
2933 | static void remove_func_handler(struct pevent *pevent, char *func_name) | 2933 | static void remove_func_handler(struct tep_handle *pevent, char *func_name) |
2934 | { | 2934 | { |
2935 | struct pevent_function_handler *func; | 2935 | struct pevent_function_handler *func; |
2936 | struct pevent_function_handler **next; | 2936 | struct pevent_function_handler **next; |
@@ -3337,7 +3337,7 @@ pevent_find_any_field(struct event_format *event, const char *name) | |||
3337 | * Returns the number (converted to host) from the | 3337 | * Returns the number (converted to host) from the |
3338 | * raw data. | 3338 | * raw data. |
3339 | */ | 3339 | */ |
3340 | unsigned long long pevent_read_number(struct pevent *pevent, | 3340 | unsigned long long pevent_read_number(struct tep_handle *pevent, |
3341 | const void *ptr, int size) | 3341 | const void *ptr, int size) |
3342 | { | 3342 | { |
3343 | switch (size) { | 3343 | switch (size) { |
@@ -3384,7 +3384,7 @@ int pevent_read_number_field(struct format_field *field, const void *data, | |||
3384 | } | 3384 | } |
3385 | } | 3385 | } |
3386 | 3386 | ||
3387 | static int get_common_info(struct pevent *pevent, | 3387 | static int get_common_info(struct tep_handle *pevent, |
3388 | const char *type, int *offset, int *size) | 3388 | const char *type, int *offset, int *size) |
3389 | { | 3389 | { |
3390 | struct event_format *event; | 3390 | struct event_format *event; |
@@ -3410,7 +3410,7 @@ static int get_common_info(struct pevent *pevent, | |||
3410 | return 0; | 3410 | return 0; |
3411 | } | 3411 | } |
3412 | 3412 | ||
3413 | static int __parse_common(struct pevent *pevent, void *data, | 3413 | static int __parse_common(struct tep_handle *pevent, void *data, |
3414 | int *size, int *offset, const char *name) | 3414 | int *size, int *offset, const char *name) |
3415 | { | 3415 | { |
3416 | int ret; | 3416 | int ret; |
@@ -3423,42 +3423,42 @@ static int __parse_common(struct pevent *pevent, void *data, | |||
3423 | return pevent_read_number(pevent, data + *offset, *size); | 3423 | return pevent_read_number(pevent, data + *offset, *size); |
3424 | } | 3424 | } |
3425 | 3425 | ||
3426 | static int trace_parse_common_type(struct pevent *pevent, void *data) | 3426 | static int trace_parse_common_type(struct tep_handle *pevent, void *data) |
3427 | { | 3427 | { |
3428 | return __parse_common(pevent, data, | 3428 | return __parse_common(pevent, data, |
3429 | &pevent->type_size, &pevent->type_offset, | 3429 | &pevent->type_size, &pevent->type_offset, |
3430 | "common_type"); | 3430 | "common_type"); |
3431 | } | 3431 | } |
3432 | 3432 | ||
3433 | static int parse_common_pid(struct pevent *pevent, void *data) | 3433 | static int parse_common_pid(struct tep_handle *pevent, void *data) |
3434 | { | 3434 | { |
3435 | return __parse_common(pevent, data, | 3435 | return __parse_common(pevent, data, |
3436 | &pevent->pid_size, &pevent->pid_offset, | 3436 | &pevent->pid_size, &pevent->pid_offset, |
3437 | "common_pid"); | 3437 | "common_pid"); |
3438 | } | 3438 | } |
3439 | 3439 | ||
3440 | static int parse_common_pc(struct pevent *pevent, void *data) | 3440 | static int parse_common_pc(struct tep_handle *pevent, void *data) |
3441 | { | 3441 | { |
3442 | return __parse_common(pevent, data, | 3442 | return __parse_common(pevent, data, |
3443 | &pevent->pc_size, &pevent->pc_offset, | 3443 | &pevent->pc_size, &pevent->pc_offset, |
3444 | "common_preempt_count"); | 3444 | "common_preempt_count"); |
3445 | } | 3445 | } |
3446 | 3446 | ||
3447 | static int parse_common_flags(struct pevent *pevent, void *data) | 3447 | static int parse_common_flags(struct tep_handle *pevent, void *data) |
3448 | { | 3448 | { |
3449 | return __parse_common(pevent, data, | 3449 | return __parse_common(pevent, data, |
3450 | &pevent->flags_size, &pevent->flags_offset, | 3450 | &pevent->flags_size, &pevent->flags_offset, |
3451 | "common_flags"); | 3451 | "common_flags"); |
3452 | } | 3452 | } |
3453 | 3453 | ||
3454 | static int parse_common_lock_depth(struct pevent *pevent, void *data) | 3454 | static int parse_common_lock_depth(struct tep_handle *pevent, void *data) |
3455 | { | 3455 | { |
3456 | return __parse_common(pevent, data, | 3456 | return __parse_common(pevent, data, |
3457 | &pevent->ld_size, &pevent->ld_offset, | 3457 | &pevent->ld_size, &pevent->ld_offset, |
3458 | "common_lock_depth"); | 3458 | "common_lock_depth"); |
3459 | } | 3459 | } |
3460 | 3460 | ||
3461 | static int parse_common_migrate_disable(struct pevent *pevent, void *data) | 3461 | static int parse_common_migrate_disable(struct tep_handle *pevent, void *data) |
3462 | { | 3462 | { |
3463 | return __parse_common(pevent, data, | 3463 | return __parse_common(pevent, data, |
3464 | &pevent->ld_size, &pevent->ld_offset, | 3464 | &pevent->ld_size, &pevent->ld_offset, |
@@ -3474,7 +3474,7 @@ static int events_id_cmp(const void *a, const void *b); | |||
3474 | * | 3474 | * |
3475 | * Returns an event that has a given @id. | 3475 | * Returns an event that has a given @id. |
3476 | */ | 3476 | */ |
3477 | struct event_format *pevent_find_event(struct pevent *pevent, int id) | 3477 | struct event_format *pevent_find_event(struct tep_handle *pevent, int id) |
3478 | { | 3478 | { |
3479 | struct event_format **eventptr; | 3479 | struct event_format **eventptr; |
3480 | struct event_format key; | 3480 | struct event_format key; |
@@ -3507,7 +3507,7 @@ struct event_format *pevent_find_event(struct pevent *pevent, int id) | |||
3507 | * @sys. If @sys is NULL the first event with @name is returned. | 3507 | * @sys. If @sys is NULL the first event with @name is returned. |
3508 | */ | 3508 | */ |
3509 | struct event_format * | 3509 | struct event_format * |
3510 | pevent_find_event_by_name(struct pevent *pevent, | 3510 | pevent_find_event_by_name(struct tep_handle *pevent, |
3511 | const char *sys, const char *name) | 3511 | const char *sys, const char *name) |
3512 | { | 3512 | { |
3513 | struct event_format *event; | 3513 | struct event_format *event; |
@@ -3537,7 +3537,7 @@ pevent_find_event_by_name(struct pevent *pevent, | |||
3537 | static unsigned long long | 3537 | static unsigned long long |
3538 | eval_num_arg(void *data, int size, struct event_format *event, struct print_arg *arg) | 3538 | eval_num_arg(void *data, int size, struct event_format *event, struct print_arg *arg) |
3539 | { | 3539 | { |
3540 | struct pevent *pevent = event->pevent; | 3540 | struct tep_handle *pevent = event->pevent; |
3541 | unsigned long long val = 0; | 3541 | unsigned long long val = 0; |
3542 | unsigned long long left, right; | 3542 | unsigned long long left, right; |
3543 | struct print_arg *typearg = NULL; | 3543 | struct print_arg *typearg = NULL; |
@@ -3820,7 +3820,7 @@ static void print_str_to_seq(struct trace_seq *s, const char *format, | |||
3820 | trace_seq_printf(s, format, str); | 3820 | trace_seq_printf(s, format, str); |
3821 | } | 3821 | } |
3822 | 3822 | ||
3823 | static void print_bitmask_to_seq(struct pevent *pevent, | 3823 | static void print_bitmask_to_seq(struct tep_handle *pevent, |
3824 | struct trace_seq *s, const char *format, | 3824 | struct trace_seq *s, const char *format, |
3825 | int len_arg, const void *data, int size) | 3825 | int len_arg, const void *data, int size) |
3826 | { | 3826 | { |
@@ -3878,7 +3878,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, | |||
3878 | struct event_format *event, const char *format, | 3878 | struct event_format *event, const char *format, |
3879 | int len_arg, struct print_arg *arg) | 3879 | int len_arg, struct print_arg *arg) |
3880 | { | 3880 | { |
3881 | struct pevent *pevent = event->pevent; | 3881 | struct tep_handle *pevent = event->pevent; |
3882 | struct print_flag_sym *flag; | 3882 | struct print_flag_sym *flag; |
3883 | struct format_field *field; | 3883 | struct format_field *field; |
3884 | struct printk_map *printk; | 3884 | struct printk_map *printk; |
@@ -4227,7 +4227,7 @@ static void free_args(struct print_arg *args) | |||
4227 | 4227 | ||
4228 | static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct event_format *event) | 4228 | static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct event_format *event) |
4229 | { | 4229 | { |
4230 | struct pevent *pevent = event->pevent; | 4230 | struct tep_handle *pevent = event->pevent; |
4231 | struct format_field *field, *ip_field; | 4231 | struct format_field *field, *ip_field; |
4232 | struct print_arg *args, *arg, **next; | 4232 | struct print_arg *args, *arg, **next; |
4233 | unsigned long long ip, val; | 4233 | unsigned long long ip, val; |
@@ -4404,7 +4404,7 @@ static char * | |||
4404 | get_bprint_format(void *data, int size __maybe_unused, | 4404 | get_bprint_format(void *data, int size __maybe_unused, |
4405 | struct event_format *event) | 4405 | struct event_format *event) |
4406 | { | 4406 | { |
4407 | struct pevent *pevent = event->pevent; | 4407 | struct tep_handle *pevent = event->pevent; |
4408 | unsigned long long addr; | 4408 | unsigned long long addr; |
4409 | struct format_field *field; | 4409 | struct format_field *field; |
4410 | struct printk_map *printk; | 4410 | struct printk_map *printk; |
@@ -4805,7 +4805,7 @@ void pevent_print_field(struct trace_seq *s, void *data, | |||
4805 | { | 4805 | { |
4806 | unsigned long long val; | 4806 | unsigned long long val; |
4807 | unsigned int offset, len, i; | 4807 | unsigned int offset, len, i; |
4808 | struct pevent *pevent = field->event->pevent; | 4808 | struct tep_handle *pevent = field->event->pevent; |
4809 | 4809 | ||
4810 | if (field->flags & FIELD_IS_ARRAY) { | 4810 | if (field->flags & FIELD_IS_ARRAY) { |
4811 | offset = field->offset; | 4811 | offset = field->offset; |
@@ -4880,7 +4880,7 @@ void pevent_print_fields(struct trace_seq *s, void *data, | |||
4880 | 4880 | ||
4881 | static void pretty_print(struct trace_seq *s, void *data, int size, struct event_format *event) | 4881 | static void pretty_print(struct trace_seq *s, void *data, int size, struct event_format *event) |
4882 | { | 4882 | { |
4883 | struct pevent *pevent = event->pevent; | 4883 | struct tep_handle *pevent = event->pevent; |
4884 | struct print_fmt *print_fmt = &event->print_fmt; | 4884 | struct print_fmt *print_fmt = &event->print_fmt; |
4885 | struct print_arg *arg = print_fmt->args; | 4885 | struct print_arg *arg = print_fmt->args; |
4886 | struct print_arg *args = NULL; | 4886 | struct print_arg *args = NULL; |
@@ -5149,7 +5149,7 @@ out_failed: | |||
5149 | * need rescheduling, in hard/soft interrupt, preempt count | 5149 | * need rescheduling, in hard/soft interrupt, preempt count |
5150 | * and lock depth) and places it into the trace_seq. | 5150 | * and lock depth) and places it into the trace_seq. |
5151 | */ | 5151 | */ |
5152 | void pevent_data_lat_fmt(struct pevent *pevent, | 5152 | void pevent_data_lat_fmt(struct tep_handle *pevent, |
5153 | struct trace_seq *s, struct pevent_record *record) | 5153 | struct trace_seq *s, struct pevent_record *record) |
5154 | { | 5154 | { |
5155 | static int check_lock_depth = 1; | 5155 | static int check_lock_depth = 1; |
@@ -5229,7 +5229,7 @@ void pevent_data_lat_fmt(struct pevent *pevent, | |||
5229 | * | 5229 | * |
5230 | * This returns the event id from the @rec. | 5230 | * This returns the event id from the @rec. |
5231 | */ | 5231 | */ |
5232 | int pevent_data_type(struct pevent *pevent, struct pevent_record *rec) | 5232 | int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec) |
5233 | { | 5233 | { |
5234 | return trace_parse_common_type(pevent, rec->data); | 5234 | return trace_parse_common_type(pevent, rec->data); |
5235 | } | 5235 | } |
@@ -5241,7 +5241,7 @@ int pevent_data_type(struct pevent *pevent, struct pevent_record *rec) | |||
5241 | * | 5241 | * |
5242 | * This returns the event form a given @type; | 5242 | * This returns the event form a given @type; |
5243 | */ | 5243 | */ |
5244 | struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type) | 5244 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type) |
5245 | { | 5245 | { |
5246 | return pevent_find_event(pevent, type); | 5246 | return pevent_find_event(pevent, type); |
5247 | } | 5247 | } |
@@ -5253,7 +5253,7 @@ struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type | |||
5253 | * | 5253 | * |
5254 | * This returns the PID from a record. | 5254 | * This returns the PID from a record. |
5255 | */ | 5255 | */ |
5256 | int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec) | 5256 | int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec) |
5257 | { | 5257 | { |
5258 | return parse_common_pid(pevent, rec->data); | 5258 | return parse_common_pid(pevent, rec->data); |
5259 | } | 5259 | } |
@@ -5265,7 +5265,7 @@ int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec) | |||
5265 | * | 5265 | * |
5266 | * This returns the preempt count from a record. | 5266 | * This returns the preempt count from a record. |
5267 | */ | 5267 | */ |
5268 | int pevent_data_preempt_count(struct pevent *pevent, struct pevent_record *rec) | 5268 | int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec) |
5269 | { | 5269 | { |
5270 | return parse_common_pc(pevent, rec->data); | 5270 | return parse_common_pc(pevent, rec->data); |
5271 | } | 5271 | } |
@@ -5279,7 +5279,7 @@ int pevent_data_preempt_count(struct pevent *pevent, struct pevent_record *rec) | |||
5279 | * | 5279 | * |
5280 | * Use trace_flag_type enum for the flags (see event-parse.h). | 5280 | * Use trace_flag_type enum for the flags (see event-parse.h). |
5281 | */ | 5281 | */ |
5282 | int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec) | 5282 | int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec) |
5283 | { | 5283 | { |
5284 | return parse_common_flags(pevent, rec->data); | 5284 | return parse_common_flags(pevent, rec->data); |
5285 | } | 5285 | } |
@@ -5292,7 +5292,7 @@ int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec) | |||
5292 | * This returns a pointer to the command line that has the given | 5292 | * This returns a pointer to the command line that has the given |
5293 | * @pid. | 5293 | * @pid. |
5294 | */ | 5294 | */ |
5295 | const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid) | 5295 | const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid) |
5296 | { | 5296 | { |
5297 | const char *comm; | 5297 | const char *comm; |
5298 | 5298 | ||
@@ -5301,7 +5301,7 @@ const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid) | |||
5301 | } | 5301 | } |
5302 | 5302 | ||
5303 | static struct cmdline * | 5303 | static struct cmdline * |
5304 | pid_from_cmdlist(struct pevent *pevent, const char *comm, struct cmdline *next) | 5304 | pid_from_cmdlist(struct tep_handle *pevent, const char *comm, struct cmdline *next) |
5305 | { | 5305 | { |
5306 | struct cmdline_list *cmdlist = (struct cmdline_list *)next; | 5306 | struct cmdline_list *cmdlist = (struct cmdline_list *)next; |
5307 | 5307 | ||
@@ -5329,7 +5329,7 @@ pid_from_cmdlist(struct pevent *pevent, const char *comm, struct cmdline *next) | |||
5329 | * next pid. | 5329 | * next pid. |
5330 | * Also, it does a linear seach, so it may be slow. | 5330 | * Also, it does a linear seach, so it may be slow. |
5331 | */ | 5331 | */ |
5332 | struct cmdline *pevent_data_pid_from_comm(struct pevent *pevent, const char *comm, | 5332 | struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm, |
5333 | struct cmdline *next) | 5333 | struct cmdline *next) |
5334 | { | 5334 | { |
5335 | struct cmdline *cmdline; | 5335 | struct cmdline *cmdline; |
@@ -5371,7 +5371,7 @@ struct cmdline *pevent_data_pid_from_comm(struct pevent *pevent, const char *com | |||
5371 | * Returns the pid for a give cmdline. If @cmdline is NULL, then | 5371 | * Returns the pid for a give cmdline. If @cmdline is NULL, then |
5372 | * -1 is returned. | 5372 | * -1 is returned. |
5373 | */ | 5373 | */ |
5374 | int pevent_cmdline_pid(struct pevent *pevent, struct cmdline *cmdline) | 5374 | int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline) |
5375 | { | 5375 | { |
5376 | struct cmdline_list *cmdlist = (struct cmdline_list *)cmdline; | 5376 | struct cmdline_list *cmdlist = (struct cmdline_list *)cmdline; |
5377 | 5377 | ||
@@ -5441,7 +5441,7 @@ static bool is_timestamp_in_us(char *trace_clock, bool use_trace_clock) | |||
5441 | * is found. | 5441 | * is found. |
5442 | */ | 5442 | */ |
5443 | struct event_format * | 5443 | struct event_format * |
5444 | pevent_find_event_by_record(struct pevent *pevent, struct pevent_record *record) | 5444 | pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *record) |
5445 | { | 5445 | { |
5446 | int type; | 5446 | int type; |
5447 | 5447 | ||
@@ -5464,7 +5464,7 @@ pevent_find_event_by_record(struct pevent *pevent, struct pevent_record *record) | |||
5464 | * | 5464 | * |
5465 | * Writes the tasks comm, pid and CPU to @s. | 5465 | * Writes the tasks comm, pid and CPU to @s. |
5466 | */ | 5466 | */ |
5467 | void pevent_print_event_task(struct pevent *pevent, struct trace_seq *s, | 5467 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
5468 | struct event_format *event, | 5468 | struct event_format *event, |
5469 | struct pevent_record *record) | 5469 | struct pevent_record *record) |
5470 | { | 5470 | { |
@@ -5492,7 +5492,7 @@ void pevent_print_event_task(struct pevent *pevent, struct trace_seq *s, | |||
5492 | * | 5492 | * |
5493 | * Writes the timestamp of the record into @s. | 5493 | * Writes the timestamp of the record into @s. |
5494 | */ | 5494 | */ |
5495 | void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s, | 5495 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
5496 | struct event_format *event, | 5496 | struct event_format *event, |
5497 | struct pevent_record *record, | 5497 | struct pevent_record *record, |
5498 | bool use_trace_clock) | 5498 | bool use_trace_clock) |
@@ -5542,7 +5542,7 @@ void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s, | |||
5542 | * | 5542 | * |
5543 | * Writes the parsing of the record's data to @s. | 5543 | * Writes the parsing of the record's data to @s. |
5544 | */ | 5544 | */ |
5545 | void pevent_print_event_data(struct pevent *pevent, struct trace_seq *s, | 5545 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
5546 | struct event_format *event, | 5546 | struct event_format *event, |
5547 | struct pevent_record *record) | 5547 | struct pevent_record *record) |
5548 | { | 5548 | { |
@@ -5559,7 +5559,7 @@ void pevent_print_event_data(struct pevent *pevent, struct trace_seq *s, | |||
5559 | pevent_event_info(s, event, record); | 5559 | pevent_event_info(s, event, record); |
5560 | } | 5560 | } |
5561 | 5561 | ||
5562 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | 5562 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, |
5563 | struct pevent_record *record, bool use_trace_clock) | 5563 | struct pevent_record *record, bool use_trace_clock) |
5564 | { | 5564 | { |
5565 | struct event_format *event; | 5565 | struct event_format *event; |
@@ -5630,7 +5630,7 @@ static int events_system_cmp(const void *a, const void *b) | |||
5630 | return events_id_cmp(a, b); | 5630 | return events_id_cmp(a, b); |
5631 | } | 5631 | } |
5632 | 5632 | ||
5633 | struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type sort_type) | 5633 | struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_sort_type sort_type) |
5634 | { | 5634 | { |
5635 | struct event_format **events; | 5635 | struct event_format **events; |
5636 | int (*sort)(const void *a, const void *b); | 5636 | int (*sort)(const void *a, const void *b); |
@@ -5941,7 +5941,7 @@ static void parse_header_field(const char *field, | |||
5941 | * | 5941 | * |
5942 | * /sys/kernel/debug/tracing/events/header_page | 5942 | * /sys/kernel/debug/tracing/events/header_page |
5943 | */ | 5943 | */ |
5944 | int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size, | 5944 | int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, |
5945 | int long_size) | 5945 | int long_size) |
5946 | { | 5946 | { |
5947 | int ignore; | 5947 | int ignore; |
@@ -5994,7 +5994,7 @@ static void free_handler(struct event_handler *handle) | |||
5994 | free(handle); | 5994 | free(handle); |
5995 | } | 5995 | } |
5996 | 5996 | ||
5997 | static int find_event_handle(struct pevent *pevent, struct event_format *event) | 5997 | static int find_event_handle(struct tep_handle *pevent, struct event_format *event) |
5998 | { | 5998 | { |
5999 | struct event_handler *handle, **next; | 5999 | struct event_handler *handle, **next; |
6000 | 6000 | ||
@@ -6036,7 +6036,7 @@ static int find_event_handle(struct pevent *pevent, struct event_format *event) | |||
6036 | * /sys/kernel/debug/tracing/events/.../.../format | 6036 | * /sys/kernel/debug/tracing/events/.../.../format |
6037 | */ | 6037 | */ |
6038 | enum pevent_errno __pevent_parse_format(struct event_format **eventp, | 6038 | enum pevent_errno __pevent_parse_format(struct event_format **eventp, |
6039 | struct pevent *pevent, const char *buf, | 6039 | struct tep_handle *pevent, const char *buf, |
6040 | unsigned long size, const char *sys) | 6040 | unsigned long size, const char *sys) |
6041 | { | 6041 | { |
6042 | struct event_format *event; | 6042 | struct event_format *event; |
@@ -6143,7 +6143,7 @@ enum pevent_errno __pevent_parse_format(struct event_format **eventp, | |||
6143 | } | 6143 | } |
6144 | 6144 | ||
6145 | static enum pevent_errno | 6145 | static enum pevent_errno |
6146 | __pevent_parse_event(struct pevent *pevent, | 6146 | __pevent_parse_event(struct tep_handle *pevent, |
6147 | struct event_format **eventp, | 6147 | struct event_format **eventp, |
6148 | const char *buf, unsigned long size, | 6148 | const char *buf, unsigned long size, |
6149 | const char *sys) | 6149 | const char *sys) |
@@ -6185,7 +6185,7 @@ event_add_failed: | |||
6185 | * | 6185 | * |
6186 | * /sys/kernel/debug/tracing/events/.../.../format | 6186 | * /sys/kernel/debug/tracing/events/.../.../format |
6187 | */ | 6187 | */ |
6188 | enum pevent_errno pevent_parse_format(struct pevent *pevent, | 6188 | enum pevent_errno pevent_parse_format(struct tep_handle *pevent, |
6189 | struct event_format **eventp, | 6189 | struct event_format **eventp, |
6190 | const char *buf, | 6190 | const char *buf, |
6191 | unsigned long size, const char *sys) | 6191 | unsigned long size, const char *sys) |
@@ -6207,7 +6207,7 @@ enum pevent_errno pevent_parse_format(struct pevent *pevent, | |||
6207 | * | 6207 | * |
6208 | * /sys/kernel/debug/tracing/events/.../.../format | 6208 | * /sys/kernel/debug/tracing/events/.../.../format |
6209 | */ | 6209 | */ |
6210 | enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf, | 6210 | enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, |
6211 | unsigned long size, const char *sys) | 6211 | unsigned long size, const char *sys) |
6212 | { | 6212 | { |
6213 | struct event_format *event = NULL; | 6213 | struct event_format *event = NULL; |
@@ -6221,7 +6221,7 @@ static const char * const pevent_error_str[] = { | |||
6221 | }; | 6221 | }; |
6222 | #undef _PE | 6222 | #undef _PE |
6223 | 6223 | ||
6224 | int pevent_strerror(struct pevent *pevent __maybe_unused, | 6224 | int pevent_strerror(struct tep_handle *pevent __maybe_unused, |
6225 | enum pevent_errno errnum, char *buf, size_t buflen) | 6225 | enum pevent_errno errnum, char *buf, size_t buflen) |
6226 | { | 6226 | { |
6227 | int idx; | 6227 | int idx; |
@@ -6435,7 +6435,7 @@ int pevent_print_func_field(struct trace_seq *s, const char *fmt, | |||
6435 | struct pevent_record *record, int err) | 6435 | struct pevent_record *record, int err) |
6436 | { | 6436 | { |
6437 | struct format_field *field = pevent_find_field(event, name); | 6437 | struct format_field *field = pevent_find_field(event, name); |
6438 | struct pevent *pevent = event->pevent; | 6438 | struct tep_handle *pevent = event->pevent; |
6439 | unsigned long long val; | 6439 | unsigned long long val; |
6440 | struct func_map *func; | 6440 | struct func_map *func; |
6441 | char tmp[128]; | 6441 | char tmp[128]; |
@@ -6491,7 +6491,7 @@ static void free_func_handle(struct pevent_function_handler *func) | |||
6491 | * The @parameters is a variable list of pevent_func_arg_type enums that | 6491 | * The @parameters is a variable list of pevent_func_arg_type enums that |
6492 | * must end with PEVENT_FUNC_ARG_VOID. | 6492 | * must end with PEVENT_FUNC_ARG_VOID. |
6493 | */ | 6493 | */ |
6494 | int pevent_register_print_function(struct pevent *pevent, | 6494 | int pevent_register_print_function(struct tep_handle *pevent, |
6495 | pevent_func_handler func, | 6495 | pevent_func_handler func, |
6496 | enum pevent_func_arg_type ret_type, | 6496 | enum pevent_func_arg_type ret_type, |
6497 | char *name, ...) | 6497 | char *name, ...) |
@@ -6578,7 +6578,7 @@ int pevent_register_print_function(struct pevent *pevent, | |||
6578 | * | 6578 | * |
6579 | * Returns 0 if the handler was removed successully, -1 otherwise. | 6579 | * Returns 0 if the handler was removed successully, -1 otherwise. |
6580 | */ | 6580 | */ |
6581 | int pevent_unregister_print_function(struct pevent *pevent, | 6581 | int pevent_unregister_print_function(struct tep_handle *pevent, |
6582 | pevent_func_handler func, char *name) | 6582 | pevent_func_handler func, char *name) |
6583 | { | 6583 | { |
6584 | struct pevent_function_handler *func_handle; | 6584 | struct pevent_function_handler *func_handle; |
@@ -6591,7 +6591,7 @@ int pevent_unregister_print_function(struct pevent *pevent, | |||
6591 | return -1; | 6591 | return -1; |
6592 | } | 6592 | } |
6593 | 6593 | ||
6594 | static struct event_format *pevent_search_event(struct pevent *pevent, int id, | 6594 | static struct event_format *pevent_search_event(struct tep_handle *pevent, int id, |
6595 | const char *sys_name, | 6595 | const char *sys_name, |
6596 | const char *event_name) | 6596 | const char *event_name) |
6597 | { | 6597 | { |
@@ -6631,7 +6631,7 @@ static struct event_format *pevent_search_event(struct pevent *pevent, int id, | |||
6631 | * If @id is >= 0, then it is used to find the event. | 6631 | * If @id is >= 0, then it is used to find the event. |
6632 | * else @sys_name and @event_name are used. | 6632 | * else @sys_name and @event_name are used. |
6633 | */ | 6633 | */ |
6634 | int pevent_register_event_handler(struct pevent *pevent, int id, | 6634 | int pevent_register_event_handler(struct tep_handle *pevent, int id, |
6635 | const char *sys_name, const char *event_name, | 6635 | const char *sys_name, const char *event_name, |
6636 | pevent_event_handler_func func, void *context) | 6636 | pevent_event_handler_func func, void *context) |
6637 | { | 6637 | { |
@@ -6715,7 +6715,7 @@ static int handle_matches(struct event_handler *handler, int id, | |||
6715 | * | 6715 | * |
6716 | * Returns 0 if handler was removed successfully, -1 if event was not found. | 6716 | * Returns 0 if handler was removed successfully, -1 if event was not found. |
6717 | */ | 6717 | */ |
6718 | int pevent_unregister_event_handler(struct pevent *pevent, int id, | 6718 | int pevent_unregister_event_handler(struct tep_handle *pevent, int id, |
6719 | const char *sys_name, const char *event_name, | 6719 | const char *sys_name, const char *event_name, |
6720 | pevent_event_handler_func func, void *context) | 6720 | pevent_event_handler_func func, void *context) |
6721 | { | 6721 | { |
@@ -6756,9 +6756,9 @@ not_found: | |||
6756 | /** | 6756 | /** |
6757 | * pevent_alloc - create a pevent handle | 6757 | * pevent_alloc - create a pevent handle |
6758 | */ | 6758 | */ |
6759 | struct pevent *pevent_alloc(void) | 6759 | struct tep_handle *pevent_alloc(void) |
6760 | { | 6760 | { |
6761 | struct pevent *pevent = calloc(1, sizeof(*pevent)); | 6761 | struct tep_handle *pevent = calloc(1, sizeof(*pevent)); |
6762 | 6762 | ||
6763 | if (pevent) | 6763 | if (pevent) |
6764 | pevent->ref_count = 1; | 6764 | pevent->ref_count = 1; |
@@ -6766,7 +6766,7 @@ struct pevent *pevent_alloc(void) | |||
6766 | return pevent; | 6766 | return pevent; |
6767 | } | 6767 | } |
6768 | 6768 | ||
6769 | void pevent_ref(struct pevent *pevent) | 6769 | void pevent_ref(struct tep_handle *pevent) |
6770 | { | 6770 | { |
6771 | pevent->ref_count++; | 6771 | pevent->ref_count++; |
6772 | } | 6772 | } |
@@ -6814,7 +6814,7 @@ void pevent_free_format(struct event_format *event) | |||
6814 | * pevent_free - free a pevent handle | 6814 | * pevent_free - free a pevent handle |
6815 | * @pevent: the pevent handle to free | 6815 | * @pevent: the pevent handle to free |
6816 | */ | 6816 | */ |
6817 | void pevent_free(struct pevent *pevent) | 6817 | void pevent_free(struct tep_handle *pevent) |
6818 | { | 6818 | { |
6819 | struct cmdline_list *cmdlist, *cmdnext; | 6819 | struct cmdline_list *cmdlist, *cmdnext; |
6820 | struct func_list *funclist, *funcnext; | 6820 | struct func_list *funclist, *funcnext; |
@@ -6899,7 +6899,7 @@ void pevent_free(struct pevent *pevent) | |||
6899 | free(pevent); | 6899 | free(pevent); |
6900 | } | 6900 | } |
6901 | 6901 | ||
6902 | void pevent_unref(struct pevent *pevent) | 6902 | void pevent_unref(struct tep_handle *pevent) |
6903 | { | 6903 | { |
6904 | pevent_free(pevent); | 6904 | pevent_free(pevent); |
6905 | } | 6905 | } |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 0c03538df74c..b7f4c8393abd 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -98,7 +98,7 @@ extern int trace_seq_do_printf(struct trace_seq *s); | |||
98 | 98 | ||
99 | /* ----------------------- pevent ----------------------- */ | 99 | /* ----------------------- pevent ----------------------- */ |
100 | 100 | ||
101 | struct pevent; | 101 | struct tep_handle; |
102 | struct event_format; | 102 | struct event_format; |
103 | 103 | ||
104 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, | 104 | typedef int (*pevent_event_handler_func)(struct trace_seq *s, |
@@ -106,8 +106,8 @@ typedef int (*pevent_event_handler_func)(struct trace_seq *s, | |||
106 | struct event_format *event, | 106 | struct event_format *event, |
107 | void *context); | 107 | void *context); |
108 | 108 | ||
109 | typedef int (*pevent_plugin_load_func)(struct pevent *pevent); | 109 | typedef int (*pevent_plugin_load_func)(struct tep_handle *pevent); |
110 | typedef int (*pevent_plugin_unload_func)(struct pevent *pevent); | 110 | typedef int (*pevent_plugin_unload_func)(struct tep_handle *pevent); |
111 | 111 | ||
112 | struct pevent_plugin_option { | 112 | struct pevent_plugin_option { |
113 | struct pevent_plugin_option *next; | 113 | struct pevent_plugin_option *next; |
@@ -127,12 +127,12 @@ struct pevent_plugin_option { | |||
127 | * PEVENT_PLUGIN_LOADER: (required) | 127 | * PEVENT_PLUGIN_LOADER: (required) |
128 | * The function name to initialized the plugin. | 128 | * The function name to initialized the plugin. |
129 | * | 129 | * |
130 | * int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 130 | * int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
131 | * | 131 | * |
132 | * PEVENT_PLUGIN_UNLOADER: (optional) | 132 | * PEVENT_PLUGIN_UNLOADER: (optional) |
133 | * The function called just before unloading | 133 | * The function called just before unloading |
134 | * | 134 | * |
135 | * int PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 135 | * int PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
136 | * | 136 | * |
137 | * PEVENT_PLUGIN_OPTIONS: (optional) | 137 | * PEVENT_PLUGIN_OPTIONS: (optional) |
138 | * Plugin options that can be set before loading | 138 | * Plugin options that can be set before loading |
@@ -320,7 +320,7 @@ struct print_fmt { | |||
320 | }; | 320 | }; |
321 | 321 | ||
322 | struct event_format { | 322 | struct event_format { |
323 | struct pevent *pevent; | 323 | struct tep_handle *pevent; |
324 | char *name; | 324 | char *name; |
325 | int id; | 325 | int id; |
326 | int flags; | 326 | int flags; |
@@ -435,9 +435,9 @@ struct plugin_list; | |||
435 | 435 | ||
436 | #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) | 436 | #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) |
437 | 437 | ||
438 | struct plugin_list *traceevent_load_plugins(struct pevent *pevent); | 438 | struct plugin_list *traceevent_load_plugins(struct tep_handle *pevent); |
439 | void traceevent_unload_plugins(struct plugin_list *plugin_list, | 439 | void traceevent_unload_plugins(struct plugin_list *plugin_list, |
440 | struct pevent *pevent); | 440 | struct tep_handle *pevent); |
441 | char **traceevent_plugin_list_options(void); | 441 | char **traceevent_plugin_list_options(void); |
442 | void traceevent_plugin_free_options_list(char **list); | 442 | void traceevent_plugin_free_options_list(char **list); |
443 | int traceevent_plugin_add_options(const char *name, | 443 | int traceevent_plugin_add_options(const char *name, |
@@ -457,7 +457,7 @@ struct func_resolver; | |||
457 | typedef char *(pevent_func_resolver_t)(void *priv, | 457 | typedef char *(pevent_func_resolver_t)(void *priv, |
458 | unsigned long long *addrp, char **modp); | 458 | unsigned long long *addrp, char **modp); |
459 | 459 | ||
460 | struct pevent { | 460 | struct tep_handle { |
461 | int ref_count; | 461 | int ref_count; |
462 | 462 | ||
463 | int header_page_ts_offset; | 463 | int header_page_ts_offset; |
@@ -532,13 +532,13 @@ struct pevent { | |||
532 | char *trace_clock; | 532 | char *trace_clock; |
533 | }; | 533 | }; |
534 | 534 | ||
535 | static inline void pevent_set_flag(struct pevent *pevent, int flag) | 535 | static inline void pevent_set_flag(struct tep_handle *pevent, int flag) |
536 | { | 536 | { |
537 | pevent->flags |= flag; | 537 | pevent->flags |= flag; |
538 | } | 538 | } |
539 | 539 | ||
540 | static inline unsigned short | 540 | static inline unsigned short |
541 | __data2host2(struct pevent *pevent, unsigned short data) | 541 | __data2host2(struct tep_handle *pevent, unsigned short data) |
542 | { | 542 | { |
543 | unsigned short swap; | 543 | unsigned short swap; |
544 | 544 | ||
@@ -552,7 +552,7 @@ __data2host2(struct pevent *pevent, unsigned short data) | |||
552 | } | 552 | } |
553 | 553 | ||
554 | static inline unsigned int | 554 | static inline unsigned int |
555 | __data2host4(struct pevent *pevent, unsigned int data) | 555 | __data2host4(struct tep_handle *pevent, unsigned int data) |
556 | { | 556 | { |
557 | unsigned int swap; | 557 | unsigned int swap; |
558 | 558 | ||
@@ -568,7 +568,7 @@ __data2host4(struct pevent *pevent, unsigned int data) | |||
568 | } | 568 | } |
569 | 569 | ||
570 | static inline unsigned long long | 570 | static inline unsigned long long |
571 | __data2host8(struct pevent *pevent, unsigned long long data) | 571 | __data2host8(struct tep_handle *pevent, unsigned long long data) |
572 | { | 572 | { |
573 | unsigned long long swap; | 573 | unsigned long long swap; |
574 | 574 | ||
@@ -615,36 +615,36 @@ enum trace_flag_type { | |||
615 | TRACE_FLAG_SOFTIRQ = 0x10, | 615 | TRACE_FLAG_SOFTIRQ = 0x10, |
616 | }; | 616 | }; |
617 | 617 | ||
618 | int pevent_set_function_resolver(struct pevent *pevent, | 618 | int pevent_set_function_resolver(struct tep_handle *pevent, |
619 | pevent_func_resolver_t *func, void *priv); | 619 | pevent_func_resolver_t *func, void *priv); |
620 | void pevent_reset_function_resolver(struct pevent *pevent); | 620 | void pevent_reset_function_resolver(struct tep_handle *pevent); |
621 | int pevent_register_comm(struct pevent *pevent, const char *comm, int pid); | 621 | int pevent_register_comm(struct tep_handle *pevent, const char *comm, int pid); |
622 | int pevent_register_trace_clock(struct pevent *pevent, const char *trace_clock); | 622 | int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock); |
623 | int pevent_register_function(struct pevent *pevent, char *name, | 623 | int pevent_register_function(struct tep_handle *pevent, char *name, |
624 | unsigned long long addr, char *mod); | 624 | unsigned long long addr, char *mod); |
625 | int pevent_register_print_string(struct pevent *pevent, const char *fmt, | 625 | int pevent_register_print_string(struct tep_handle *pevent, const char *fmt, |
626 | unsigned long long addr); | 626 | unsigned long long addr); |
627 | int pevent_pid_is_registered(struct pevent *pevent, int pid); | 627 | int pevent_pid_is_registered(struct tep_handle *pevent, int pid); |
628 | 628 | ||
629 | void pevent_print_event_task(struct pevent *pevent, struct trace_seq *s, | 629 | void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s, |
630 | struct event_format *event, | 630 | struct event_format *event, |
631 | struct pevent_record *record); | 631 | struct pevent_record *record); |
632 | void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s, | 632 | void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s, |
633 | struct event_format *event, | 633 | struct event_format *event, |
634 | struct pevent_record *record, | 634 | struct pevent_record *record, |
635 | bool use_trace_clock); | 635 | bool use_trace_clock); |
636 | void pevent_print_event_data(struct pevent *pevent, struct trace_seq *s, | 636 | void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, |
637 | struct event_format *event, | 637 | struct event_format *event, |
638 | struct pevent_record *record); | 638 | struct pevent_record *record); |
639 | void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | 639 | void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, |
640 | struct pevent_record *record, bool use_trace_clock); | 640 | struct pevent_record *record, bool use_trace_clock); |
641 | 641 | ||
642 | int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size, | 642 | int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, |
643 | int long_size); | 643 | int long_size); |
644 | 644 | ||
645 | enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf, | 645 | enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, |
646 | unsigned long size, const char *sys); | 646 | unsigned long size, const char *sys); |
647 | enum pevent_errno pevent_parse_format(struct pevent *pevent, | 647 | enum pevent_errno pevent_parse_format(struct tep_handle *pevent, |
648 | struct event_format **eventp, | 648 | struct event_format **eventp, |
649 | const char *buf, | 649 | const char *buf, |
650 | unsigned long size, const char *sys); | 650 | unsigned long size, const char *sys); |
@@ -673,50 +673,50 @@ int pevent_print_func_field(struct trace_seq *s, const char *fmt, | |||
673 | struct event_format *event, const char *name, | 673 | struct event_format *event, const char *name, |
674 | struct pevent_record *record, int err); | 674 | struct pevent_record *record, int err); |
675 | 675 | ||
676 | int pevent_register_event_handler(struct pevent *pevent, int id, | 676 | int pevent_register_event_handler(struct tep_handle *pevent, int id, |
677 | const char *sys_name, const char *event_name, | 677 | const char *sys_name, const char *event_name, |
678 | pevent_event_handler_func func, void *context); | 678 | pevent_event_handler_func func, void *context); |
679 | int pevent_unregister_event_handler(struct pevent *pevent, int id, | 679 | int pevent_unregister_event_handler(struct tep_handle *pevent, int id, |
680 | const char *sys_name, const char *event_name, | 680 | const char *sys_name, const char *event_name, |
681 | pevent_event_handler_func func, void *context); | 681 | pevent_event_handler_func func, void *context); |
682 | int pevent_register_print_function(struct pevent *pevent, | 682 | int pevent_register_print_function(struct tep_handle *pevent, |
683 | pevent_func_handler func, | 683 | pevent_func_handler func, |
684 | enum pevent_func_arg_type ret_type, | 684 | enum pevent_func_arg_type ret_type, |
685 | char *name, ...); | 685 | char *name, ...); |
686 | int pevent_unregister_print_function(struct pevent *pevent, | 686 | int pevent_unregister_print_function(struct tep_handle *pevent, |
687 | pevent_func_handler func, char *name); | 687 | pevent_func_handler func, char *name); |
688 | 688 | ||
689 | struct format_field *pevent_find_common_field(struct event_format *event, const char *name); | 689 | struct format_field *pevent_find_common_field(struct event_format *event, const char *name); |
690 | struct format_field *pevent_find_field(struct event_format *event, const char *name); | 690 | struct format_field *pevent_find_field(struct event_format *event, const char *name); |
691 | struct format_field *pevent_find_any_field(struct event_format *event, const char *name); | 691 | struct format_field *pevent_find_any_field(struct event_format *event, const char *name); |
692 | 692 | ||
693 | const char *pevent_find_function(struct pevent *pevent, unsigned long long addr); | 693 | const char *pevent_find_function(struct tep_handle *pevent, unsigned long long addr); |
694 | unsigned long long | 694 | unsigned long long |
695 | pevent_find_function_address(struct pevent *pevent, unsigned long long addr); | 695 | pevent_find_function_address(struct tep_handle *pevent, unsigned long long addr); |
696 | unsigned long long pevent_read_number(struct pevent *pevent, const void *ptr, int size); | 696 | unsigned long long pevent_read_number(struct tep_handle *pevent, const void *ptr, int size); |
697 | int pevent_read_number_field(struct format_field *field, const void *data, | 697 | int pevent_read_number_field(struct format_field *field, const void *data, |
698 | unsigned long long *value); | 698 | unsigned long long *value); |
699 | 699 | ||
700 | struct event_format *pevent_find_event(struct pevent *pevent, int id); | 700 | struct event_format *pevent_find_event(struct tep_handle *pevent, int id); |
701 | 701 | ||
702 | struct event_format * | 702 | struct event_format * |
703 | pevent_find_event_by_name(struct pevent *pevent, const char *sys, const char *name); | 703 | pevent_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name); |
704 | 704 | ||
705 | struct event_format * | 705 | struct event_format * |
706 | pevent_find_event_by_record(struct pevent *pevent, struct pevent_record *record); | 706 | pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *record); |
707 | 707 | ||
708 | void pevent_data_lat_fmt(struct pevent *pevent, | 708 | void pevent_data_lat_fmt(struct tep_handle *pevent, |
709 | struct trace_seq *s, struct pevent_record *record); | 709 | struct trace_seq *s, struct pevent_record *record); |
710 | int pevent_data_type(struct pevent *pevent, struct pevent_record *rec); | 710 | int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec); |
711 | struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type); | 711 | struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type); |
712 | int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec); | 712 | int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec); |
713 | int pevent_data_preempt_count(struct pevent *pevent, struct pevent_record *rec); | 713 | int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec); |
714 | int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec); | 714 | int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec); |
715 | const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid); | 715 | const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid); |
716 | struct cmdline; | 716 | struct cmdline; |
717 | struct cmdline *pevent_data_pid_from_comm(struct pevent *pevent, const char *comm, | 717 | struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm, |
718 | struct cmdline *next); | 718 | struct cmdline *next); |
719 | int pevent_cmdline_pid(struct pevent *pevent, struct cmdline *cmdline); | 719 | int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline); |
720 | 720 | ||
721 | void pevent_print_field(struct trace_seq *s, void *data, | 721 | void pevent_print_field(struct trace_seq *s, void *data, |
722 | struct format_field *field); | 722 | struct format_field *field); |
@@ -724,77 +724,77 @@ void pevent_print_fields(struct trace_seq *s, void *data, | |||
724 | int size __maybe_unused, struct event_format *event); | 724 | int size __maybe_unused, struct event_format *event); |
725 | void pevent_event_info(struct trace_seq *s, struct event_format *event, | 725 | void pevent_event_info(struct trace_seq *s, struct event_format *event, |
726 | struct pevent_record *record); | 726 | struct pevent_record *record); |
727 | int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, | 727 | int pevent_strerror(struct tep_handle *pevent, enum pevent_errno errnum, |
728 | char *buf, size_t buflen); | 728 | char *buf, size_t buflen); |
729 | 729 | ||
730 | struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type); | 730 | struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_sort_type); |
731 | struct format_field **pevent_event_common_fields(struct event_format *event); | 731 | struct format_field **pevent_event_common_fields(struct event_format *event); |
732 | struct format_field **pevent_event_fields(struct event_format *event); | 732 | struct format_field **pevent_event_fields(struct event_format *event); |
733 | 733 | ||
734 | static inline int pevent_get_cpus(struct pevent *pevent) | 734 | static inline int pevent_get_cpus(struct tep_handle *pevent) |
735 | { | 735 | { |
736 | return pevent->cpus; | 736 | return pevent->cpus; |
737 | } | 737 | } |
738 | 738 | ||
739 | static inline void pevent_set_cpus(struct pevent *pevent, int cpus) | 739 | static inline void pevent_set_cpus(struct tep_handle *pevent, int cpus) |
740 | { | 740 | { |
741 | pevent->cpus = cpus; | 741 | pevent->cpus = cpus; |
742 | } | 742 | } |
743 | 743 | ||
744 | static inline int pevent_get_long_size(struct pevent *pevent) | 744 | static inline int pevent_get_long_size(struct tep_handle *pevent) |
745 | { | 745 | { |
746 | return pevent->long_size; | 746 | return pevent->long_size; |
747 | } | 747 | } |
748 | 748 | ||
749 | static inline void pevent_set_long_size(struct pevent *pevent, int long_size) | 749 | static inline void pevent_set_long_size(struct tep_handle *pevent, int long_size) |
750 | { | 750 | { |
751 | pevent->long_size = long_size; | 751 | pevent->long_size = long_size; |
752 | } | 752 | } |
753 | 753 | ||
754 | static inline int pevent_get_page_size(struct pevent *pevent) | 754 | static inline int pevent_get_page_size(struct tep_handle *pevent) |
755 | { | 755 | { |
756 | return pevent->page_size; | 756 | return pevent->page_size; |
757 | } | 757 | } |
758 | 758 | ||
759 | static inline void pevent_set_page_size(struct pevent *pevent, int _page_size) | 759 | static inline void pevent_set_page_size(struct tep_handle *pevent, int _page_size) |
760 | { | 760 | { |
761 | pevent->page_size = _page_size; | 761 | pevent->page_size = _page_size; |
762 | } | 762 | } |
763 | 763 | ||
764 | static inline int pevent_is_file_bigendian(struct pevent *pevent) | 764 | static inline int pevent_is_file_bigendian(struct tep_handle *pevent) |
765 | { | 765 | { |
766 | return pevent->file_bigendian; | 766 | return pevent->file_bigendian; |
767 | } | 767 | } |
768 | 768 | ||
769 | static inline void pevent_set_file_bigendian(struct pevent *pevent, int endian) | 769 | static inline void pevent_set_file_bigendian(struct tep_handle *pevent, int endian) |
770 | { | 770 | { |
771 | pevent->file_bigendian = endian; | 771 | pevent->file_bigendian = endian; |
772 | } | 772 | } |
773 | 773 | ||
774 | static inline int pevent_is_host_bigendian(struct pevent *pevent) | 774 | static inline int pevent_is_host_bigendian(struct tep_handle *pevent) |
775 | { | 775 | { |
776 | return pevent->host_bigendian; | 776 | return pevent->host_bigendian; |
777 | } | 777 | } |
778 | 778 | ||
779 | static inline void pevent_set_host_bigendian(struct pevent *pevent, int endian) | 779 | static inline void pevent_set_host_bigendian(struct tep_handle *pevent, int endian) |
780 | { | 780 | { |
781 | pevent->host_bigendian = endian; | 781 | pevent->host_bigendian = endian; |
782 | } | 782 | } |
783 | 783 | ||
784 | static inline int pevent_is_latency_format(struct pevent *pevent) | 784 | static inline int pevent_is_latency_format(struct tep_handle *pevent) |
785 | { | 785 | { |
786 | return pevent->latency_format; | 786 | return pevent->latency_format; |
787 | } | 787 | } |
788 | 788 | ||
789 | static inline void pevent_set_latency_format(struct pevent *pevent, int lat) | 789 | static inline void pevent_set_latency_format(struct tep_handle *pevent, int lat) |
790 | { | 790 | { |
791 | pevent->latency_format = lat; | 791 | pevent->latency_format = lat; |
792 | } | 792 | } |
793 | 793 | ||
794 | struct pevent *pevent_alloc(void); | 794 | struct tep_handle *pevent_alloc(void); |
795 | void pevent_free(struct pevent *pevent); | 795 | void pevent_free(struct tep_handle *pevent); |
796 | void pevent_ref(struct pevent *pevent); | 796 | void pevent_ref(struct tep_handle *pevent); |
797 | void pevent_unref(struct pevent *pevent); | 797 | void pevent_unref(struct tep_handle *pevent); |
798 | 798 | ||
799 | /* access to the internal parser */ | 799 | /* access to the internal parser */ |
800 | void pevent_buffer_init(const char *buf, unsigned long long size); | 800 | void pevent_buffer_init(const char *buf, unsigned long long size); |
@@ -805,8 +805,8 @@ const char *pevent_get_input_buf(void); | |||
805 | unsigned long long pevent_get_input_buf_ptr(void); | 805 | unsigned long long pevent_get_input_buf_ptr(void); |
806 | 806 | ||
807 | /* for debugging */ | 807 | /* for debugging */ |
808 | void pevent_print_funcs(struct pevent *pevent); | 808 | void pevent_print_funcs(struct tep_handle *pevent); |
809 | void pevent_print_printk(struct pevent *pevent); | 809 | void pevent_print_printk(struct tep_handle *pevent); |
810 | 810 | ||
811 | /* ----------------------- filtering ----------------------- */ | 811 | /* ----------------------- filtering ----------------------- */ |
812 | 812 | ||
@@ -933,13 +933,13 @@ struct filter_type { | |||
933 | #define PEVENT_FILTER_ERROR_BUFSZ 1024 | 933 | #define PEVENT_FILTER_ERROR_BUFSZ 1024 |
934 | 934 | ||
935 | struct event_filter { | 935 | struct event_filter { |
936 | struct pevent *pevent; | 936 | struct tep_handle *pevent; |
937 | int filters; | 937 | int filters; |
938 | struct filter_type *event_filters; | 938 | struct filter_type *event_filters; |
939 | char error_buffer[PEVENT_FILTER_ERROR_BUFSZ]; | 939 | char error_buffer[PEVENT_FILTER_ERROR_BUFSZ]; |
940 | }; | 940 | }; |
941 | 941 | ||
942 | struct event_filter *pevent_filter_alloc(struct pevent *pevent); | 942 | struct event_filter *pevent_filter_alloc(struct tep_handle *pevent); |
943 | 943 | ||
944 | /* for backward compatibility */ | 944 | /* for backward compatibility */ |
945 | #define FILTER_NONE PEVENT_ERRNO__NO_FILTER | 945 | #define FILTER_NONE PEVENT_ERRNO__NO_FILTER |
diff --git a/tools/lib/traceevent/event-plugin.c b/tools/lib/traceevent/event-plugin.c index d542cb60ca1a..62b011ae18c1 100644 --- a/tools/lib/traceevent/event-plugin.c +++ b/tools/lib/traceevent/event-plugin.c | |||
@@ -281,7 +281,7 @@ void traceevent_print_plugins(struct trace_seq *s, | |||
281 | } | 281 | } |
282 | 282 | ||
283 | static void | 283 | static void |
284 | load_plugin(struct pevent *pevent, const char *path, | 284 | load_plugin(struct tep_handle *pevent, const char *path, |
285 | const char *file, void *data) | 285 | const char *file, void *data) |
286 | { | 286 | { |
287 | struct plugin_list **plugin_list = data; | 287 | struct plugin_list **plugin_list = data; |
@@ -336,9 +336,9 @@ load_plugin(struct pevent *pevent, const char *path, | |||
336 | } | 336 | } |
337 | 337 | ||
338 | static void | 338 | static void |
339 | load_plugins_dir(struct pevent *pevent, const char *suffix, | 339 | load_plugins_dir(struct tep_handle *pevent, const char *suffix, |
340 | const char *path, | 340 | const char *path, |
341 | void (*load_plugin)(struct pevent *pevent, | 341 | void (*load_plugin)(struct tep_handle *pevent, |
342 | const char *path, | 342 | const char *path, |
343 | const char *name, | 343 | const char *name, |
344 | void *data), | 344 | void *data), |
@@ -378,8 +378,8 @@ load_plugins_dir(struct pevent *pevent, const char *suffix, | |||
378 | } | 378 | } |
379 | 379 | ||
380 | static void | 380 | static void |
381 | load_plugins(struct pevent *pevent, const char *suffix, | 381 | load_plugins(struct tep_handle *pevent, const char *suffix, |
382 | void (*load_plugin)(struct pevent *pevent, | 382 | void (*load_plugin)(struct tep_handle *pevent, |
383 | const char *path, | 383 | const char *path, |
384 | const char *name, | 384 | const char *name, |
385 | void *data), | 385 | void *data), |
@@ -431,7 +431,7 @@ load_plugins(struct pevent *pevent, const char *suffix, | |||
431 | } | 431 | } |
432 | 432 | ||
433 | struct plugin_list* | 433 | struct plugin_list* |
434 | traceevent_load_plugins(struct pevent *pevent) | 434 | traceevent_load_plugins(struct tep_handle *pevent) |
435 | { | 435 | { |
436 | struct plugin_list *list = NULL; | 436 | struct plugin_list *list = NULL; |
437 | 437 | ||
@@ -440,7 +440,7 @@ traceevent_load_plugins(struct pevent *pevent) | |||
440 | } | 440 | } |
441 | 441 | ||
442 | void | 442 | void |
443 | traceevent_unload_plugins(struct plugin_list *plugin_list, struct pevent *pevent) | 443 | traceevent_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) |
444 | { | 444 | { |
445 | pevent_plugin_unload_func func; | 445 | pevent_plugin_unload_func func; |
446 | struct plugin_list *list; | 446 | struct plugin_list *list; |
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index 431e8b309f6e..a97b84aece3a 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -179,7 +179,7 @@ add_filter_type(struct event_filter *filter, int id) | |||
179 | * pevent_filter_alloc - create a new event filter | 179 | * pevent_filter_alloc - create a new event filter |
180 | * @pevent: The pevent that this filter is associated with | 180 | * @pevent: The pevent that this filter is associated with |
181 | */ | 181 | */ |
182 | struct event_filter *pevent_filter_alloc(struct pevent *pevent) | 182 | struct event_filter *pevent_filter_alloc(struct tep_handle *pevent) |
183 | { | 183 | { |
184 | struct event_filter *filter; | 184 | struct event_filter *filter; |
185 | 185 | ||
@@ -269,7 +269,7 @@ static int event_match(struct event_format *event, | |||
269 | } | 269 | } |
270 | 270 | ||
271 | static enum pevent_errno | 271 | static enum pevent_errno |
272 | find_event(struct pevent *pevent, struct event_list **events, | 272 | find_event(struct tep_handle *pevent, struct event_list **events, |
273 | char *sys_name, char *event_name) | 273 | char *sys_name, char *event_name) |
274 | { | 274 | { |
275 | struct event_format *event; | 275 | struct event_format *event; |
@@ -1270,7 +1270,7 @@ static void filter_init_error_buf(struct event_filter *filter) | |||
1270 | enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter, | 1270 | enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter, |
1271 | const char *filter_str) | 1271 | const char *filter_str) |
1272 | { | 1272 | { |
1273 | struct pevent *pevent = filter->pevent; | 1273 | struct tep_handle *pevent = filter->pevent; |
1274 | struct event_list *event; | 1274 | struct event_list *event; |
1275 | struct event_list *events = NULL; | 1275 | struct event_list *events = NULL; |
1276 | const char *filter_start; | 1276 | const char *filter_start; |
@@ -1550,8 +1550,8 @@ int pevent_filter_copy(struct event_filter *dest, struct event_filter *source) | |||
1550 | int pevent_update_trivial(struct event_filter *dest, struct event_filter *source, | 1550 | int pevent_update_trivial(struct event_filter *dest, struct event_filter *source, |
1551 | enum filter_trivial_type type) | 1551 | enum filter_trivial_type type) |
1552 | { | 1552 | { |
1553 | struct pevent *src_pevent; | 1553 | struct tep_handle *src_pevent; |
1554 | struct pevent *dest_pevent; | 1554 | struct tep_handle *dest_pevent; |
1555 | struct event_format *event; | 1555 | struct event_format *event; |
1556 | struct filter_type *filter_type; | 1556 | struct filter_type *filter_type; |
1557 | struct filter_arg *arg; | 1557 | struct filter_arg *arg; |
@@ -1874,7 +1874,7 @@ static int test_num(struct event_format *event, struct filter_arg *arg, | |||
1874 | static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record) | 1874 | static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record) |
1875 | { | 1875 | { |
1876 | struct event_format *event; | 1876 | struct event_format *event; |
1877 | struct pevent *pevent; | 1877 | struct tep_handle *pevent; |
1878 | unsigned long long addr; | 1878 | unsigned long long addr; |
1879 | const char *val = NULL; | 1879 | const char *val = NULL; |
1880 | unsigned int size; | 1880 | unsigned int size; |
@@ -2049,7 +2049,7 @@ int pevent_event_filtered(struct event_filter *filter, int event_id) | |||
2049 | enum pevent_errno pevent_filter_match(struct event_filter *filter, | 2049 | enum pevent_errno pevent_filter_match(struct event_filter *filter, |
2050 | struct pevent_record *record) | 2050 | struct pevent_record *record) |
2051 | { | 2051 | { |
2052 | struct pevent *pevent = filter->pevent; | 2052 | struct tep_handle *pevent = filter->pevent; |
2053 | struct filter_type *filter_type; | 2053 | struct filter_type *filter_type; |
2054 | int event_id; | 2054 | int event_id; |
2055 | int ret; | 2055 | int ret; |
diff --git a/tools/lib/traceevent/plugin_cfg80211.c b/tools/lib/traceevent/plugin_cfg80211.c index 8f8586912da7..959d94f1d7f5 100644 --- a/tools/lib/traceevent/plugin_cfg80211.c +++ b/tools/lib/traceevent/plugin_cfg80211.c | |||
@@ -25,7 +25,7 @@ process___le16_to_cpup(struct trace_seq *s, unsigned long long *args) | |||
25 | return val ? (long long) le16toh(*val) : 0; | 25 | return val ? (long long) le16toh(*val) : 0; |
26 | } | 26 | } |
27 | 27 | ||
28 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 28 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
29 | { | 29 | { |
30 | pevent_register_print_function(pevent, | 30 | pevent_register_print_function(pevent, |
31 | process___le16_to_cpup, | 31 | process___le16_to_cpup, |
@@ -36,7 +36,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 39 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
40 | { | 40 | { |
41 | pevent_unregister_print_function(pevent, process___le16_to_cpup, | 41 | pevent_unregister_print_function(pevent, process___le16_to_cpup, |
42 | "__le16_to_cpup"); | 42 | "__le16_to_cpup"); |
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugin_function.c index 42dbf73758f3..3ed965a8b5f0 100644 --- a/tools/lib/traceevent/plugin_function.c +++ b/tools/lib/traceevent/plugin_function.c | |||
@@ -125,7 +125,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu) | |||
125 | static int function_handler(struct trace_seq *s, struct pevent_record *record, | 125 | static int function_handler(struct trace_seq *s, struct pevent_record *record, |
126 | struct event_format *event, void *context) | 126 | struct event_format *event, void *context) |
127 | { | 127 | { |
128 | struct pevent *pevent = event->pevent; | 128 | struct tep_handle *pevent = event->pevent; |
129 | unsigned long long function; | 129 | unsigned long long function; |
130 | unsigned long long pfunction; | 130 | unsigned long long pfunction; |
131 | const char *func; | 131 | const char *func; |
@@ -163,7 +163,7 @@ static int function_handler(struct trace_seq *s, struct pevent_record *record, | |||
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
165 | 165 | ||
166 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 166 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
167 | { | 167 | { |
168 | pevent_register_event_handler(pevent, -1, "ftrace", "function", | 168 | pevent_register_event_handler(pevent, -1, "ftrace", "function", |
169 | function_handler, NULL); | 169 | function_handler, NULL); |
@@ -173,7 +173,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 176 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
177 | { | 177 | { |
178 | int i, x; | 178 | int i, x; |
179 | 179 | ||
diff --git a/tools/lib/traceevent/plugin_hrtimer.c b/tools/lib/traceevent/plugin_hrtimer.c index 12bf14cc1152..746e7d464802 100644 --- a/tools/lib/traceevent/plugin_hrtimer.c +++ b/tools/lib/traceevent/plugin_hrtimer.c | |||
@@ -66,7 +66,7 @@ static int timer_start_handler(struct trace_seq *s, | |||
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 69 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
70 | { | 70 | { |
71 | pevent_register_event_handler(pevent, -1, | 71 | pevent_register_event_handler(pevent, -1, |
72 | "timer", "hrtimer_expire_entry", | 72 | "timer", "hrtimer_expire_entry", |
@@ -77,7 +77,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
79 | 79 | ||
80 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 80 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
81 | { | 81 | { |
82 | pevent_unregister_event_handler(pevent, -1, | 82 | pevent_unregister_event_handler(pevent, -1, |
83 | "timer", "hrtimer_expire_entry", | 83 | "timer", "hrtimer_expire_entry", |
diff --git a/tools/lib/traceevent/plugin_jbd2.c b/tools/lib/traceevent/plugin_jbd2.c index 5c23d5bd27ce..3909db7043c9 100644 --- a/tools/lib/traceevent/plugin_jbd2.c +++ b/tools/lib/traceevent/plugin_jbd2.c | |||
@@ -47,7 +47,7 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args) | |||
47 | return jiffies; | 47 | return jiffies; |
48 | } | 48 | } |
49 | 49 | ||
50 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 50 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
51 | { | 51 | { |
52 | pevent_register_print_function(pevent, | 52 | pevent_register_print_function(pevent, |
53 | process_jbd2_dev_to_name, | 53 | process_jbd2_dev_to_name, |
@@ -65,7 +65,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 68 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
69 | { | 69 | { |
70 | pevent_unregister_print_function(pevent, process_jbd2_dev_to_name, | 70 | pevent_unregister_print_function(pevent, process_jbd2_dev_to_name, |
71 | "jbd2_dev_to_name"); | 71 | "jbd2_dev_to_name"); |
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugin_kmem.c index 70650ff48d78..e342edadf03d 100644 --- a/tools/lib/traceevent/plugin_kmem.c +++ b/tools/lib/traceevent/plugin_kmem.c | |||
@@ -48,7 +48,7 @@ static int call_site_handler(struct trace_seq *s, struct pevent_record *record, | |||
48 | return 1; | 48 | return 1; |
49 | } | 49 | } |
50 | 50 | ||
51 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 51 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
52 | { | 52 | { |
53 | pevent_register_event_handler(pevent, -1, "kmem", "kfree", | 53 | pevent_register_event_handler(pevent, -1, "kmem", "kfree", |
54 | call_site_handler, NULL); | 54 | call_site_handler, NULL); |
@@ -71,7 +71,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 74 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
75 | { | 75 | { |
76 | pevent_unregister_event_handler(pevent, -1, "kmem", "kfree", | 76 | pevent_unregister_event_handler(pevent, -1, "kmem", "kfree", |
77 | call_site_handler, NULL); | 77 | call_site_handler, NULL); |
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c index 18536f756577..a6e96ba4d776 100644 --- a/tools/lib/traceevent/plugin_kvm.c +++ b/tools/lib/traceevent/plugin_kvm.c | |||
@@ -444,7 +444,7 @@ process_is_writable_pte(struct trace_seq *s, unsigned long long *args) | |||
444 | return pte & PT_WRITABLE_MASK; | 444 | return pte & PT_WRITABLE_MASK; |
445 | } | 445 | } |
446 | 446 | ||
447 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 447 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
448 | { | 448 | { |
449 | init_disassembler(); | 449 | init_disassembler(); |
450 | 450 | ||
@@ -486,7 +486,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
486 | return 0; | 486 | return 0; |
487 | } | 487 | } |
488 | 488 | ||
489 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 489 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
490 | { | 490 | { |
491 | pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit", | 491 | pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit", |
492 | kvm_exit_handler, NULL); | 492 | kvm_exit_handler, NULL); |
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugin_mac80211.c index 7e15a0f1c2fd..9ac1141f351a 100644 --- a/tools/lib/traceevent/plugin_mac80211.c +++ b/tools/lib/traceevent/plugin_mac80211.c | |||
@@ -86,7 +86,7 @@ static int drv_bss_info_changed(struct trace_seq *s, | |||
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 89 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
90 | { | 90 | { |
91 | pevent_register_event_handler(pevent, -1, "mac80211", | 91 | pevent_register_event_handler(pevent, -1, "mac80211", |
92 | "drv_bss_info_changed", | 92 | "drv_bss_info_changed", |
@@ -94,7 +94,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | 96 | ||
97 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 97 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
98 | { | 98 | { |
99 | pevent_unregister_event_handler(pevent, -1, "mac80211", | 99 | pevent_unregister_event_handler(pevent, -1, "mac80211", |
100 | "drv_bss_info_changed", | 100 | "drv_bss_info_changed", |
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugin_sched_switch.c index ec30c2fcbac0..de90fb82b83f 100644 --- a/tools/lib/traceevent/plugin_sched_switch.c +++ b/tools/lib/traceevent/plugin_sched_switch.c | |||
@@ -134,7 +134,7 @@ static int sched_switch_handler(struct trace_seq *s, | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 137 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
138 | { | 138 | { |
139 | pevent_register_event_handler(pevent, -1, "sched", "sched_switch", | 139 | pevent_register_event_handler(pevent, -1, "sched", "sched_switch", |
140 | sched_switch_handler, NULL); | 140 | sched_switch_handler, NULL); |
@@ -147,7 +147,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
149 | 149 | ||
150 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 150 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
151 | { | 151 | { |
152 | pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch", | 152 | pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch", |
153 | sched_switch_handler, NULL); | 153 | sched_switch_handler, NULL); |
diff --git a/tools/lib/traceevent/plugin_scsi.c b/tools/lib/traceevent/plugin_scsi.c index 5e750af2b461..e430a49e4995 100644 --- a/tools/lib/traceevent/plugin_scsi.c +++ b/tools/lib/traceevent/plugin_scsi.c | |||
@@ -413,7 +413,7 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s, | |||
413 | return 0; | 413 | return 0; |
414 | } | 414 | } |
415 | 415 | ||
416 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 416 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
417 | { | 417 | { |
418 | pevent_register_print_function(pevent, | 418 | pevent_register_print_function(pevent, |
419 | process_scsi_trace_parse_cdb, | 419 | process_scsi_trace_parse_cdb, |
@@ -426,7 +426,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
426 | return 0; | 426 | return 0; |
427 | } | 427 | } |
428 | 428 | ||
429 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 429 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
430 | { | 430 | { |
431 | pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb, | 431 | pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb, |
432 | "scsi_trace_parse_cdb"); | 432 | "scsi_trace_parse_cdb"); |
diff --git a/tools/lib/traceevent/plugin_xen.c b/tools/lib/traceevent/plugin_xen.c index 690173bfa13e..11dbddde2e6a 100644 --- a/tools/lib/traceevent/plugin_xen.c +++ b/tools/lib/traceevent/plugin_xen.c | |||
@@ -119,7 +119,7 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s, | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 122 | int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent) |
123 | { | 123 | { |
124 | pevent_register_print_function(pevent, | 124 | pevent_register_print_function(pevent, |
125 | process_xen_hypercall_name, | 125 | process_xen_hypercall_name, |
@@ -130,7 +130,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 133 | void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent) |
134 | { | 134 | { |
135 | pevent_unregister_print_function(pevent, process_xen_hypercall_name, | 135 | pevent_unregister_print_function(pevent, process_xen_hypercall_name, |
136 | "xen_hypercall_name"); | 136 | "xen_hypercall_name"); |