提交 096177a8 编写于 作者: T Tzvetomir Stoyanov (VMware) 提交者: Arnaldo Carvalho de Melo

tools lib traceevent, perf tools: Rename struct pevent to struct tep_handle

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
the struct pevent to struct tep_handle.
Signed-off-by: NTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
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/20180808180659.706175783@goodmis.orgSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 354b064b
此差异已折叠。
...@@ -98,7 +98,7 @@ extern int trace_seq_do_printf(struct trace_seq *s); ...@@ -98,7 +98,7 @@ extern int trace_seq_do_printf(struct trace_seq *s);
/* ----------------------- pevent ----------------------- */ /* ----------------------- pevent ----------------------- */
struct pevent; struct tep_handle;
struct event_format; struct event_format;
typedef int (*pevent_event_handler_func)(struct trace_seq *s, 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,8 +106,8 @@ typedef int (*pevent_event_handler_func)(struct trace_seq *s,
struct event_format *event, struct event_format *event,
void *context); void *context);
typedef int (*pevent_plugin_load_func)(struct pevent *pevent); typedef int (*pevent_plugin_load_func)(struct tep_handle *pevent);
typedef int (*pevent_plugin_unload_func)(struct pevent *pevent); typedef int (*pevent_plugin_unload_func)(struct tep_handle *pevent);
struct pevent_plugin_option { struct pevent_plugin_option {
struct pevent_plugin_option *next; struct pevent_plugin_option *next;
...@@ -127,12 +127,12 @@ struct pevent_plugin_option { ...@@ -127,12 +127,12 @@ struct pevent_plugin_option {
* PEVENT_PLUGIN_LOADER: (required) * PEVENT_PLUGIN_LOADER: (required)
* The function name to initialized the plugin. * The function name to initialized the plugin.
* *
* int PEVENT_PLUGIN_LOADER(struct pevent *pevent) * int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
* *
* PEVENT_PLUGIN_UNLOADER: (optional) * PEVENT_PLUGIN_UNLOADER: (optional)
* The function called just before unloading * The function called just before unloading
* *
* int PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) * int PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
* *
* PEVENT_PLUGIN_OPTIONS: (optional) * PEVENT_PLUGIN_OPTIONS: (optional)
* Plugin options that can be set before loading * Plugin options that can be set before loading
...@@ -320,7 +320,7 @@ struct print_fmt { ...@@ -320,7 +320,7 @@ struct print_fmt {
}; };
struct event_format { struct event_format {
struct pevent *pevent; struct tep_handle *pevent;
char *name; char *name;
int id; int id;
int flags; int flags;
...@@ -435,9 +435,9 @@ struct plugin_list; ...@@ -435,9 +435,9 @@ struct plugin_list;
#define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1))
struct plugin_list *traceevent_load_plugins(struct pevent *pevent); struct plugin_list *traceevent_load_plugins(struct tep_handle *pevent);
void traceevent_unload_plugins(struct plugin_list *plugin_list, void traceevent_unload_plugins(struct plugin_list *plugin_list,
struct pevent *pevent); struct tep_handle *pevent);
char **traceevent_plugin_list_options(void); char **traceevent_plugin_list_options(void);
void traceevent_plugin_free_options_list(char **list); void traceevent_plugin_free_options_list(char **list);
int traceevent_plugin_add_options(const char *name, int traceevent_plugin_add_options(const char *name,
...@@ -457,7 +457,7 @@ struct func_resolver; ...@@ -457,7 +457,7 @@ struct func_resolver;
typedef char *(pevent_func_resolver_t)(void *priv, typedef char *(pevent_func_resolver_t)(void *priv,
unsigned long long *addrp, char **modp); unsigned long long *addrp, char **modp);
struct pevent { struct tep_handle {
int ref_count; int ref_count;
int header_page_ts_offset; int header_page_ts_offset;
...@@ -532,13 +532,13 @@ struct pevent { ...@@ -532,13 +532,13 @@ struct pevent {
char *trace_clock; char *trace_clock;
}; };
static inline void pevent_set_flag(struct pevent *pevent, int flag) static inline void pevent_set_flag(struct tep_handle *pevent, int flag)
{ {
pevent->flags |= flag; pevent->flags |= flag;
} }
static inline unsigned short static inline unsigned short
__data2host2(struct pevent *pevent, unsigned short data) __data2host2(struct tep_handle *pevent, unsigned short data)
{ {
unsigned short swap; unsigned short swap;
...@@ -552,7 +552,7 @@ __data2host2(struct pevent *pevent, unsigned short data) ...@@ -552,7 +552,7 @@ __data2host2(struct pevent *pevent, unsigned short data)
} }
static inline unsigned int static inline unsigned int
__data2host4(struct pevent *pevent, unsigned int data) __data2host4(struct tep_handle *pevent, unsigned int data)
{ {
unsigned int swap; unsigned int swap;
...@@ -568,7 +568,7 @@ __data2host4(struct pevent *pevent, unsigned int data) ...@@ -568,7 +568,7 @@ __data2host4(struct pevent *pevent, unsigned int data)
} }
static inline unsigned long long static inline unsigned long long
__data2host8(struct pevent *pevent, unsigned long long data) __data2host8(struct tep_handle *pevent, unsigned long long data)
{ {
unsigned long long swap; unsigned long long swap;
...@@ -615,36 +615,36 @@ enum trace_flag_type { ...@@ -615,36 +615,36 @@ enum trace_flag_type {
TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_SOFTIRQ = 0x10,
}; };
int pevent_set_function_resolver(struct pevent *pevent, int pevent_set_function_resolver(struct tep_handle *pevent,
pevent_func_resolver_t *func, void *priv); pevent_func_resolver_t *func, void *priv);
void pevent_reset_function_resolver(struct pevent *pevent); void pevent_reset_function_resolver(struct tep_handle *pevent);
int pevent_register_comm(struct pevent *pevent, const char *comm, int pid); int pevent_register_comm(struct tep_handle *pevent, const char *comm, int pid);
int pevent_register_trace_clock(struct pevent *pevent, const char *trace_clock); int pevent_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
int pevent_register_function(struct pevent *pevent, char *name, int pevent_register_function(struct tep_handle *pevent, char *name,
unsigned long long addr, char *mod); unsigned long long addr, char *mod);
int pevent_register_print_string(struct pevent *pevent, const char *fmt, int pevent_register_print_string(struct tep_handle *pevent, const char *fmt,
unsigned long long addr); unsigned long long addr);
int pevent_pid_is_registered(struct pevent *pevent, int pid); int pevent_pid_is_registered(struct tep_handle *pevent, int pid);
void pevent_print_event_task(struct pevent *pevent, struct trace_seq *s, void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event, struct event_format *event,
struct pevent_record *record); struct pevent_record *record);
void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s, void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event, struct event_format *event,
struct pevent_record *record, struct pevent_record *record,
bool use_trace_clock); bool use_trace_clock);
void pevent_print_event_data(struct pevent *pevent, struct trace_seq *s, void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event, struct event_format *event,
struct pevent_record *record); struct pevent_record *record);
void pevent_print_event(struct pevent *pevent, struct trace_seq *s, void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s,
struct pevent_record *record, bool use_trace_clock); struct pevent_record *record, bool use_trace_clock);
int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size, int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size,
int long_size); int long_size);
enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf, enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf,
unsigned long size, const char *sys); unsigned long size, const char *sys);
enum pevent_errno pevent_parse_format(struct pevent *pevent, enum pevent_errno pevent_parse_format(struct tep_handle *pevent,
struct event_format **eventp, struct event_format **eventp,
const char *buf, const char *buf,
unsigned long size, const char *sys); unsigned long size, const char *sys);
...@@ -673,50 +673,50 @@ int pevent_print_func_field(struct trace_seq *s, const char *fmt, ...@@ -673,50 +673,50 @@ int pevent_print_func_field(struct trace_seq *s, const char *fmt,
struct event_format *event, const char *name, struct event_format *event, const char *name,
struct pevent_record *record, int err); struct pevent_record *record, int err);
int pevent_register_event_handler(struct pevent *pevent, int id, int pevent_register_event_handler(struct tep_handle *pevent, int id,
const char *sys_name, const char *event_name, const char *sys_name, const char *event_name,
pevent_event_handler_func func, void *context); pevent_event_handler_func func, void *context);
int pevent_unregister_event_handler(struct pevent *pevent, int id, int pevent_unregister_event_handler(struct tep_handle *pevent, int id,
const char *sys_name, const char *event_name, const char *sys_name, const char *event_name,
pevent_event_handler_func func, void *context); pevent_event_handler_func func, void *context);
int pevent_register_print_function(struct pevent *pevent, int pevent_register_print_function(struct tep_handle *pevent,
pevent_func_handler func, pevent_func_handler func,
enum pevent_func_arg_type ret_type, enum pevent_func_arg_type ret_type,
char *name, ...); char *name, ...);
int pevent_unregister_print_function(struct pevent *pevent, int pevent_unregister_print_function(struct tep_handle *pevent,
pevent_func_handler func, char *name); pevent_func_handler func, char *name);
struct format_field *pevent_find_common_field(struct event_format *event, const char *name); struct format_field *pevent_find_common_field(struct event_format *event, const char *name);
struct format_field *pevent_find_field(struct event_format *event, const char *name); struct format_field *pevent_find_field(struct event_format *event, const char *name);
struct format_field *pevent_find_any_field(struct event_format *event, const char *name); struct format_field *pevent_find_any_field(struct event_format *event, const char *name);
const char *pevent_find_function(struct pevent *pevent, unsigned long long addr); const char *pevent_find_function(struct tep_handle *pevent, unsigned long long addr);
unsigned long long unsigned long long
pevent_find_function_address(struct pevent *pevent, unsigned long long addr); pevent_find_function_address(struct tep_handle *pevent, unsigned long long addr);
unsigned long long pevent_read_number(struct pevent *pevent, const void *ptr, int size); unsigned long long pevent_read_number(struct tep_handle *pevent, const void *ptr, int size);
int pevent_read_number_field(struct format_field *field, const void *data, int pevent_read_number_field(struct format_field *field, const void *data,
unsigned long long *value); unsigned long long *value);
struct event_format *pevent_find_event(struct pevent *pevent, int id); struct event_format *pevent_find_event(struct tep_handle *pevent, int id);
struct event_format * struct event_format *
pevent_find_event_by_name(struct pevent *pevent, const char *sys, const char *name); pevent_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name);
struct event_format * struct event_format *
pevent_find_event_by_record(struct pevent *pevent, struct pevent_record *record); pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *record);
void pevent_data_lat_fmt(struct pevent *pevent, void pevent_data_lat_fmt(struct tep_handle *pevent,
struct trace_seq *s, struct pevent_record *record); struct trace_seq *s, struct pevent_record *record);
int pevent_data_type(struct pevent *pevent, struct pevent_record *rec); int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec);
struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type); struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type);
int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec); int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec);
int pevent_data_preempt_count(struct pevent *pevent, struct pevent_record *rec); int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec);
int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec); int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec);
const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid); const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid);
struct cmdline; struct cmdline;
struct cmdline *pevent_data_pid_from_comm(struct pevent *pevent, const char *comm, struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm,
struct cmdline *next); struct cmdline *next);
int pevent_cmdline_pid(struct pevent *pevent, struct cmdline *cmdline); int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline);
void pevent_print_field(struct trace_seq *s, void *data, void pevent_print_field(struct trace_seq *s, void *data,
struct format_field *field); struct format_field *field);
...@@ -724,77 +724,77 @@ void pevent_print_fields(struct trace_seq *s, void *data, ...@@ -724,77 +724,77 @@ void pevent_print_fields(struct trace_seq *s, void *data,
int size __maybe_unused, struct event_format *event); int size __maybe_unused, struct event_format *event);
void pevent_event_info(struct trace_seq *s, struct event_format *event, void pevent_event_info(struct trace_seq *s, struct event_format *event,
struct pevent_record *record); struct pevent_record *record);
int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, int pevent_strerror(struct tep_handle *pevent, enum pevent_errno errnum,
char *buf, size_t buflen); char *buf, size_t buflen);
struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type); struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_sort_type);
struct format_field **pevent_event_common_fields(struct event_format *event); struct format_field **pevent_event_common_fields(struct event_format *event);
struct format_field **pevent_event_fields(struct event_format *event); struct format_field **pevent_event_fields(struct event_format *event);
static inline int pevent_get_cpus(struct pevent *pevent) static inline int pevent_get_cpus(struct tep_handle *pevent)
{ {
return pevent->cpus; return pevent->cpus;
} }
static inline void pevent_set_cpus(struct pevent *pevent, int cpus) static inline void pevent_set_cpus(struct tep_handle *pevent, int cpus)
{ {
pevent->cpus = cpus; pevent->cpus = cpus;
} }
static inline int pevent_get_long_size(struct pevent *pevent) static inline int pevent_get_long_size(struct tep_handle *pevent)
{ {
return pevent->long_size; return pevent->long_size;
} }
static inline void pevent_set_long_size(struct pevent *pevent, int long_size) static inline void pevent_set_long_size(struct tep_handle *pevent, int long_size)
{ {
pevent->long_size = long_size; pevent->long_size = long_size;
} }
static inline int pevent_get_page_size(struct pevent *pevent) static inline int pevent_get_page_size(struct tep_handle *pevent)
{ {
return pevent->page_size; return pevent->page_size;
} }
static inline void pevent_set_page_size(struct pevent *pevent, int _page_size) static inline void pevent_set_page_size(struct tep_handle *pevent, int _page_size)
{ {
pevent->page_size = _page_size; pevent->page_size = _page_size;
} }
static inline int pevent_is_file_bigendian(struct pevent *pevent) static inline int pevent_is_file_bigendian(struct tep_handle *pevent)
{ {
return pevent->file_bigendian; return pevent->file_bigendian;
} }
static inline void pevent_set_file_bigendian(struct pevent *pevent, int endian) static inline void pevent_set_file_bigendian(struct tep_handle *pevent, int endian)
{ {
pevent->file_bigendian = endian; pevent->file_bigendian = endian;
} }
static inline int pevent_is_host_bigendian(struct pevent *pevent) static inline int pevent_is_host_bigendian(struct tep_handle *pevent)
{ {
return pevent->host_bigendian; return pevent->host_bigendian;
} }
static inline void pevent_set_host_bigendian(struct pevent *pevent, int endian) static inline void pevent_set_host_bigendian(struct tep_handle *pevent, int endian)
{ {
pevent->host_bigendian = endian; pevent->host_bigendian = endian;
} }
static inline int pevent_is_latency_format(struct pevent *pevent) static inline int pevent_is_latency_format(struct tep_handle *pevent)
{ {
return pevent->latency_format; return pevent->latency_format;
} }
static inline void pevent_set_latency_format(struct pevent *pevent, int lat) static inline void pevent_set_latency_format(struct tep_handle *pevent, int lat)
{ {
pevent->latency_format = lat; pevent->latency_format = lat;
} }
struct pevent *pevent_alloc(void); struct tep_handle *pevent_alloc(void);
void pevent_free(struct pevent *pevent); void pevent_free(struct tep_handle *pevent);
void pevent_ref(struct pevent *pevent); void pevent_ref(struct tep_handle *pevent);
void pevent_unref(struct pevent *pevent); void pevent_unref(struct tep_handle *pevent);
/* access to the internal parser */ /* access to the internal parser */
void pevent_buffer_init(const char *buf, unsigned long long size); void pevent_buffer_init(const char *buf, unsigned long long size);
...@@ -805,8 +805,8 @@ const char *pevent_get_input_buf(void); ...@@ -805,8 +805,8 @@ const char *pevent_get_input_buf(void);
unsigned long long pevent_get_input_buf_ptr(void); unsigned long long pevent_get_input_buf_ptr(void);
/* for debugging */ /* for debugging */
void pevent_print_funcs(struct pevent *pevent); void pevent_print_funcs(struct tep_handle *pevent);
void pevent_print_printk(struct pevent *pevent); void pevent_print_printk(struct tep_handle *pevent);
/* ----------------------- filtering ----------------------- */ /* ----------------------- filtering ----------------------- */
...@@ -933,13 +933,13 @@ struct filter_type { ...@@ -933,13 +933,13 @@ struct filter_type {
#define PEVENT_FILTER_ERROR_BUFSZ 1024 #define PEVENT_FILTER_ERROR_BUFSZ 1024
struct event_filter { struct event_filter {
struct pevent *pevent; struct tep_handle *pevent;
int filters; int filters;
struct filter_type *event_filters; struct filter_type *event_filters;
char error_buffer[PEVENT_FILTER_ERROR_BUFSZ]; char error_buffer[PEVENT_FILTER_ERROR_BUFSZ];
}; };
struct event_filter *pevent_filter_alloc(struct pevent *pevent); struct event_filter *pevent_filter_alloc(struct tep_handle *pevent);
/* for backward compatibility */ /* for backward compatibility */
#define FILTER_NONE PEVENT_ERRNO__NO_FILTER #define FILTER_NONE PEVENT_ERRNO__NO_FILTER
......
...@@ -281,7 +281,7 @@ void traceevent_print_plugins(struct trace_seq *s, ...@@ -281,7 +281,7 @@ void traceevent_print_plugins(struct trace_seq *s,
} }
static void static void
load_plugin(struct pevent *pevent, const char *path, load_plugin(struct tep_handle *pevent, const char *path,
const char *file, void *data) const char *file, void *data)
{ {
struct plugin_list **plugin_list = data; struct plugin_list **plugin_list = data;
...@@ -336,9 +336,9 @@ load_plugin(struct pevent *pevent, const char *path, ...@@ -336,9 +336,9 @@ load_plugin(struct pevent *pevent, const char *path,
} }
static void static void
load_plugins_dir(struct pevent *pevent, const char *suffix, load_plugins_dir(struct tep_handle *pevent, const char *suffix,
const char *path, const char *path,
void (*load_plugin)(struct pevent *pevent, void (*load_plugin)(struct tep_handle *pevent,
const char *path, const char *path,
const char *name, const char *name,
void *data), void *data),
...@@ -378,8 +378,8 @@ load_plugins_dir(struct pevent *pevent, const char *suffix, ...@@ -378,8 +378,8 @@ load_plugins_dir(struct pevent *pevent, const char *suffix,
} }
static void static void
load_plugins(struct pevent *pevent, const char *suffix, load_plugins(struct tep_handle *pevent, const char *suffix,
void (*load_plugin)(struct pevent *pevent, void (*load_plugin)(struct tep_handle *pevent,
const char *path, const char *path,
const char *name, const char *name,
void *data), void *data),
...@@ -431,7 +431,7 @@ load_plugins(struct pevent *pevent, const char *suffix, ...@@ -431,7 +431,7 @@ load_plugins(struct pevent *pevent, const char *suffix,
} }
struct plugin_list* struct plugin_list*
traceevent_load_plugins(struct pevent *pevent) traceevent_load_plugins(struct tep_handle *pevent)
{ {
struct plugin_list *list = NULL; struct plugin_list *list = NULL;
...@@ -440,7 +440,7 @@ traceevent_load_plugins(struct pevent *pevent) ...@@ -440,7 +440,7 @@ traceevent_load_plugins(struct pevent *pevent)
} }
void void
traceevent_unload_plugins(struct plugin_list *plugin_list, struct pevent *pevent) traceevent_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent)
{ {
pevent_plugin_unload_func func; pevent_plugin_unload_func func;
struct plugin_list *list; struct plugin_list *list;
......
...@@ -179,7 +179,7 @@ add_filter_type(struct event_filter *filter, int id) ...@@ -179,7 +179,7 @@ add_filter_type(struct event_filter *filter, int id)
* pevent_filter_alloc - create a new event filter * pevent_filter_alloc - create a new event filter
* @pevent: The pevent that this filter is associated with * @pevent: The pevent that this filter is associated with
*/ */
struct event_filter *pevent_filter_alloc(struct pevent *pevent) struct event_filter *pevent_filter_alloc(struct tep_handle *pevent)
{ {
struct event_filter *filter; struct event_filter *filter;
...@@ -269,7 +269,7 @@ static int event_match(struct event_format *event, ...@@ -269,7 +269,7 @@ static int event_match(struct event_format *event,
} }
static enum pevent_errno static enum pevent_errno
find_event(struct pevent *pevent, struct event_list **events, find_event(struct tep_handle *pevent, struct event_list **events,
char *sys_name, char *event_name) char *sys_name, char *event_name)
{ {
struct event_format *event; struct event_format *event;
...@@ -1270,7 +1270,7 @@ static void filter_init_error_buf(struct event_filter *filter) ...@@ -1270,7 +1270,7 @@ static void filter_init_error_buf(struct event_filter *filter)
enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter, enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter,
const char *filter_str) const char *filter_str)
{ {
struct pevent *pevent = filter->pevent; struct tep_handle *pevent = filter->pevent;
struct event_list *event; struct event_list *event;
struct event_list *events = NULL; struct event_list *events = NULL;
const char *filter_start; const char *filter_start;
...@@ -1550,8 +1550,8 @@ int pevent_filter_copy(struct event_filter *dest, struct event_filter *source) ...@@ -1550,8 +1550,8 @@ int pevent_filter_copy(struct event_filter *dest, struct event_filter *source)
int pevent_update_trivial(struct event_filter *dest, struct event_filter *source, int pevent_update_trivial(struct event_filter *dest, struct event_filter *source,
enum filter_trivial_type type) enum filter_trivial_type type)
{ {
struct pevent *src_pevent; struct tep_handle *src_pevent;
struct pevent *dest_pevent; struct tep_handle *dest_pevent;
struct event_format *event; struct event_format *event;
struct filter_type *filter_type; struct filter_type *filter_type;
struct filter_arg *arg; struct filter_arg *arg;
...@@ -1874,7 +1874,7 @@ static int test_num(struct event_format *event, struct filter_arg *arg, ...@@ -1874,7 +1874,7 @@ static int test_num(struct event_format *event, struct filter_arg *arg,
static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record) static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record)
{ {
struct event_format *event; struct event_format *event;
struct pevent *pevent; struct tep_handle *pevent;
unsigned long long addr; unsigned long long addr;
const char *val = NULL; const char *val = NULL;
unsigned int size; unsigned int size;
...@@ -2049,7 +2049,7 @@ int pevent_event_filtered(struct event_filter *filter, int event_id) ...@@ -2049,7 +2049,7 @@ int pevent_event_filtered(struct event_filter *filter, int event_id)
enum pevent_errno pevent_filter_match(struct event_filter *filter, enum pevent_errno pevent_filter_match(struct event_filter *filter,
struct pevent_record *record) struct pevent_record *record)
{ {
struct pevent *pevent = filter->pevent; struct tep_handle *pevent = filter->pevent;
struct filter_type *filter_type; struct filter_type *filter_type;
int event_id; int event_id;
int ret; int ret;
......
...@@ -25,7 +25,7 @@ process___le16_to_cpup(struct trace_seq *s, unsigned long long *args) ...@@ -25,7 +25,7 @@ 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 PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_print_function(pevent, pevent_register_print_function(pevent,
process___le16_to_cpup, process___le16_to_cpup,
...@@ -36,7 +36,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -36,7 +36,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_print_function(pevent, process___le16_to_cpup, pevent_unregister_print_function(pevent, process___le16_to_cpup,
"__le16_to_cpup"); "__le16_to_cpup");
......
...@@ -125,7 +125,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu) ...@@ -125,7 +125,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu)
static int function_handler(struct trace_seq *s, struct pevent_record *record, static int function_handler(struct trace_seq *s, struct pevent_record *record,
struct event_format *event, void *context) struct event_format *event, void *context)
{ {
struct pevent *pevent = event->pevent; struct tep_handle *pevent = event->pevent;
unsigned long long function; unsigned long long function;
unsigned long long pfunction; unsigned long long pfunction;
const char *func; const char *func;
...@@ -163,7 +163,7 @@ static int function_handler(struct trace_seq *s, struct pevent_record *record, ...@@ -163,7 +163,7 @@ static int function_handler(struct trace_seq *s, struct pevent_record *record,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_event_handler(pevent, -1, "ftrace", "function", pevent_register_event_handler(pevent, -1, "ftrace", "function",
function_handler, NULL); function_handler, NULL);
...@@ -173,7 +173,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -173,7 +173,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
int i, x; int i, x;
......
...@@ -66,7 +66,7 @@ static int timer_start_handler(struct trace_seq *s, ...@@ -66,7 +66,7 @@ static int timer_start_handler(struct trace_seq *s,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_event_handler(pevent, -1, pevent_register_event_handler(pevent, -1,
"timer", "hrtimer_expire_entry", "timer", "hrtimer_expire_entry",
...@@ -77,7 +77,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -77,7 +77,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_event_handler(pevent, -1, pevent_unregister_event_handler(pevent, -1,
"timer", "hrtimer_expire_entry", "timer", "hrtimer_expire_entry",
......
...@@ -47,7 +47,7 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args) ...@@ -47,7 +47,7 @@ process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args)
return jiffies; return jiffies;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_print_function(pevent, pevent_register_print_function(pevent,
process_jbd2_dev_to_name, process_jbd2_dev_to_name,
...@@ -65,7 +65,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -65,7 +65,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_print_function(pevent, process_jbd2_dev_to_name, pevent_unregister_print_function(pevent, process_jbd2_dev_to_name,
"jbd2_dev_to_name"); "jbd2_dev_to_name");
......
...@@ -48,7 +48,7 @@ static int call_site_handler(struct trace_seq *s, struct pevent_record *record, ...@@ -48,7 +48,7 @@ static int call_site_handler(struct trace_seq *s, struct pevent_record *record,
return 1; return 1;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_event_handler(pevent, -1, "kmem", "kfree", pevent_register_event_handler(pevent, -1, "kmem", "kfree",
call_site_handler, NULL); call_site_handler, NULL);
...@@ -71,7 +71,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -71,7 +71,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_event_handler(pevent, -1, "kmem", "kfree", pevent_unregister_event_handler(pevent, -1, "kmem", "kfree",
call_site_handler, NULL); call_site_handler, NULL);
......
...@@ -444,7 +444,7 @@ process_is_writable_pte(struct trace_seq *s, unsigned long long *args) ...@@ -444,7 +444,7 @@ process_is_writable_pte(struct trace_seq *s, unsigned long long *args)
return pte & PT_WRITABLE_MASK; return pte & PT_WRITABLE_MASK;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
init_disassembler(); init_disassembler();
...@@ -486,7 +486,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -486,7 +486,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit", pevent_unregister_event_handler(pevent, -1, "kvm", "kvm_exit",
kvm_exit_handler, NULL); kvm_exit_handler, NULL);
......
...@@ -86,7 +86,7 @@ static int drv_bss_info_changed(struct trace_seq *s, ...@@ -86,7 +86,7 @@ static int drv_bss_info_changed(struct trace_seq *s,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_event_handler(pevent, -1, "mac80211", pevent_register_event_handler(pevent, -1, "mac80211",
"drv_bss_info_changed", "drv_bss_info_changed",
...@@ -94,7 +94,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -94,7 +94,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_event_handler(pevent, -1, "mac80211", pevent_unregister_event_handler(pevent, -1, "mac80211",
"drv_bss_info_changed", "drv_bss_info_changed",
......
...@@ -134,7 +134,7 @@ static int sched_switch_handler(struct trace_seq *s, ...@@ -134,7 +134,7 @@ static int sched_switch_handler(struct trace_seq *s,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_event_handler(pevent, -1, "sched", "sched_switch", pevent_register_event_handler(pevent, -1, "sched", "sched_switch",
sched_switch_handler, NULL); sched_switch_handler, NULL);
...@@ -147,7 +147,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -147,7 +147,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch", pevent_unregister_event_handler(pevent, -1, "sched", "sched_switch",
sched_switch_handler, NULL); sched_switch_handler, NULL);
......
...@@ -413,7 +413,7 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s, ...@@ -413,7 +413,7 @@ unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_print_function(pevent, pevent_register_print_function(pevent,
process_scsi_trace_parse_cdb, process_scsi_trace_parse_cdb,
...@@ -426,7 +426,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -426,7 +426,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb, pevent_unregister_print_function(pevent, process_scsi_trace_parse_cdb,
"scsi_trace_parse_cdb"); "scsi_trace_parse_cdb");
......
...@@ -119,7 +119,7 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s, ...@@ -119,7 +119,7 @@ unsigned long long process_xen_hypercall_name(struct trace_seq *s,
return 0; return 0;
} }
int PEVENT_PLUGIN_LOADER(struct pevent *pevent) int PEVENT_PLUGIN_LOADER(struct tep_handle *pevent)
{ {
pevent_register_print_function(pevent, pevent_register_print_function(pevent,
process_xen_hypercall_name, process_xen_hypercall_name,
...@@ -130,7 +130,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent) ...@@ -130,7 +130,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
return 0; return 0;
} }
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) void PEVENT_PLUGIN_UNLOADER(struct tep_handle *pevent)
{ {
pevent_unregister_print_function(pevent, process_xen_hypercall_name, pevent_unregister_print_function(pevent, process_xen_hypercall_name,
"xen_hypercall_name"); "xen_hypercall_name");
......
...@@ -3204,7 +3204,7 @@ static int read_attr(int fd, struct perf_header *ph, ...@@ -3204,7 +3204,7 @@ static int read_attr(int fd, struct perf_header *ph,
} }
static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel, static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel,
struct pevent *pevent) struct tep_handle *pevent)
{ {
struct event_format *event; struct event_format *event;
char bf[128]; char bf[128];
...@@ -3236,7 +3236,7 @@ static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel, ...@@ -3236,7 +3236,7 @@ static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel,
} }
static int perf_evlist__prepare_tracepoint_events(struct perf_evlist *evlist, static int perf_evlist__prepare_tracepoint_events(struct perf_evlist *evlist,
struct pevent *pevent) struct tep_handle *pevent)
{ {
struct perf_evsel *pos; struct perf_evsel *pos;
......
...@@ -341,7 +341,7 @@ static bool is_tracepoint(struct pyrf_event *pevent) ...@@ -341,7 +341,7 @@ static bool is_tracepoint(struct pyrf_event *pevent)
static PyObject* static PyObject*
tracepoint_field(struct pyrf_event *pe, struct format_field *field) tracepoint_field(struct pyrf_event *pe, struct format_field *field)
{ {
struct pevent *pevent = field->event->pevent; struct tep_handle *pevent = field->event->pevent;
void *data = pe->sample.raw_data; void *data = pe->sample.raw_data;
PyObject *ret = NULL; PyObject *ret = NULL;
unsigned long long val; unsigned long long val;
......
...@@ -535,7 +535,7 @@ static int perl_stop_script(void) ...@@ -535,7 +535,7 @@ static int perl_stop_script(void)
return 0; return 0;
} }
static int perl_generate_script(struct pevent *pevent, const char *outfile) static int perl_generate_script(struct tep_handle *pevent, const char *outfile)
{ {
struct event_format *event = NULL; struct event_format *event = NULL;
struct format_field *f; struct format_field *f;
......
...@@ -1588,7 +1588,7 @@ static int python_stop_script(void) ...@@ -1588,7 +1588,7 @@ static int python_stop_script(void)
return 0; return 0;
} }
static int python_generate_script(struct pevent *pevent, const char *outfile) static int python_generate_script(struct tep_handle *pevent, const char *outfile)
{ {
struct event_format *event = NULL; struct event_format *event = NULL;
struct format_field *f; struct format_field *f;
......
...@@ -276,7 +276,7 @@ extern struct sort_entry sort_thread; ...@@ -276,7 +276,7 @@ extern struct sort_entry sort_thread;
extern struct list_head hist_entry__sort_list; extern struct list_head hist_entry__sort_list;
struct perf_evlist; struct perf_evlist;
struct pevent; struct tep_handle;
int setup_sorting(struct perf_evlist *evlist); int setup_sorting(struct perf_evlist *evlist);
int setup_output_field(void); int setup_output_field(void);
void reset_output_field(void); void reset_output_field(void);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static int get_common_field(struct scripting_context *context, static int get_common_field(struct scripting_context *context,
int *offset, int *size, const char *type) int *offset, int *size, const char *type)
{ {
struct pevent *pevent = context->pevent; struct tep_handle *pevent = context->pevent;
struct event_format *event; struct event_format *event;
struct format_field *field; struct format_field *field;
...@@ -136,7 +136,7 @@ void event_format__print(struct event_format *event, ...@@ -136,7 +136,7 @@ void event_format__print(struct event_format *event,
return event_format__fprintf(event, cpu, data, size, stdout); return event_format__fprintf(event, cpu, data, size, stdout);
} }
void parse_ftrace_printk(struct pevent *pevent, void parse_ftrace_printk(struct tep_handle *pevent,
char *file, unsigned int size __maybe_unused) char *file, unsigned int size __maybe_unused)
{ {
unsigned long long addr; unsigned long long addr;
...@@ -161,7 +161,7 @@ void parse_ftrace_printk(struct pevent *pevent, ...@@ -161,7 +161,7 @@ void parse_ftrace_printk(struct pevent *pevent,
} }
} }
void parse_saved_cmdline(struct pevent *pevent, void parse_saved_cmdline(struct tep_handle *pevent,
char *file, unsigned int size __maybe_unused) char *file, unsigned int size __maybe_unused)
{ {
char *comm; char *comm;
...@@ -178,18 +178,18 @@ void parse_saved_cmdline(struct pevent *pevent, ...@@ -178,18 +178,18 @@ void parse_saved_cmdline(struct pevent *pevent,
} }
} }
int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size) int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size)
{ {
return pevent_parse_event(pevent, buf, size, "ftrace"); return pevent_parse_event(pevent, buf, size, "ftrace");
} }
int parse_event_file(struct pevent *pevent, int parse_event_file(struct tep_handle *pevent,
char *buf, unsigned long size, char *sys) char *buf, unsigned long size, char *sys)
{ {
return pevent_parse_event(pevent, buf, size, sys); return pevent_parse_event(pevent, buf, size, sys);
} }
struct event_format *trace_find_next_event(struct pevent *pevent, struct event_format *trace_find_next_event(struct tep_handle *pevent,
struct event_format *event) struct event_format *event)
{ {
static int idx; static int idx;
......
...@@ -96,7 +96,7 @@ static void skip(int size) ...@@ -96,7 +96,7 @@ static void skip(int size)
}; };
} }
static unsigned int read4(struct pevent *pevent) static unsigned int read4(struct tep_handle *pevent)
{ {
unsigned int data; unsigned int data;
...@@ -105,7 +105,7 @@ static unsigned int read4(struct pevent *pevent) ...@@ -105,7 +105,7 @@ static unsigned int read4(struct pevent *pevent)
return __data2host4(pevent, data); return __data2host4(pevent, data);
} }
static unsigned long long read8(struct pevent *pevent) static unsigned long long read8(struct tep_handle *pevent)
{ {
unsigned long long data; unsigned long long data;
...@@ -158,7 +158,7 @@ static char *read_string(void) ...@@ -158,7 +158,7 @@ static char *read_string(void)
return str; return str;
} }
static int read_proc_kallsyms(struct pevent *pevent) static int read_proc_kallsyms(struct tep_handle *pevent)
{ {
unsigned int size; unsigned int size;
...@@ -181,7 +181,7 @@ static int read_proc_kallsyms(struct pevent *pevent) ...@@ -181,7 +181,7 @@ static int read_proc_kallsyms(struct pevent *pevent)
return 0; return 0;
} }
static int read_ftrace_printk(struct pevent *pevent) static int read_ftrace_printk(struct tep_handle *pevent)
{ {
unsigned int size; unsigned int size;
char *buf; char *buf;
...@@ -208,7 +208,7 @@ static int read_ftrace_printk(struct pevent *pevent) ...@@ -208,7 +208,7 @@ static int read_ftrace_printk(struct pevent *pevent)
return 0; return 0;
} }
static int read_header_files(struct pevent *pevent) static int read_header_files(struct tep_handle *pevent)
{ {
unsigned long long size; unsigned long long size;
char *header_page; char *header_page;
...@@ -259,7 +259,7 @@ static int read_header_files(struct pevent *pevent) ...@@ -259,7 +259,7 @@ static int read_header_files(struct pevent *pevent)
return ret; return ret;
} }
static int read_ftrace_file(struct pevent *pevent, unsigned long long size) static int read_ftrace_file(struct tep_handle *pevent, unsigned long long size)
{ {
int ret; int ret;
char *buf; char *buf;
...@@ -284,7 +284,7 @@ static int read_ftrace_file(struct pevent *pevent, unsigned long long size) ...@@ -284,7 +284,7 @@ static int read_ftrace_file(struct pevent *pevent, unsigned long long size)
return ret; return ret;
} }
static int read_event_file(struct pevent *pevent, char *sys, static int read_event_file(struct tep_handle *pevent, char *sys,
unsigned long long size) unsigned long long size)
{ {
int ret; int ret;
...@@ -310,7 +310,7 @@ static int read_event_file(struct pevent *pevent, char *sys, ...@@ -310,7 +310,7 @@ static int read_event_file(struct pevent *pevent, char *sys,
return ret; return ret;
} }
static int read_ftrace_files(struct pevent *pevent) static int read_ftrace_files(struct tep_handle *pevent)
{ {
unsigned long long size; unsigned long long size;
int count; int count;
...@@ -328,7 +328,7 @@ static int read_ftrace_files(struct pevent *pevent) ...@@ -328,7 +328,7 @@ static int read_ftrace_files(struct pevent *pevent)
return 0; return 0;
} }
static int read_event_files(struct pevent *pevent) static int read_event_files(struct tep_handle *pevent)
{ {
unsigned long long size; unsigned long long size;
char *sys; char *sys;
...@@ -356,7 +356,7 @@ static int read_event_files(struct pevent *pevent) ...@@ -356,7 +356,7 @@ static int read_event_files(struct pevent *pevent)
return 0; return 0;
} }
static int read_saved_cmdline(struct pevent *pevent) static int read_saved_cmdline(struct tep_handle *pevent)
{ {
unsigned long long size; unsigned long long size;
char *buf; char *buf;
...@@ -399,7 +399,7 @@ ssize_t trace_report(int fd, struct trace_event *tevent, bool __repipe) ...@@ -399,7 +399,7 @@ ssize_t trace_report(int fd, struct trace_event *tevent, bool __repipe)
int host_bigendian; int host_bigendian;
int file_long_size; int file_long_size;
int file_page_size; int file_page_size;
struct pevent *pevent = NULL; struct tep_handle *pevent = NULL;
int err; int err;
repipe = __repipe; repipe = __repipe;
......
...@@ -66,7 +66,7 @@ static int python_start_script_unsupported(const char *script __maybe_unused, ...@@ -66,7 +66,7 @@ static int python_start_script_unsupported(const char *script __maybe_unused,
return -1; return -1;
} }
static int python_generate_script_unsupported(struct pevent *pevent static int python_generate_script_unsupported(struct tep_handle *pevent
__maybe_unused, __maybe_unused,
const char *outfile const char *outfile
__maybe_unused) __maybe_unused)
...@@ -130,7 +130,7 @@ static int perl_start_script_unsupported(const char *script __maybe_unused, ...@@ -130,7 +130,7 @@ static int perl_start_script_unsupported(const char *script __maybe_unused,
return -1; return -1;
} }
static int perl_generate_script_unsupported(struct pevent *pevent static int perl_generate_script_unsupported(struct tep_handle *pevent
__maybe_unused, __maybe_unused,
const char *outfile __maybe_unused) const char *outfile __maybe_unused)
{ {
......
...@@ -28,7 +28,7 @@ static bool tevent_initialized; ...@@ -28,7 +28,7 @@ static bool tevent_initialized;
int trace_event__init(struct trace_event *t) int trace_event__init(struct trace_event *t)
{ {
struct pevent *pevent = pevent_alloc(); struct tep_handle *pevent = pevent_alloc();
if (pevent) { if (pevent) {
t->plugin_list = traceevent_load_plugins(pevent); t->plugin_list = traceevent_load_plugins(pevent);
...@@ -41,7 +41,7 @@ int trace_event__init(struct trace_event *t) ...@@ -41,7 +41,7 @@ int trace_event__init(struct trace_event *t)
static int trace_event__init2(void) static int trace_event__init2(void)
{ {
int be = traceevent_host_bigendian(); int be = traceevent_host_bigendian();
struct pevent *pevent; struct tep_handle *pevent;
if (trace_event__init(&tevent)) if (trace_event__init(&tevent))
return -1; return -1;
...@@ -76,7 +76,7 @@ static struct event_format* ...@@ -76,7 +76,7 @@ static struct event_format*
tp_format(const char *sys, const char *name) tp_format(const char *sys, const char *name)
{ {
char *tp_dir = get_events_file(sys); char *tp_dir = get_events_file(sys);
struct pevent *pevent = tevent.pevent; struct tep_handle *pevent = tevent.pevent;
struct event_format *event = NULL; struct event_format *event = NULL;
char path[PATH_MAX]; char path[PATH_MAX];
size_t size; size_t size;
......
...@@ -13,7 +13,7 @@ struct thread; ...@@ -13,7 +13,7 @@ struct thread;
struct plugin_list; struct plugin_list;
struct trace_event { struct trace_event {
struct pevent *pevent; struct tep_handle *pevent;
struct plugin_list *plugin_list; struct plugin_list *plugin_list;
}; };
...@@ -34,20 +34,20 @@ void event_format__fprintf(struct event_format *event, ...@@ -34,20 +34,20 @@ void event_format__fprintf(struct event_format *event,
void event_format__print(struct event_format *event, void event_format__print(struct event_format *event,
int cpu, void *data, int size); int cpu, void *data, int size);
int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size); int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size);
int parse_event_file(struct pevent *pevent, int parse_event_file(struct tep_handle *pevent,
char *buf, unsigned long size, char *sys); char *buf, unsigned long size, char *sys);
unsigned long long unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data); raw_field_value(struct event_format *event, const char *name, void *data);
void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size); void parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size); void parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size);
void parse_saved_cmdline(struct pevent *pevent, char *file, unsigned int size); void parse_saved_cmdline(struct tep_handle *pevent, char *file, unsigned int size);
ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe); ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe);
struct event_format *trace_find_next_event(struct pevent *pevent, struct event_format *trace_find_next_event(struct tep_handle *pevent,
struct event_format *event); struct event_format *event);
unsigned long long read_size(struct event_format *event, void *ptr, int size); unsigned long long read_size(struct event_format *event, void *ptr, int size);
unsigned long long eval_flag(const char *flag); unsigned long long eval_flag(const char *flag);
...@@ -83,7 +83,7 @@ struct scripting_ops { ...@@ -83,7 +83,7 @@ struct scripting_ops {
void (*process_stat)(struct perf_stat_config *config, void (*process_stat)(struct perf_stat_config *config,
struct perf_evsel *evsel, u64 tstamp); struct perf_evsel *evsel, u64 tstamp);
void (*process_stat_interval)(u64 tstamp); void (*process_stat_interval)(u64 tstamp);
int (*generate_script) (struct pevent *pevent, const char *outfile); int (*generate_script) (struct tep_handle *pevent, const char *outfile);
}; };
extern unsigned int scripting_max_stack; extern unsigned int scripting_max_stack;
...@@ -94,7 +94,7 @@ void setup_perl_scripting(void); ...@@ -94,7 +94,7 @@ void setup_perl_scripting(void);
void setup_python_scripting(void); void setup_python_scripting(void);
struct scripting_context { struct scripting_context {
struct pevent *pevent; struct tep_handle *pevent;
void *event_data; void *event_data;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册