return 0;
}
-int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock)
+int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock)
{
pevent->trace_clock = strdup(trace_clock);
if (!pevent->trace_clock) {
}
/**
- * pevent_register_function - register a function with a given address
+ * tep_register_function - register a function with a given address
* @pevent: handle for the pevent
* @function: the function name to register
* @addr: the address the function starts at
* This registers a function name with an address and module.
* The @func passed in is duplicated.
*/
-int pevent_register_function(struct tep_handle *pevent, char *func,
- unsigned long long addr, char *mod)
+int tep_register_function(struct tep_handle *pevent, char *func,
+ unsigned long long addr, char *mod)
{
struct func_list *item = malloc(sizeof(*item));
}
/**
- * pevent_register_print_function - register a helper function
+ * tep_register_print_function - register a helper function
* @pevent: the handle to the pevent
* @func: the function to process the helper function
* @ret_type: the return type of the helper function
* The @parameters is a variable list of tep_func_arg_type enums that
* must end with TEP_FUNC_ARG_VOID.
*/
-int pevent_register_print_function(struct tep_handle *pevent,
- tep_func_handler func,
- enum tep_func_arg_type ret_type,
- char *name, ...)
+int tep_register_print_function(struct tep_handle *pevent,
+ tep_func_handler func,
+ enum tep_func_arg_type ret_type,
+ char *name, ...)
{
struct tep_function_handler *func_handle;
struct pevent_func_params **next_param;
}
/**
- * pevent_unregister_print_function - unregister a helper function
+ * tep_unregister_print_function - unregister a helper function
* @pevent: the handle to the pevent
* @func: the function to process the helper function
* @name: the name of the helper function
*
* Returns 0 if the handler was removed successully, -1 otherwise.
*/
-int pevent_unregister_print_function(struct tep_handle *pevent,
- tep_func_handler func, char *name)
+int tep_unregister_print_function(struct tep_handle *pevent,
+ tep_func_handler func, char *name)
{
struct tep_function_handler *func_handle;
}
/**
- * pevent_register_event_handler - register a way to parse an event
+ * tep_register_event_handler - register a way to parse an event
* @pevent: the handle to the pevent
* @id: the id of the event to register
* @sys_name: the system name the event belongs to
* If @id is >= 0, then it is used to find the event.
* else @sys_name and @event_name are used.
*/
-int pevent_register_event_handler(struct tep_handle *pevent, int id,
- const char *sys_name, const char *event_name,
- tep_event_handler_func func, void *context)
+int tep_register_event_handler(struct tep_handle *pevent, int id,
+ const char *sys_name, const char *event_name,
+ tep_event_handler_func func, void *context)
{
struct event_format *event;
struct event_handler *handle;
}
/**
- * pevent_unregister_event_handler - unregister an existing event handler
+ * tep_unregister_event_handler - unregister an existing event handler
* @pevent: the handle to the pevent
* @id: the id of the event to unregister
* @sys_name: the system name the handler belongs to
*
* Returns 0 if handler was removed successfully, -1 if event was not found.
*/
-int pevent_unregister_event_handler(struct tep_handle *pevent, int id,
- const char *sys_name, const char *event_name,
- tep_event_handler_func func, void *context)
+int tep_unregister_event_handler(struct tep_handle *pevent, int id,
+ const char *sys_name, const char *event_name,
+ tep_event_handler_func func, void *context)
{
struct event_format *event;
struct event_handler *handle;
tep_func_resolver_t *func, void *priv);
void pevent_reset_function_resolver(struct tep_handle *pevent);
int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid);
-int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
-int pevent_register_function(struct tep_handle *pevent, char *name,
- unsigned long long addr, char *mod);
+int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
+int tep_register_function(struct tep_handle *pevent, char *name,
+ unsigned long long addr, char *mod);
int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
unsigned long long addr);
int pevent_pid_is_registered(struct tep_handle *pevent, int pid);
struct event_format *event, const char *name,
struct tep_record *record, int err);
-int pevent_register_event_handler(struct tep_handle *pevent, int id,
- const char *sys_name, const char *event_name,
- tep_event_handler_func func, void *context);
-int pevent_unregister_event_handler(struct tep_handle *pevent, int id,
- const char *sys_name, const char *event_name,
- tep_event_handler_func func, void *context);
-int pevent_register_print_function(struct tep_handle *pevent,
- tep_func_handler func,
- enum tep_func_arg_type ret_type,
- char *name, ...);
-int pevent_unregister_print_function(struct tep_handle *pevent,
- tep_func_handler func, char *name);
+int tep_register_event_handler(struct tep_handle *pevent, int id,
+ const char *sys_name, const char *event_name,
+ tep_event_handler_func func, void *context);
+int tep_unregister_event_handler(struct tep_handle *pevent, int id,
+ const char *sys_name, const char *event_name,
+ tep_event_handler_func func, void *context);
+int tep_register_print_function(struct tep_handle *pevent,
+ tep_func_handler func,
+ enum tep_func_arg_type ret_type,
+ char *name, ...);
+int tep_unregister_print_function(struct tep_handle *pevent,
+ tep_func_handler func, char *name);
struct format_field *tep_find_common_field(struct event_format *event, const char *name);
struct format_field *tep_find_field(struct event_format *event, const char *name);
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_print_function(pevent,
- process___le16_to_cpup,
- TEP_FUNC_ARG_INT,
- "__le16_to_cpup",
- TEP_FUNC_ARG_PTR,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process___le16_to_cpup,
+ TEP_FUNC_ARG_INT,
+ "__le16_to_cpup",
+ TEP_FUNC_ARG_PTR,
+ TEP_FUNC_ARG_VOID);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_print_function(pevent, process___le16_to_cpup,
- "__le16_to_cpup");
+ tep_unregister_print_function(pevent, process___le16_to_cpup,
+ "__le16_to_cpup");
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1, "ftrace", "function",
- function_handler, NULL);
+ tep_register_event_handler(pevent, -1, "ftrace", "function",
+ function_handler, NULL);
tep_plugin_add_options("ftrace", plugin_options);
{
int i, x;
- pevent_unregister_event_handler(pevent, -1, "ftrace", "function",
- function_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "ftrace", "function",
+ function_handler, NULL);
for (i = 0; i <= cpus; i++) {
for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++)
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1,
- "timer", "hrtimer_expire_entry",
- timer_expire_handler, NULL);
+ tep_register_event_handler(pevent, -1,
+ "timer", "hrtimer_expire_entry",
+ timer_expire_handler, NULL);
- pevent_register_event_handler(pevent, -1, "timer", "hrtimer_start",
- timer_start_handler, NULL);
+ tep_register_event_handler(pevent, -1, "timer", "hrtimer_start",
+ timer_start_handler, NULL);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_event_handler(pevent, -1,
- "timer", "hrtimer_expire_entry",
- timer_expire_handler, NULL);
+ tep_unregister_event_handler(pevent, -1,
+ "timer", "hrtimer_expire_entry",
+ timer_expire_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "timer", "hrtimer_start",
- timer_start_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "timer", "hrtimer_start",
+ timer_start_handler, NULL);
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_print_function(pevent,
- process_jbd2_dev_to_name,
- TEP_FUNC_ARG_STRING,
- "jbd2_dev_to_name",
- TEP_FUNC_ARG_INT,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process_jbd2_dev_to_name,
+ TEP_FUNC_ARG_STRING,
+ "jbd2_dev_to_name",
+ TEP_FUNC_ARG_INT,
+ TEP_FUNC_ARG_VOID);
- pevent_register_print_function(pevent,
- process_jiffies_to_msecs,
- TEP_FUNC_ARG_LONG,
- "jiffies_to_msecs",
- TEP_FUNC_ARG_LONG,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process_jiffies_to_msecs,
+ TEP_FUNC_ARG_LONG,
+ "jiffies_to_msecs",
+ TEP_FUNC_ARG_LONG,
+ TEP_FUNC_ARG_VOID);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_print_function(pevent, process_jbd2_dev_to_name,
- "jbd2_dev_to_name");
+ tep_unregister_print_function(pevent, process_jbd2_dev_to_name,
+ "jbd2_dev_to_name");
- pevent_unregister_print_function(pevent, process_jiffies_to_msecs,
- "jiffies_to_msecs");
+ tep_unregister_print_function(pevent, process_jiffies_to_msecs,
+ "jiffies_to_msecs");
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1, "kmem", "kfree",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem", "kfree",
+ call_site_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kmem", "kmalloc",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem", "kmalloc",
+ call_site_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kmem", "kmalloc_node",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem", "kmalloc_node",
+ call_site_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
+ call_site_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kmem",
- "kmem_cache_alloc_node",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem",
+ "kmem_cache_alloc_node",
+ call_site_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_free",
- call_site_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_free",
+ call_site_handler, NULL);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_event_handler(pevent, -1, "kmem", "kfree",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem", "kfree",
+ call_site_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc",
+ call_site_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node",
+ call_site_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc",
+ call_site_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kmem",
- "kmem_cache_alloc_node",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem",
+ "kmem_cache_alloc_node",
+ call_site_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free",
- call_site_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free",
+ call_site_handler, NULL);
}
{
init_disassembler();
- pevent_register_event_handler(pevent, -1, "kvm", "kvm_exit",
- kvm_exit_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kvm", "kvm_exit",
+ kvm_exit_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
- kvm_emulate_insn_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
+ kvm_emulate_insn_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
- kvm_nested_vmexit_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
+ kvm_nested_vmexit_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
- kvm_nested_vmexit_inject_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
+ kvm_nested_vmexit_inject_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
- kvm_mmu_get_page_handler, NULL);
+ tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
+ kvm_mmu_get_page_handler, NULL);
- pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
- kvm_mmu_print_role, NULL);
+ tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
+ kvm_mmu_print_role, NULL);
- pevent_register_event_handler(pevent, -1,
- "kvmmmu", "kvm_mmu_unsync_page",
- kvm_mmu_print_role, NULL);
+ tep_register_event_handler(pevent, -1,
+ "kvmmmu", "kvm_mmu_unsync_page",
+ kvm_mmu_print_role, NULL);
- pevent_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
- kvm_mmu_print_role, NULL);
+ tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
+ kvm_mmu_print_role, NULL);
- pevent_register_event_handler(pevent, -1, "kvmmmu",
+ tep_register_event_handler(pevent, -1, "kvmmmu",
"kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
NULL);
- pevent_register_print_function(pevent,
- process_is_writable_pte,
- TEP_FUNC_ARG_INT,
- "is_writable_pte",
- TEP_FUNC_ARG_LONG,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process_is_writable_pte,
+ TEP_FUNC_ARG_INT,
+ "is_writable_pte",
+ TEP_FUNC_ARG_LONG,
+ TEP_FUNC_ARG_VOID);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit",
- kvm_exit_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvm", "kvm_exit",
+ kvm_exit_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
- kvm_emulate_insn_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvm", "kvm_emulate_insn",
+ kvm_emulate_insn_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
- kvm_nested_vmexit_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit",
+ kvm_nested_vmexit_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
- kvm_nested_vmexit_inject_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject",
+ kvm_nested_vmexit_inject_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
- kvm_mmu_get_page_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page",
+ kvm_mmu_get_page_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
- kvm_mmu_print_role, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page",
+ kvm_mmu_print_role, NULL);
- pevent_unregister_event_handler(pevent, -1,
- "kvmmmu", "kvm_mmu_unsync_page",
- kvm_mmu_print_role, NULL);
+ tep_unregister_event_handler(pevent, -1,
+ "kvmmmu", "kvm_mmu_unsync_page",
+ kvm_mmu_print_role, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
- kvm_mmu_print_role, NULL);
+ tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page",
+ kvm_mmu_print_role, NULL);
- pevent_unregister_event_handler(pevent, -1, "kvmmmu",
+ tep_unregister_event_handler(pevent, -1, "kvmmmu",
"kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
NULL);
- pevent_unregister_print_function(pevent, process_is_writable_pte,
- "is_writable_pte");
+ tep_unregister_print_function(pevent, process_is_writable_pte,
+ "is_writable_pte");
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1, "mac80211",
- "drv_bss_info_changed",
- drv_bss_info_changed, NULL);
+ tep_register_event_handler(pevent, -1, "mac80211",
+ "drv_bss_info_changed",
+ drv_bss_info_changed, NULL);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_event_handler(pevent, -1, "mac80211",
- "drv_bss_info_changed",
- drv_bss_info_changed, NULL);
+ tep_unregister_event_handler(pevent, -1, "mac80211",
+ "drv_bss_info_changed",
+ drv_bss_info_changed, NULL);
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1, "sched", "sched_switch",
- sched_switch_handler, NULL);
+ tep_register_event_handler(pevent, -1, "sched", "sched_switch",
+ sched_switch_handler, NULL);
- pevent_register_event_handler(pevent, -1, "sched", "sched_wakeup",
- sched_wakeup_handler, NULL);
+ tep_register_event_handler(pevent, -1, "sched", "sched_wakeup",
+ sched_wakeup_handler, NULL);
- pevent_register_event_handler(pevent, -1, "sched", "sched_wakeup_new",
- sched_wakeup_handler, NULL);
+ tep_register_event_handler(pevent, -1, "sched", "sched_wakeup_new",
+ sched_wakeup_handler, NULL);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch",
- sched_switch_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "sched", "sched_switch",
+ sched_switch_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "sched", "sched_wakeup",
- sched_wakeup_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup",
+ sched_wakeup_handler, NULL);
- pevent_unregister_event_handler(pevent, -1, "sched", "sched_wakeup_new",
- sched_wakeup_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup_new",
+ sched_wakeup_handler, NULL);
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_print_function(pevent,
- process_scsi_trace_parse_cdb,
- TEP_FUNC_ARG_STRING,
- "scsi_trace_parse_cdb",
- TEP_FUNC_ARG_PTR,
- TEP_FUNC_ARG_PTR,
- TEP_FUNC_ARG_INT,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process_scsi_trace_parse_cdb,
+ TEP_FUNC_ARG_STRING,
+ "scsi_trace_parse_cdb",
+ TEP_FUNC_ARG_PTR,
+ TEP_FUNC_ARG_PTR,
+ TEP_FUNC_ARG_INT,
+ TEP_FUNC_ARG_VOID);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb,
- "scsi_trace_parse_cdb");
+ tep_unregister_print_function(pevent, process_scsi_trace_parse_cdb,
+ "scsi_trace_parse_cdb");
}
int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_print_function(pevent,
- process_xen_hypercall_name,
- TEP_FUNC_ARG_STRING,
- "xen_hypercall_name",
- TEP_FUNC_ARG_INT,
- TEP_FUNC_ARG_VOID);
+ tep_register_print_function(pevent,
+ process_xen_hypercall_name,
+ TEP_FUNC_ARG_STRING,
+ "xen_hypercall_name",
+ TEP_FUNC_ARG_INT,
+ TEP_FUNC_ARG_VOID);
return 0;
}
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
- pevent_unregister_print_function(pevent, process_xen_hypercall_name,
- "xen_hypercall_name");
+ tep_unregister_print_function(pevent, process_xen_hypercall_name,
+ "xen_hypercall_name");
}