aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2018-08-08 14:03:02 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-13 14:27:35 -0400
commitb843e9c3a271a068b67df74ef24abb7c81f2463c (patch)
treeef3fb0bf8c7c6506cc4d16cc0dba50d709073f5a /tools
parent64e237906963d0c26d3b25e7751b4d6aaa01f720 (diff)
tools lib traceevent: Rename pevent_register / unregister APIs
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_" and not "pevent_". This changes APIs: pevent_register_print_function, pevent_unregister_print_function, pevent_register_event_handler, pevent_unregister_event_handler, pevent_register_function, pevent_register_trace_clock Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com> Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180808180702.524813185@goodmis.org Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/traceevent/event-parse.c40
-rw-r--r--tools/lib/traceevent/event-parse.h30
-rw-r--r--tools/lib/traceevent/plugin_cfg80211.c16
-rw-r--r--tools/lib/traceevent/plugin_function.c8
-rw-r--r--tools/lib/traceevent/plugin_hrtimer.c20
-rw-r--r--tools/lib/traceevent/plugin_jbd2.c32
-rw-r--r--tools/lib/traceevent/plugin_kmem.c52
-rw-r--r--tools/lib/traceevent/plugin_kvm.c88
-rw-r--r--tools/lib/traceevent/plugin_mac80211.c12
-rw-r--r--tools/lib/traceevent/plugin_sched_switch.c24
-rw-r--r--tools/lib/traceevent/plugin_scsi.c20
-rw-r--r--tools/lib/traceevent/plugin_xen.c16
12 files changed, 179 insertions, 179 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 8d0ce0ea52dc..0de470c07be9 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -324,7 +324,7 @@ int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid)
324 return 0; 324 return 0;
325} 325}
326 326
327int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock) 327int tep_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) {
@@ -544,7 +544,7 @@ pevent_find_function_address(struct tep_handle *pevent, unsigned long long addr)
544} 544}
545 545
546/** 546/**
547 * pevent_register_function - register a function with a given address 547 * tep_register_function - register a function with a given address
548 * @pevent: handle for the pevent 548 * @pevent: handle for the pevent
549 * @function: the function name to register 549 * @function: the function name to register
550 * @addr: the address the function starts at 550 * @addr: the address the function starts at
@@ -553,8 +553,8 @@ pevent_find_function_address(struct tep_handle *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 */
556int pevent_register_function(struct tep_handle *pevent, char *func, 556int tep_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));
560 560
@@ -6477,7 +6477,7 @@ static void free_func_handle(struct tep_function_handler *func)
6477} 6477}
6478 6478
6479/** 6479/**
6480 * pevent_register_print_function - register a helper function 6480 * tep_register_print_function - register a helper function
6481 * @pevent: the handle to the pevent 6481 * @pevent: the handle to the pevent
6482 * @func: the function to process the helper function 6482 * @func: the function to process the helper function
6483 * @ret_type: the return type of the helper function 6483 * @ret_type: the return type of the helper function
@@ -6491,10 +6491,10 @@ static void free_func_handle(struct tep_function_handler *func)
6491 * The @parameters is a variable list of tep_func_arg_type enums that 6491 * The @parameters is a variable list of tep_func_arg_type enums that
6492 * must end with TEP_FUNC_ARG_VOID. 6492 * must end with TEP_FUNC_ARG_VOID.
6493 */ 6493 */
6494int pevent_register_print_function(struct tep_handle *pevent, 6494int tep_register_print_function(struct tep_handle *pevent,
6495 tep_func_handler func, 6495 tep_func_handler func,
6496 enum tep_func_arg_type ret_type, 6496 enum tep_func_arg_type ret_type,
6497 char *name, ...) 6497 char *name, ...)
6498{ 6498{
6499 struct tep_function_handler *func_handle; 6499 struct tep_function_handler *func_handle;
6500 struct pevent_func_params **next_param; 6500 struct pevent_func_params **next_param;
@@ -6569,7 +6569,7 @@ int pevent_register_print_function(struct tep_handle *pevent,
6569} 6569}
6570 6570
6571/** 6571/**
6572 * pevent_unregister_print_function - unregister a helper function 6572 * tep_unregister_print_function - unregister a helper function
6573 * @pevent: the handle to the pevent 6573 * @pevent: the handle to the pevent
6574 * @func: the function to process the helper function 6574 * @func: the function to process the helper function
6575 * @name: the name of the helper function 6575 * @name: the name of the helper function
@@ -6578,8 +6578,8 @@ int pevent_register_print_function(struct tep_handle *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 */
6581int pevent_unregister_print_function(struct tep_handle *pevent, 6581int tep_unregister_print_function(struct tep_handle *pevent,
6582 tep_func_handler func, char *name) 6582 tep_func_handler func, char *name)
6583{ 6583{
6584 struct tep_function_handler *func_handle; 6584 struct tep_function_handler *func_handle;
6585 6585
@@ -6615,7 +6615,7 @@ static struct event_format *pevent_search_event(struct tep_handle *pevent, int i
6615} 6615}
6616 6616
6617/** 6617/**
6618 * pevent_register_event_handler - register a way to parse an event 6618 * tep_register_event_handler - register a way to parse an event
6619 * @pevent: the handle to the pevent 6619 * @pevent: the handle to the pevent
6620 * @id: the id of the event to register 6620 * @id: the id of the event to register
6621 * @sys_name: the system name the event belongs to 6621 * @sys_name: the system name the event belongs to
@@ -6631,9 +6631,9 @@ static struct event_format *pevent_search_event(struct tep_handle *pevent, int i
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 */
6634int pevent_register_event_handler(struct tep_handle *pevent, int id, 6634int tep_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 tep_event_handler_func func, void *context) 6636 tep_event_handler_func func, void *context)
6637{ 6637{
6638 struct event_format *event; 6638 struct event_format *event;
6639 struct event_handler *handle; 6639 struct event_handler *handle;
@@ -6700,7 +6700,7 @@ static int handle_matches(struct event_handler *handler, int id,
6700} 6700}
6701 6701
6702/** 6702/**
6703 * pevent_unregister_event_handler - unregister an existing event handler 6703 * tep_unregister_event_handler - unregister an existing event handler
6704 * @pevent: the handle to the pevent 6704 * @pevent: the handle to the pevent
6705 * @id: the id of the event to unregister 6705 * @id: the id of the event to unregister
6706 * @sys_name: the system name the handler belongs to 6706 * @sys_name: the system name the handler belongs to
@@ -6715,9 +6715,9 @@ 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 */
6718int pevent_unregister_event_handler(struct tep_handle *pevent, int id, 6718int tep_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 tep_event_handler_func func, void *context) 6720 tep_event_handler_func func, void *context)
6721{ 6721{
6722 struct event_format *event; 6722 struct event_format *event;
6723 struct event_handler *handle; 6723 struct event_handler *handle;
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index c60329cd9463..dc0d2d3b7c33 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -619,9 +619,9 @@ int tep_set_function_resolver(struct tep_handle *pevent,
619 tep_func_resolver_t *func, void *priv); 619 tep_func_resolver_t *func, void *priv);
620void pevent_reset_function_resolver(struct tep_handle *pevent); 620void pevent_reset_function_resolver(struct tep_handle *pevent);
621int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid); 621int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid);
622int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock); 622int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
623int pevent_register_function(struct tep_handle *pevent, char *name, 623int tep_register_function(struct tep_handle *pevent, char *name,
624 unsigned long long addr, char *mod); 624 unsigned long long addr, char *mod);
625int tep_register_print_string(struct tep_handle *pevent, const char *fmt, 625int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
626 unsigned long long addr); 626 unsigned long long addr);
627int pevent_pid_is_registered(struct tep_handle *pevent, int pid); 627int pevent_pid_is_registered(struct tep_handle *pevent, int pid);
@@ -673,18 +673,18 @@ int tep_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 tep_record *record, int err); 674 struct tep_record *record, int err);
675 675
676int pevent_register_event_handler(struct tep_handle *pevent, int id, 676int tep_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 tep_event_handler_func func, void *context); 678 tep_event_handler_func func, void *context);
679int pevent_unregister_event_handler(struct tep_handle *pevent, int id, 679int tep_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 tep_event_handler_func func, void *context); 681 tep_event_handler_func func, void *context);
682int pevent_register_print_function(struct tep_handle *pevent, 682int tep_register_print_function(struct tep_handle *pevent,
683 tep_func_handler func, 683 tep_func_handler func,
684 enum tep_func_arg_type ret_type, 684 enum tep_func_arg_type ret_type,
685 char *name, ...); 685 char *name, ...);
686int pevent_unregister_print_function(struct tep_handle *pevent, 686int tep_unregister_print_function(struct tep_handle *pevent,
687 tep_func_handler func, char *name); 687 tep_func_handler func, char *name);
688 688
689struct format_field *tep_find_common_field(struct event_format *event, const char *name); 689struct format_field *tep_find_common_field(struct event_format *event, const char *name);
690struct format_field *tep_find_field(struct event_format *event, const char *name); 690struct format_field *tep_find_field(struct event_format *event, const char *name);
diff --git a/tools/lib/traceevent/plugin_cfg80211.c b/tools/lib/traceevent/plugin_cfg80211.c
index e0421e31509f..a51b366f47da 100644
--- a/tools/lib/traceevent/plugin_cfg80211.c
+++ b/tools/lib/traceevent/plugin_cfg80211.c
@@ -27,17 +27,17 @@ process___le16_to_cpup(struct trace_seq *s, unsigned long long *args)
27 27
28int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 28int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
29{ 29{
30 pevent_register_print_function(pevent, 30 tep_register_print_function(pevent,
31 process___le16_to_cpup, 31 process___le16_to_cpup,
32 TEP_FUNC_ARG_INT, 32 TEP_FUNC_ARG_INT,
33 "__le16_to_cpup", 33 "__le16_to_cpup",
34 TEP_FUNC_ARG_PTR, 34 TEP_FUNC_ARG_PTR,
35 TEP_FUNC_ARG_VOID); 35 TEP_FUNC_ARG_VOID);
36 return 0; 36 return 0;
37} 37}
38 38
39void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 39void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
40{ 40{
41 pevent_unregister_print_function(pevent, process___le16_to_cpup, 41 tep_unregister_print_function(pevent, process___le16_to_cpup,
42 "__le16_to_cpup"); 42 "__le16_to_cpup");
43} 43}
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugin_function.c
index 57165da1bd51..50cc356124f6 100644
--- a/tools/lib/traceevent/plugin_function.c
+++ b/tools/lib/traceevent/plugin_function.c
@@ -165,8 +165,8 @@ static int function_handler(struct trace_seq *s, struct tep_record *record,
165 165
166int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 166int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
167{ 167{
168 pevent_register_event_handler(pevent, -1, "ftrace", "function", 168 tep_register_event_handler(pevent, -1, "ftrace", "function",
169 function_handler, NULL); 169 function_handler, NULL);
170 170
171 tep_plugin_add_options("ftrace", plugin_options); 171 tep_plugin_add_options("ftrace", plugin_options);
172 172
@@ -177,8 +177,8 @@ void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
177{ 177{
178 int i, x; 178 int i, x;
179 179
180 pevent_unregister_event_handler(pevent, -1, "ftrace", "function", 180 tep_unregister_event_handler(pevent, -1, "ftrace", "function",
181 function_handler, NULL); 181 function_handler, NULL);
182 182
183 for (i = 0; i <= cpus; i++) { 183 for (i = 0; i <= cpus; i++) {
184 for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++) 184 for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++)
diff --git a/tools/lib/traceevent/plugin_hrtimer.c b/tools/lib/traceevent/plugin_hrtimer.c
index a37180eef959..b43bfec565d8 100644
--- a/tools/lib/traceevent/plugin_hrtimer.c
+++ b/tools/lib/traceevent/plugin_hrtimer.c
@@ -68,21 +68,21 @@ static int timer_start_handler(struct trace_seq *s,
68 68
69int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 69int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
70{ 70{
71 pevent_register_event_handler(pevent, -1, 71 tep_register_event_handler(pevent, -1,
72 "timer", "hrtimer_expire_entry", 72 "timer", "hrtimer_expire_entry",
73 timer_expire_handler, NULL); 73 timer_expire_handler, NULL);
74 74
75 pevent_register_event_handler(pevent, -1, "timer", "hrtimer_start", 75 tep_register_event_handler(pevent, -1, "timer", "hrtimer_start",
76 timer_start_handler, NULL); 76 timer_start_handler, NULL);
77 return 0; 77 return 0;
78} 78}
79 79
80void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 80void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
81{ 81{
82 pevent_unregister_event_handler(pevent, -1, 82 tep_unregister_event_handler(pevent, -1,
83 "timer", "hrtimer_expire_entry", 83 "timer", "hrtimer_expire_entry",
84 timer_expire_handler, NULL); 84 timer_expire_handler, NULL);
85 85
86 pevent_unregister_event_handler(pevent, -1, "timer", "hrtimer_start", 86 tep_unregister_event_handler(pevent, -1, "timer", "hrtimer_start",
87 timer_start_handler, NULL); 87 timer_start_handler, NULL);
88} 88}
diff --git a/tools/lib/traceevent/plugin_jbd2.c b/tools/lib/traceevent/plugin_jbd2.c
index 6da955ff037e..45a9acd19640 100644
--- a/tools/lib/traceevent/plugin_jbd2.c
+++ b/tools/lib/traceevent/plugin_jbd2.c
@@ -49,27 +49,27 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args)
49 49
50int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 50int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
51{ 51{
52 pevent_register_print_function(pevent, 52 tep_register_print_function(pevent,
53 process_jbd2_dev_to_name, 53 process_jbd2_dev_to_name,
54 TEP_FUNC_ARG_STRING, 54 TEP_FUNC_ARG_STRING,
55 "jbd2_dev_to_name", 55 "jbd2_dev_to_name",
56 TEP_FUNC_ARG_INT, 56 TEP_FUNC_ARG_INT,
57 TEP_FUNC_ARG_VOID); 57 TEP_FUNC_ARG_VOID);
58 58
59 pevent_register_print_function(pevent, 59 tep_register_print_function(pevent,
60 process_jiffies_to_msecs, 60 process_jiffies_to_msecs,
61 TEP_FUNC_ARG_LONG, 61 TEP_FUNC_ARG_LONG,
62 "jiffies_to_msecs", 62 "jiffies_to_msecs",
63 TEP_FUNC_ARG_LONG, 63 TEP_FUNC_ARG_LONG,
64 TEP_FUNC_ARG_VOID); 64 TEP_FUNC_ARG_VOID);
65 return 0; 65 return 0;
66} 66}
67 67
68void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 68void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
69{ 69{
70 pevent_unregister_print_function(pevent, process_jbd2_dev_to_name, 70 tep_unregister_print_function(pevent, process_jbd2_dev_to_name,
71 "jbd2_dev_to_name"); 71 "jbd2_dev_to_name");
72 72
73 pevent_unregister_print_function(pevent, process_jiffies_to_msecs, 73 tep_unregister_print_function(pevent, process_jiffies_to_msecs,
74 "jiffies_to_msecs"); 74 "jiffies_to_msecs");
75} 75}
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugin_kmem.c
index 28cabe250daf..6d5938d82c66 100644
--- a/tools/lib/traceevent/plugin_kmem.c
+++ b/tools/lib/traceevent/plugin_kmem.c
@@ -50,45 +50,45 @@ static int call_site_handler(struct trace_seq *s, struct tep_record *record,
50 50
51int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 51int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
52{ 52{
53 pevent_register_event_handler(pevent, -1, "kmem", "kfree", 53 tep_register_event_handler(pevent, -1, "kmem", "kfree",
54 call_site_handler, NULL); 54 call_site_handler, NULL);
55 55
56 pevent_register_event_handler(pevent, -1, "kmem", "kmalloc", 56 tep_register_event_handler(pevent, -1, "kmem", "kmalloc",
57 call_site_handler, NULL); 57 call_site_handler, NULL);
58 58
59 pevent_register_event_handler(pevent, -1, "kmem", "kmalloc_node", 59 tep_register_event_handler(pevent, -1, "kmem", "kmalloc_node",
60 call_site_handler, NULL); 60 call_site_handler, NULL);
61 61
62 pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", 62 tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
63 call_site_handler, NULL); 63 call_site_handler, NULL);
64 64
65 pevent_register_event_handler(pevent, -1, "kmem", 65 tep_register_event_handler(pevent, -1, "kmem",
66 "kmem_cache_alloc_node", 66 "kmem_cache_alloc_node",
67 call_site_handler, NULL); 67 call_site_handler, NULL);
68 68
69 pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_free", 69 tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_free",
70 call_site_handler, NULL); 70 call_site_handler, NULL);
71 return 0; 71 return 0;
72} 72}
73 73
74void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 74void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
75{ 75{
76 pevent_unregister_event_handler(pevent, -1, "kmem", "kfree", 76 tep_unregister_event_handler(pevent, -1, "kmem", "kfree",
77 call_site_handler, NULL); 77 call_site_handler, NULL);
78 78
79 pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc", 79 tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc",
80 call_site_handler, NULL); 80 call_site_handler, NULL);
81 81
82 pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node", 82 tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node",
83 call_site_handler, NULL); 83 call_site_handler, NULL);
84 84
85 pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", 85 tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
86 call_site_handler, NULL); 86 call_site_handler, NULL);
87 87
88 pevent_unregister_event_handler(pevent, -1, "kmem", 88 tep_unregister_event_handler(pevent, -1, "kmem",
89 "kmem_cache_alloc_node", 89 "kmem_cache_alloc_node",
90 call_site_handler, NULL); 90 call_site_handler, NULL);
91 91
92 pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free", 92 tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free",
93 call_site_handler, NULL); 93 call_site_handler, NULL);
94} 94}
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index c20f743edf1f..4b3433763340 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -448,75 +448,75 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
448{ 448{
449 init_disassembler(); 449 init_disassembler();
450 450
451 pevent_register_event_handler(pevent, -1, "kvm", "kvm_exit", 451 tep_register_event_handler(pevent, -1, "kvm", "kvm_exit",
452 kvm_exit_handler, NULL); 452 kvm_exit_handler, NULL);
453 453
454 pevent_register_event_handler(pevent, -1, "kvm", "kvm_emulate_insn", 454 tep_register_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
455 kvm_emulate_insn_handler, NULL); 455 kvm_emulate_insn_handler, NULL);
456 456
457 pevent_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit", 457 tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
458 kvm_nested_vmexit_handler, NULL); 458 kvm_nested_vmexit_handler, NULL);
459 459
460 pevent_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject", 460 tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
461 kvm_nested_vmexit_inject_handler, NULL); 461 kvm_nested_vmexit_inject_handler, NULL);
462 462
463 pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page", 463 tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
464 kvm_mmu_get_page_handler, NULL); 464 kvm_mmu_get_page_handler, NULL);
465 465
466 pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page", 466 tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
467 kvm_mmu_print_role, NULL); 467 kvm_mmu_print_role, NULL);
468 468
469 pevent_register_event_handler(pevent, -1, 469 tep_register_event_handler(pevent, -1,
470 "kvmmmu", "kvm_mmu_unsync_page", 470 "kvmmmu", "kvm_mmu_unsync_page",
471 kvm_mmu_print_role, NULL); 471 kvm_mmu_print_role, NULL);
472 472
473 pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page", 473 tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
474 kvm_mmu_print_role, NULL); 474 kvm_mmu_print_role, NULL);
475 475
476 pevent_register_event_handler(pevent, -1, "kvmmmu", 476 tep_register_event_handler(pevent, -1, "kvmmmu",
477 "kvm_mmu_prepare_zap_page", kvm_mmu_print_role, 477 "kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
478 NULL); 478 NULL);
479 479
480 pevent_register_print_function(pevent, 480 tep_register_print_function(pevent,
481 process_is_writable_pte, 481 process_is_writable_pte,
482 TEP_FUNC_ARG_INT, 482 TEP_FUNC_ARG_INT,
483 "is_writable_pte", 483 "is_writable_pte",
484 TEP_FUNC_ARG_LONG, 484 TEP_FUNC_ARG_LONG,
485 TEP_FUNC_ARG_VOID); 485 TEP_FUNC_ARG_VOID);
486 return 0; 486 return 0;
487} 487}
488 488
489void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 489void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
490{ 490{
491 pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit", 491 tep_unregister_event_handler(pevent, -1, "kvm", "kvm_exit",
492 kvm_exit_handler, NULL); 492 kvm_exit_handler, NULL);
493 493
494 pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_emulate_insn", 494 tep_unregister_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
495 kvm_emulate_insn_handler, NULL); 495 kvm_emulate_insn_handler, NULL);
496 496
497 pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit", 497 tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
498 kvm_nested_vmexit_handler, NULL); 498 kvm_nested_vmexit_handler, NULL);
499 499
500 pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject", 500 tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
501 kvm_nested_vmexit_inject_handler, NULL); 501 kvm_nested_vmexit_inject_handler, NULL);
502 502
503 pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page", 503 tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
504 kvm_mmu_get_page_handler, NULL); 504 kvm_mmu_get_page_handler, NULL);
505 505
506 pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page", 506 tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
507 kvm_mmu_print_role, NULL); 507 kvm_mmu_print_role, NULL);
508 508
509 pevent_unregister_event_handler(pevent, -1, 509 tep_unregister_event_handler(pevent, -1,
510 "kvmmmu", "kvm_mmu_unsync_page", 510 "kvmmmu", "kvm_mmu_unsync_page",
511 kvm_mmu_print_role, NULL); 511 kvm_mmu_print_role, NULL);
512 512
513 pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page", 513 tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
514 kvm_mmu_print_role, NULL); 514 kvm_mmu_print_role, NULL);
515 515
516 pevent_unregister_event_handler(pevent, -1, "kvmmmu", 516 tep_unregister_event_handler(pevent, -1, "kvmmmu",
517 "kvm_mmu_prepare_zap_page", kvm_mmu_print_role, 517 "kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
518 NULL); 518 NULL);
519 519
520 pevent_unregister_print_function(pevent, process_is_writable_pte, 520 tep_unregister_print_function(pevent, process_is_writable_pte,
521 "is_writable_pte"); 521 "is_writable_pte");
522} 522}
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugin_mac80211.c
index 5197f940d153..de50a5316203 100644
--- a/tools/lib/traceevent/plugin_mac80211.c
+++ b/tools/lib/traceevent/plugin_mac80211.c
@@ -88,15 +88,15 @@ static int drv_bss_info_changed(struct trace_seq *s,
88 88
89int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 89int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
90{ 90{
91 pevent_register_event_handler(pevent, -1, "mac80211", 91 tep_register_event_handler(pevent, -1, "mac80211",
92 "drv_bss_info_changed", 92 "drv_bss_info_changed",
93 drv_bss_info_changed, NULL); 93 drv_bss_info_changed, NULL);
94 return 0; 94 return 0;
95} 95}
96 96
97void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 97void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
98{ 98{
99 pevent_unregister_event_handler(pevent, -1, "mac80211", 99 tep_unregister_event_handler(pevent, -1, "mac80211",
100 "drv_bss_info_changed", 100 "drv_bss_info_changed",
101 drv_bss_info_changed, NULL); 101 drv_bss_info_changed, NULL);
102} 102}
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugin_sched_switch.c
index 4d8eaab6ac15..3f3a89c3d041 100644
--- a/tools/lib/traceevent/plugin_sched_switch.c
+++ b/tools/lib/traceevent/plugin_sched_switch.c
@@ -136,25 +136,25 @@ static int sched_switch_handler(struct trace_seq *s,
136 136
137int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 137int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
138{ 138{
139 pevent_register_event_handler(pevent, -1, "sched", "sched_switch", 139 tep_register_event_handler(pevent, -1, "sched", "sched_switch",
140 sched_switch_handler, NULL); 140 sched_switch_handler, NULL);
141 141
142 pevent_register_event_handler(pevent, -1, "sched", "sched_wakeup", 142 tep_register_event_handler(pevent, -1, "sched", "sched_wakeup",
143 sched_wakeup_handler, NULL); 143 sched_wakeup_handler, NULL);
144 144
145 pevent_register_event_handler(pevent, -1, "sched", "sched_wakeup_new", 145 tep_register_event_handler(pevent, -1, "sched", "sched_wakeup_new",
146 sched_wakeup_handler, NULL); 146 sched_wakeup_handler, NULL);
147 return 0; 147 return 0;
148} 148}
149 149
150void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 150void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
151{ 151{
152 pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch", 152 tep_unregister_event_handler(pevent, -1, "sched", "sched_switch",
153 sched_switch_handler, NULL); 153 sched_switch_handler, NULL);
154 154
155 pevent_unregister_event_handler(pevent, -1, "sched", "sched_wakeup", 155 tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup",
156 sched_wakeup_handler, NULL); 156 sched_wakeup_handler, NULL);
157 157
158 pevent_unregister_event_handler(pevent, -1, "sched", "sched_wakeup_new", 158 tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup_new",
159 sched_wakeup_handler, NULL); 159 sched_wakeup_handler, NULL);
160} 160}
diff --git a/tools/lib/traceevent/plugin_scsi.c b/tools/lib/traceevent/plugin_scsi.c
index ce38df7ed4d8..5ec346f6b842 100644
--- a/tools/lib/traceevent/plugin_scsi.c
+++ b/tools/lib/traceevent/plugin_scsi.c
@@ -415,19 +415,19 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s,
415 415
416int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 416int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
417{ 417{
418 pevent_register_print_function(pevent, 418 tep_register_print_function(pevent,
419 process_scsi_trace_parse_cdb, 419 process_scsi_trace_parse_cdb,
420 TEP_FUNC_ARG_STRING, 420 TEP_FUNC_ARG_STRING,
421 "scsi_trace_parse_cdb", 421 "scsi_trace_parse_cdb",
422 TEP_FUNC_ARG_PTR, 422 TEP_FUNC_ARG_PTR,
423 TEP_FUNC_ARG_PTR, 423 TEP_FUNC_ARG_PTR,
424 TEP_FUNC_ARG_INT, 424 TEP_FUNC_ARG_INT,
425 TEP_FUNC_ARG_VOID); 425 TEP_FUNC_ARG_VOID);
426 return 0; 426 return 0;
427} 427}
428 428
429void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 429void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
430{ 430{
431 pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb, 431 tep_unregister_print_function(pevent, process_scsi_trace_parse_cdb,
432 "scsi_trace_parse_cdb"); 432 "scsi_trace_parse_cdb");
433} 433}
diff --git a/tools/lib/traceevent/plugin_xen.c b/tools/lib/traceevent/plugin_xen.c
index 2ffbd91d5bb7..b2acbd6e9c86 100644
--- a/tools/lib/traceevent/plugin_xen.c
+++ b/tools/lib/traceevent/plugin_xen.c
@@ -121,17 +121,17 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s,
121 121
122int TEP_PLUGIN_LOADER(struct tep_handle *pevent) 122int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
123{ 123{
124 pevent_register_print_function(pevent, 124 tep_register_print_function(pevent,
125 process_xen_hypercall_name, 125 process_xen_hypercall_name,
126 TEP_FUNC_ARG_STRING, 126 TEP_FUNC_ARG_STRING,
127 "xen_hypercall_name", 127 "xen_hypercall_name",
128 TEP_FUNC_ARG_INT, 128 TEP_FUNC_ARG_INT,
129 TEP_FUNC_ARG_VOID); 129 TEP_FUNC_ARG_VOID);
130 return 0; 130 return 0;
131} 131}
132 132
133void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) 133void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
134{ 134{
135 pevent_unregister_print_function(pevent, process_xen_hypercall_name, 135 tep_unregister_print_function(pevent, process_xen_hypercall_name,
136 "xen_hypercall_name"); 136 "xen_hypercall_name");
137} 137}