Commit 047ff221 authored by Tzvetomir Stoyanov's avatar Tzvetomir Stoyanov Committed by Arnaldo Carvalho de Melo

tools lib traceevent: Rename input arguments of libtraceevent APIs from pevent to tep

Input arguments of libtraceevent APIs are renamed from "struct
tep_handle *pevent" to "struct tep_handle *tep". This makes the API
consistent with the chosen naming convention: tep (trace event parser),
instead of the old pevent.
Signed-off-by: default avatarTzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-2-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.465573837@goodmis.orgSigned-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 55c34ae0
...@@ -92,11 +92,11 @@ bool tep_test_flag(struct tep_handle *tep, enum tep_flag flag) ...@@ -92,11 +92,11 @@ bool tep_test_flag(struct tep_handle *tep, enum tep_flag flag)
return false; return false;
} }
unsigned short tep_data2host2(struct tep_handle *pevent, unsigned short data) unsigned short tep_data2host2(struct tep_handle *tep, unsigned short data)
{ {
unsigned short swap; unsigned short swap;
if (!pevent || pevent->host_bigendian == pevent->file_bigendian) if (!tep || tep->host_bigendian == tep->file_bigendian)
return data; return data;
swap = ((data & 0xffULL) << 8) | swap = ((data & 0xffULL) << 8) |
...@@ -105,11 +105,11 @@ unsigned short tep_data2host2(struct tep_handle *pevent, unsigned short data) ...@@ -105,11 +105,11 @@ unsigned short tep_data2host2(struct tep_handle *pevent, unsigned short data)
return swap; return swap;
} }
unsigned int tep_data2host4(struct tep_handle *pevent, unsigned int data) unsigned int tep_data2host4(struct tep_handle *tep, unsigned int data)
{ {
unsigned int swap; unsigned int swap;
if (!pevent || pevent->host_bigendian == pevent->file_bigendian) if (!tep || tep->host_bigendian == tep->file_bigendian)
return data; return data;
swap = ((data & 0xffULL) << 24) | swap = ((data & 0xffULL) << 24) |
...@@ -121,11 +121,11 @@ unsigned int tep_data2host4(struct tep_handle *pevent, unsigned int data) ...@@ -121,11 +121,11 @@ unsigned int tep_data2host4(struct tep_handle *pevent, unsigned int data)
} }
unsigned long long unsigned long long
tep_data2host8(struct tep_handle *pevent, unsigned long long data) tep_data2host8(struct tep_handle *tep, unsigned long long data)
{ {
unsigned long long swap; unsigned long long swap;
if (!pevent || pevent->host_bigendian == pevent->file_bigendian) if (!tep || tep->host_bigendian == tep->file_bigendian)
return data; return data;
swap = ((data & 0xffULL) << 56) | swap = ((data & 0xffULL) << 56) |
...@@ -142,15 +142,15 @@ tep_data2host8(struct tep_handle *pevent, unsigned long long data) ...@@ -142,15 +142,15 @@ tep_data2host8(struct tep_handle *pevent, unsigned long long data)
/** /**
* tep_get_header_page_size - get size of the header page * tep_get_header_page_size - get size of the header page
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns size of the header page * This returns size of the header page
* If @pevent is NULL, 0 is returned. * If @tep is NULL, 0 is returned.
*/ */
int tep_get_header_page_size(struct tep_handle *pevent) int tep_get_header_page_size(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->header_page_size_size; return tep->header_page_size_size;
return 0; return 0;
} }
...@@ -170,163 +170,163 @@ int tep_get_header_timestamp_size(struct tep_handle *tep) ...@@ -170,163 +170,163 @@ int tep_get_header_timestamp_size(struct tep_handle *tep)
/** /**
* tep_get_cpus - get the number of CPUs * tep_get_cpus - get the number of CPUs
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns the number of CPUs * This returns the number of CPUs
* If @pevent is NULL, 0 is returned. * If @tep is NULL, 0 is returned.
*/ */
int tep_get_cpus(struct tep_handle *pevent) int tep_get_cpus(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->cpus; return tep->cpus;
return 0; return 0;
} }
/** /**
* tep_set_cpus - set the number of CPUs * tep_set_cpus - set the number of CPUs
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This sets the number of CPUs * This sets the number of CPUs
*/ */
void tep_set_cpus(struct tep_handle *pevent, int cpus) void tep_set_cpus(struct tep_handle *tep, int cpus)
{ {
if (pevent) if (tep)
pevent->cpus = cpus; tep->cpus = cpus;
} }
/** /**
* tep_get_long_size - get the size of a long integer on the traced machine * tep_get_long_size - get the size of a long integer on the traced machine
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns the size of a long integer on the traced machine * This returns the size of a long integer on the traced machine
* If @pevent is NULL, 0 is returned. * If @tep is NULL, 0 is returned.
*/ */
int tep_get_long_size(struct tep_handle *pevent) int tep_get_long_size(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->long_size; return tep->long_size;
return 0; return 0;
} }
/** /**
* tep_set_long_size - set the size of a long integer on the traced machine * tep_set_long_size - set the size of a long integer on the traced machine
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* @size: size, in bytes, of a long integer * @size: size, in bytes, of a long integer
* *
* This sets the size of a long integer on the traced machine * This sets the size of a long integer on the traced machine
*/ */
void tep_set_long_size(struct tep_handle *pevent, int long_size) void tep_set_long_size(struct tep_handle *tep, int long_size)
{ {
if (pevent) if (tep)
pevent->long_size = long_size; tep->long_size = long_size;
} }
/** /**
* tep_get_page_size - get the size of a memory page on the traced machine * tep_get_page_size - get the size of a memory page on the traced machine
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns the size of a memory page on the traced machine * This returns the size of a memory page on the traced machine
* If @pevent is NULL, 0 is returned. * If @tep is NULL, 0 is returned.
*/ */
int tep_get_page_size(struct tep_handle *pevent) int tep_get_page_size(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->page_size; return tep->page_size;
return 0; return 0;
} }
/** /**
* tep_set_page_size - set the size of a memory page on the traced machine * tep_set_page_size - set the size of a memory page on the traced machine
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* @_page_size: size of a memory page, in bytes * @_page_size: size of a memory page, in bytes
* *
* This sets the size of a memory page on the traced machine * This sets the size of a memory page on the traced machine
*/ */
void tep_set_page_size(struct tep_handle *pevent, int _page_size) void tep_set_page_size(struct tep_handle *tep, int _page_size)
{ {
if (pevent) if (tep)
pevent->page_size = _page_size; tep->page_size = _page_size;
} }
/** /**
* tep_is_file_bigendian - return the endian of the file * tep_is_file_bigendian - return the endian of the file
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns true if the file is in big endian order * This returns true if the file is in big endian order
* If @pevent is NULL, false is returned. * If @tep is NULL, false is returned.
*/ */
bool tep_is_file_bigendian(struct tep_handle *pevent) bool tep_is_file_bigendian(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->file_bigendian == TEP_BIG_ENDIAN; return (tep->file_bigendian == TEP_BIG_ENDIAN);
return false; return false;
} }
/** /**
* tep_set_file_bigendian - set if the file is in big endian order * tep_set_file_bigendian - set if the file is in big endian order
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* @endian: non zero, if the file is in big endian order * @endian: non zero, if the file is in big endian order
* *
* This sets if the file is in big endian order * This sets if the file is in big endian order
*/ */
void tep_set_file_bigendian(struct tep_handle *pevent, enum tep_endian endian) void tep_set_file_bigendian(struct tep_handle *tep, enum tep_endian endian)
{ {
if (pevent) if (tep)
pevent->file_bigendian = endian; tep->file_bigendian = endian;
} }
/** /**
* tep_is_local_bigendian - return the endian of the saved local machine * tep_is_local_bigendian - return the endian of the saved local machine
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns true if the saved local machine in @pevent is big endian. * This returns true if the saved local machine in @tep is big endian.
* If @pevent is NULL, false is returned. * If @tep is NULL, false is returned.
*/ */
bool tep_is_local_bigendian(struct tep_handle *pevent) bool tep_is_local_bigendian(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->host_bigendian == TEP_BIG_ENDIAN; return (tep->host_bigendian == TEP_BIG_ENDIAN);
return 0; return 0;
} }
/** /**
* tep_set_local_bigendian - set the stored local machine endian order * tep_set_local_bigendian - set the stored local machine endian order
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* @endian: non zero, if the local host has big endian order * @endian: non zero, if the local host has big endian order
* *
* This sets the endian order for the local machine. * This sets the endian order for the local machine.
*/ */
void tep_set_local_bigendian(struct tep_handle *pevent, enum tep_endian endian) void tep_set_local_bigendian(struct tep_handle *tep, enum tep_endian endian)
{ {
if (pevent) if (tep)
pevent->host_bigendian = endian; tep->host_bigendian = endian;
} }
/** /**
* tep_is_latency_format - get if the latency output format is configured * tep_is_latency_format - get if the latency output format is configured
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* *
* This returns true if the latency output format is configured * This returns true if the latency output format is configured
* If @pevent is NULL, false is returned. * If @tep is NULL, false is returned.
*/ */
bool tep_is_latency_format(struct tep_handle *pevent) bool tep_is_latency_format(struct tep_handle *tep)
{ {
if (pevent) if (tep)
return pevent->latency_format; return (tep->latency_format);
return false; return false;
} }
/** /**
* tep_set_latency_format - set the latency output format * tep_set_latency_format - set the latency output format
* @pevent: a handle to the tep_handle * @tep: a handle to the tep_handle
* @lat: non zero for latency output format * @lat: non zero for latency output format
* *
* This sets the latency output format * This sets the latency output format
*/ */
void tep_set_latency_format(struct tep_handle *pevent, int lat) void tep_set_latency_format(struct tep_handle *tep, int lat)
{ {
if (pevent) if (tep)
pevent->latency_format = lat; tep->latency_format = lat;
} }
/** /**
......
...@@ -92,8 +92,8 @@ struct tep_handle { ...@@ -92,8 +92,8 @@ struct tep_handle {
void tep_free_event(struct tep_event *event); void tep_free_event(struct tep_event *event);
void tep_free_format_field(struct tep_format_field *field); void tep_free_format_field(struct tep_format_field *field);
unsigned short tep_data2host2(struct tep_handle *pevent, unsigned short data); unsigned short tep_data2host2(struct tep_handle *tep, unsigned short data);
unsigned int tep_data2host4(struct tep_handle *pevent, unsigned int data); unsigned int tep_data2host4(struct tep_handle *tep, unsigned int data);
unsigned long long tep_data2host8(struct tep_handle *pevent, unsigned long long data); unsigned long long tep_data2host8(struct tep_handle *tep, unsigned long long data);
#endif /* _PARSE_EVENTS_INT_H */ #endif /* _PARSE_EVENTS_INT_H */
This diff is collapsed.
This diff is collapsed.
...@@ -419,16 +419,16 @@ load_plugins(struct tep_handle *pevent, const char *suffix, ...@@ -419,16 +419,16 @@ load_plugins(struct tep_handle *pevent, const char *suffix,
} }
struct tep_plugin_list* struct tep_plugin_list*
tep_load_plugins(struct tep_handle *pevent) tep_load_plugins(struct tep_handle *tep)
{ {
struct tep_plugin_list *list = NULL; struct tep_plugin_list *list = NULL;
load_plugins(pevent, ".so", load_plugin, &list); load_plugins(tep, ".so", load_plugin, &list);
return list; return list;
} }
void void
tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *pevent) tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *tep)
{ {
tep_plugin_unload_func func; tep_plugin_unload_func func;
struct tep_plugin_list *list; struct tep_plugin_list *list;
...@@ -438,7 +438,7 @@ tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *peven ...@@ -438,7 +438,7 @@ tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *peven
plugin_list = list->next; plugin_list = list->next;
func = dlsym(list->handle, TEP_PLUGIN_UNLOADER_NAME); func = dlsym(list->handle, TEP_PLUGIN_UNLOADER_NAME);
if (func) if (func)
func(pevent); func(tep);
dlclose(list->handle); dlclose(list->handle);
free(list->name); free(list->name);
free(list); free(list);
......
...@@ -164,9 +164,9 @@ add_filter_type(struct tep_event_filter *filter, int id) ...@@ -164,9 +164,9 @@ add_filter_type(struct tep_event_filter *filter, int id)
/** /**
* tep_filter_alloc - create a new event filter * tep_filter_alloc - create a new event filter
* @pevent: The pevent that this filter is associated with * @tep: The tep that this filter is associated with
*/ */
struct tep_event_filter *tep_filter_alloc(struct tep_handle *pevent) struct tep_event_filter *tep_filter_alloc(struct tep_handle *tep)
{ {
struct tep_event_filter *filter; struct tep_event_filter *filter;
...@@ -175,8 +175,8 @@ struct tep_event_filter *tep_filter_alloc(struct tep_handle *pevent) ...@@ -175,8 +175,8 @@ struct tep_event_filter *tep_filter_alloc(struct tep_handle *pevent)
return NULL; return NULL;
memset(filter, 0, sizeof(*filter)); memset(filter, 0, sizeof(*filter));
filter->pevent = pevent; filter->pevent = tep;
tep_ref(pevent); tep_ref(tep);
return filter; return filter;
} }
......
...@@ -25,9 +25,9 @@ process___le16_to_cpup(struct trace_seq *s, unsigned long long *args) ...@@ -25,9 +25,9 @@ process___le16_to_cpup(struct trace_seq *s, unsigned long long *args)
return val ? (long long) le16toh(*val) : 0; return val ? (long long) le16toh(*val) : 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_print_function(pevent, tep_register_print_function(tep,
process___le16_to_cpup, process___le16_to_cpup,
TEP_FUNC_ARG_INT, TEP_FUNC_ARG_INT,
"__le16_to_cpup", "__le16_to_cpup",
...@@ -36,8 +36,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -36,8 +36,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_print_function(pevent, process___le16_to_cpup, tep_unregister_print_function(tep, process___le16_to_cpup,
"__le16_to_cpup"); "__le16_to_cpup");
} }
...@@ -164,9 +164,9 @@ static int function_handler(struct trace_seq *s, struct tep_record *record, ...@@ -164,9 +164,9 @@ static int function_handler(struct trace_seq *s, struct tep_record *record,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_event_handler(pevent, -1, "ftrace", "function", tep_register_event_handler(tep, -1, "ftrace", "function",
function_handler, NULL); function_handler, NULL);
tep_plugin_add_options("ftrace", plugin_options); tep_plugin_add_options("ftrace", plugin_options);
...@@ -174,11 +174,11 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -174,11 +174,11 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
int i, x; int i, x;
tep_unregister_event_handler(pevent, -1, "ftrace", "function", tep_unregister_event_handler(tep, -1, "ftrace", "function",
function_handler, NULL); function_handler, NULL);
for (i = 0; i <= cpus; i++) { for (i = 0; i <= cpus; i++) {
......
...@@ -67,23 +67,23 @@ static int timer_start_handler(struct trace_seq *s, ...@@ -67,23 +67,23 @@ static int timer_start_handler(struct trace_seq *s,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_event_handler(pevent, -1, tep_register_event_handler(tep, -1,
"timer", "hrtimer_expire_entry", "timer", "hrtimer_expire_entry",
timer_expire_handler, NULL); timer_expire_handler, NULL);
tep_register_event_handler(pevent, -1, "timer", "hrtimer_start", tep_register_event_handler(tep, -1, "timer", "hrtimer_start",
timer_start_handler, NULL); timer_start_handler, NULL);
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_event_handler(pevent, -1, tep_unregister_event_handler(tep, -1,
"timer", "hrtimer_expire_entry", "timer", "hrtimer_expire_entry",
timer_expire_handler, NULL); timer_expire_handler, NULL);
tep_unregister_event_handler(pevent, -1, "timer", "hrtimer_start", tep_unregister_event_handler(tep, -1, "timer", "hrtimer_start",
timer_start_handler, NULL); timer_start_handler, NULL);
} }
...@@ -48,16 +48,16 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args) ...@@ -48,16 +48,16 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args)
return jiffies; return jiffies;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_print_function(pevent, tep_register_print_function(tep,
process_jbd2_dev_to_name, process_jbd2_dev_to_name,
TEP_FUNC_ARG_STRING, TEP_FUNC_ARG_STRING,
"jbd2_dev_to_name", "jbd2_dev_to_name",
TEP_FUNC_ARG_INT, TEP_FUNC_ARG_INT,
TEP_FUNC_ARG_VOID); TEP_FUNC_ARG_VOID);
tep_register_print_function(pevent, tep_register_print_function(tep,
process_jiffies_to_msecs, process_jiffies_to_msecs,
TEP_FUNC_ARG_LONG, TEP_FUNC_ARG_LONG,
"jiffies_to_msecs", "jiffies_to_msecs",
...@@ -66,11 +66,11 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -66,11 +66,11 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_print_function(pevent, process_jbd2_dev_to_name, tep_unregister_print_function(tep, process_jbd2_dev_to_name,
"jbd2_dev_to_name"); "jbd2_dev_to_name");
tep_unregister_print_function(pevent, process_jiffies_to_msecs, tep_unregister_print_function(tep, process_jiffies_to_msecs,
"jiffies_to_msecs"); "jiffies_to_msecs");
} }
...@@ -49,47 +49,47 @@ static int call_site_handler(struct trace_seq *s, struct tep_record *record, ...@@ -49,47 +49,47 @@ static int call_site_handler(struct trace_seq *s, struct tep_record *record,
return 1; return 1;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_event_handler(pevent, -1, "kmem", "kfree", tep_register_event_handler(tep, -1, "kmem", "kfree",
call_site_handler, NULL); call_site_handler, NULL);
tep_register_event_handler(pevent, -1, "kmem", "kmalloc", tep_register_event_handler(tep, -1, "kmem", "kmalloc",
call_site_handler, NULL); call_site_handler, NULL);
tep_register_event_handler(pevent, -1, "kmem", "kmalloc_node", tep_register_event_handler(tep, -1, "kmem", "kmalloc_node",
call_site_handler, NULL); call_site_handler, NULL);
tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", tep_register_event_handler(tep, -1, "kmem", "kmem_cache_alloc",
call_site_handler, NULL); call_site_handler, NULL);
tep_register_event_handler(pevent, -1, "kmem", tep_register_event_handler(tep, -1, "kmem",
"kmem_cache_alloc_node", "kmem_cache_alloc_node",
call_site_handler, NULL); call_site_handler, NULL);
tep_register_event_handler(pevent, -1, "kmem", "kmem_cache_free", tep_register_event_handler(tep, -1, "kmem", "kmem_cache_free",
call_site_handler, NULL); call_site_handler, NULL);
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_event_handler(pevent, -1, "kmem", "kfree", tep_unregister_event_handler(tep, -1, "kmem", "kfree",
call_site_handler, NULL); call_site_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc", tep_unregister_event_handler(tep, -1, "kmem", "kmalloc",
call_site_handler, NULL); call_site_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node", tep_unregister_event_handler(tep, -1, "kmem", "kmalloc_node",
call_site_handler, NULL); call_site_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", tep_unregister_event_handler(tep, -1, "kmem", "kmem_cache_alloc",
call_site_handler, NULL); call_site_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kmem", tep_unregister_event_handler(tep, -1, "kmem",
"kmem_cache_alloc_node", "kmem_cache_alloc_node",
call_site_handler, NULL); call_site_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free", tep_unregister_event_handler(tep, -1, "kmem", "kmem_cache_free",
call_site_handler, NULL); call_site_handler, NULL);
} }
...@@ -445,40 +445,40 @@ process_is_writable_pte(struct trace_seq *s, unsigned long long *args) ...@@ -445,40 +445,40 @@ process_is_writable_pte(struct trace_seq *s, unsigned long long *args)
return pte & PT_WRITABLE_MASK; return pte & PT_WRITABLE_MASK;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
init_disassembler(); init_disassembler();
tep_register_event_handler(pevent, -1, "kvm", "kvm_exit", tep_register_event_handler(tep, -1, "kvm", "kvm_exit",
kvm_exit_handler, NULL); kvm_exit_handler, NULL);
tep_register_event_handler(pevent, -1, "kvm", "kvm_emulate_insn", tep_register_event_handler(tep, -1, "kvm", "kvm_emulate_insn",
kvm_emulate_insn_handler, NULL); kvm_emulate_insn_handler, NULL);
tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit", tep_register_event_handler(tep, -1, "kvm", "kvm_nested_vmexit",
kvm_nested_vmexit_handler, NULL); kvm_nested_vmexit_handler, NULL);
tep_register_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject", tep_register_event_handler(tep, -1, "kvm", "kvm_nested_vmexit_inject",
kvm_nested_vmexit_inject_handler, NULL); kvm_nested_vmexit_inject_handler, NULL);
tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page", tep_register_event_handler(tep, -1, "kvmmmu", "kvm_mmu_get_page",
kvm_mmu_get_page_handler, NULL); kvm_mmu_get_page_handler, NULL);
tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page", tep_register_event_handler(tep, -1, "kvmmmu", "kvm_mmu_sync_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_register_event_handler(pevent, -1, tep_register_event_handler(tep, -1,
"kvmmmu", "kvm_mmu_unsync_page", "kvmmmu", "kvm_mmu_unsync_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_register_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page", tep_register_event_handler(tep, -1, "kvmmmu", "kvm_mmu_zap_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_register_event_handler(pevent, -1, "kvmmmu", tep_register_event_handler(tep, -1, "kvmmmu",
"kvm_mmu_prepare_zap_page", kvm_mmu_print_role, "kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
NULL); NULL);
tep_register_print_function(pevent, tep_register_print_function(tep,
process_is_writable_pte, process_is_writable_pte,
TEP_FUNC_ARG_INT, TEP_FUNC_ARG_INT,
"is_writable_pte", "is_writable_pte",
...@@ -487,37 +487,37 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -487,37 +487,37 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_event_handler(pevent, -1, "kvm", "kvm_exit", tep_unregister_event_handler(tep, -1, "kvm", "kvm_exit",
kvm_exit_handler, NULL); kvm_exit_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kvm", "kvm_emulate_insn", tep_unregister_event_handler(tep, -1, "kvm", "kvm_emulate_insn",
kvm_emulate_insn_handler, NULL); kvm_emulate_insn_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit", tep_unregister_event_handler(tep, -1, "kvm", "kvm_nested_vmexit",
kvm_nested_vmexit_handler, NULL); kvm_nested_vmexit_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kvm", "kvm_nested_vmexit_inject", tep_unregister_event_handler(tep, -1, "kvm", "kvm_nested_vmexit_inject",
kvm_nested_vmexit_inject_handler, NULL); kvm_nested_vmexit_inject_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_get_page", tep_unregister_event_handler(tep, -1, "kvmmmu", "kvm_mmu_get_page",
kvm_mmu_get_page_handler, NULL); kvm_mmu_get_page_handler, NULL);
tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_sync_page", tep_unregister_event_handler(tep, -1, "kvmmmu", "kvm_mmu_sync_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_unregister_event_handler(pevent, -1, tep_unregister_event_handler(tep, -1,
"kvmmmu", "kvm_mmu_unsync_page", "kvmmmu", "kvm_mmu_unsync_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_unregister_event_handler(pevent, -1, "kvmmmu", "kvm_mmu_zap_page", tep_unregister_event_handler(tep, -1, "kvmmmu", "kvm_mmu_zap_page",
kvm_mmu_print_role, NULL); kvm_mmu_print_role, NULL);
tep_unregister_event_handler(pevent, -1, "kvmmmu", tep_unregister_event_handler(tep, -1, "kvmmmu",
"kvm_mmu_prepare_zap_page", kvm_mmu_print_role, "kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
NULL); NULL);
tep_unregister_print_function(pevent, process_is_writable_pte, tep_unregister_print_function(tep, process_is_writable_pte,
"is_writable_pte"); "is_writable_pte");
} }
...@@ -87,17 +87,17 @@ static int drv_bss_info_changed(struct trace_seq *s, ...@@ -87,17 +87,17 @@ static int drv_bss_info_changed(struct trace_seq *s,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_event_handler(pevent, -1, "mac80211", tep_register_event_handler(tep, -1, "mac80211",
"drv_bss_info_changed", "drv_bss_info_changed",
drv_bss_info_changed, NULL); drv_bss_info_changed, NULL);
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_event_handler(pevent, -1, "mac80211", tep_unregister_event_handler(tep, -1, "mac80211",
"drv_bss_info_changed", "drv_bss_info_changed",
drv_bss_info_changed, NULL); drv_bss_info_changed, NULL);
} }
...@@ -135,27 +135,27 @@ static int sched_switch_handler(struct trace_seq *s, ...@@ -135,27 +135,27 @@ static int sched_switch_handler(struct trace_seq *s,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_event_handler(pevent, -1, "sched", "sched_switch", tep_register_event_handler(tep, -1, "sched", "sched_switch",
sched_switch_handler, NULL); sched_switch_handler, NULL);
tep_register_event_handler(pevent, -1, "sched", "sched_wakeup", tep_register_event_handler(tep, -1, "sched", "sched_wakeup",
sched_wakeup_handler, NULL); sched_wakeup_handler, NULL);
tep_register_event_handler(pevent, -1, "sched", "sched_wakeup_new", tep_register_event_handler(tep, -1, "sched", "sched_wakeup_new",
sched_wakeup_handler, NULL); sched_wakeup_handler, NULL);
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_event_handler(pevent, -1, "sched", "sched_switch", tep_unregister_event_handler(tep, -1, "sched", "sched_switch",
sched_switch_handler, NULL); sched_switch_handler, NULL);
tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup", tep_unregister_event_handler(tep, -1, "sched", "sched_wakeup",
sched_wakeup_handler, NULL); sched_wakeup_handler, NULL);
tep_unregister_event_handler(pevent, -1, "sched", "sched_wakeup_new", tep_unregister_event_handler(tep, -1, "sched", "sched_wakeup_new",
sched_wakeup_handler, NULL); sched_wakeup_handler, NULL);
} }
...@@ -414,9 +414,9 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s, ...@@ -414,9 +414,9 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_print_function(pevent, tep_register_print_function(tep,
process_scsi_trace_parse_cdb, process_scsi_trace_parse_cdb,
TEP_FUNC_ARG_STRING, TEP_FUNC_ARG_STRING,
"scsi_trace_parse_cdb", "scsi_trace_parse_cdb",
...@@ -427,8 +427,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -427,8 +427,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_print_function(pevent, process_scsi_trace_parse_cdb, tep_unregister_print_function(tep, process_scsi_trace_parse_cdb,
"scsi_trace_parse_cdb"); "scsi_trace_parse_cdb");
} }
...@@ -120,9 +120,9 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s, ...@@ -120,9 +120,9 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s,
return 0; return 0;
} }
int TEP_PLUGIN_LOADER(struct tep_handle *pevent) int TEP_PLUGIN_LOADER(struct tep_handle *tep)
{ {
tep_register_print_function(pevent, tep_register_print_function(tep,
process_xen_hypercall_name, process_xen_hypercall_name,
TEP_FUNC_ARG_STRING, TEP_FUNC_ARG_STRING,
"xen_hypercall_name", "xen_hypercall_name",
...@@ -131,8 +131,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent) ...@@ -131,8 +131,8 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
return 0; return 0;
} }
void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) void TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
{ {
tep_unregister_print_function(pevent, process_xen_hypercall_name, tep_unregister_print_function(tep, process_xen_hypercall_name,
"xen_hypercall_name"); "xen_hypercall_name");
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment