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

tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format

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_". This renames struct event_format
to struct tep_event_format
Signed-off-by: NTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180919185722.495820809@goodmis.orgSigned-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 a78cdee6
此差异已折叠。
......@@ -54,14 +54,14 @@ struct tep_record {
#endif
};
/* ----------------------- pevent ----------------------- */
/* ----------------------- tep ----------------------- */
struct tep_handle;
struct event_format;
struct tep_event_format;
typedef int (*tep_event_handler_func)(struct trace_seq *s,
struct tep_record *record,
struct event_format *event,
struct tep_event_format *event,
void *context);
typedef int (*tep_plugin_load_func)(struct tep_handle *pevent);
......@@ -143,7 +143,7 @@ enum format_flags {
struct format_field {
struct format_field *next;
struct event_format *event;
struct tep_event_format *event;
char *type;
char *name;
char *alias;
......@@ -277,7 +277,7 @@ struct print_fmt {
struct print_arg *args;
};
struct event_format {
struct tep_event_format {
struct tep_handle *pevent;
char *name;
int id;
......@@ -451,9 +451,9 @@ struct tep_handle {
unsigned int printk_count;
struct event_format **events;
struct tep_event_format **events;
int nr_events;
struct event_format **sort_events;
struct tep_event_format **sort_events;
enum event_sort_type last_type;
int type_offset;
......@@ -485,7 +485,7 @@ struct tep_handle {
struct tep_function_handler *func_handlers;
/* cache */
struct event_format *last_event;
struct tep_event_format *last_event;
char *trace_clock;
};
......@@ -585,14 +585,14 @@ int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
int tep_pid_is_registered(struct tep_handle *pevent, int pid);
void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event,
struct tep_event_format *event,
struct tep_record *record);
void tep_print_event_time(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event,
struct tep_event_format *event,
struct tep_record *record,
bool use_trace_clock);
void tep_print_event_data(struct tep_handle *pevent, struct trace_seq *s,
struct event_format *event,
struct tep_event_format *event,
struct tep_record *record);
void tep_print_event(struct tep_handle *pevent, struct trace_seq *s,
struct tep_record *record, bool use_trace_clock);
......@@ -603,32 +603,32 @@ int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long si
enum tep_errno tep_parse_event(struct tep_handle *pevent, const char *buf,
unsigned long size, const char *sys);
enum tep_errno tep_parse_format(struct tep_handle *pevent,
struct event_format **eventp,
struct tep_event_format **eventp,
const char *buf,
unsigned long size, const char *sys);
void tep_free_format(struct event_format *event);
void tep_free_format(struct tep_event_format *event);
void tep_free_format_field(struct format_field *field);
void *tep_get_field_raw(struct trace_seq *s, struct event_format *event,
void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event,
const char *name, struct tep_record *record,
int *len, int err);
int tep_get_field_val(struct trace_seq *s, struct event_format *event,
int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event,
const char *name, struct tep_record *record,
unsigned long long *val, int err);
int tep_get_common_field_val(struct trace_seq *s, struct event_format *event,
int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event,
const char *name, struct tep_record *record,
unsigned long long *val, int err);
int tep_get_any_field_val(struct trace_seq *s, struct event_format *event,
int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event,
const char *name, struct tep_record *record,
unsigned long long *val, int err);
int tep_print_num_field(struct trace_seq *s, const char *fmt,
struct event_format *event, const char *name,
struct tep_record *record, int err);
struct tep_event_format *event, const char *name,
struct tep_record *record, int err);
int tep_print_func_field(struct trace_seq *s, const char *fmt,
struct event_format *event, const char *name,
struct tep_event_format *event, const char *name,
struct tep_record *record, int err);
int tep_register_event_handler(struct tep_handle *pevent, int id,
......@@ -644,9 +644,9 @@ int tep_register_print_function(struct tep_handle *pevent,
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);
struct format_field *tep_find_any_field(struct event_format *event, const char *name);
struct format_field *tep_find_common_field(struct tep_event_format *event, const char *name);
struct format_field *tep_find_field(struct tep_event_format *event, const char *name);
struct format_field *tep_find_any_field(struct tep_event_format *event, const char *name);
const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr);
unsigned long long
......@@ -655,18 +655,18 @@ unsigned long long tep_read_number(struct tep_handle *pevent, const void *ptr, i
int tep_read_number_field(struct format_field *field, const void *data,
unsigned long long *value);
struct event_format *tep_find_event(struct tep_handle *pevent, int id);
struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id);
struct event_format *
struct tep_event_format *
tep_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name);
struct event_format *
struct tep_event_format *
tep_find_event_by_record(struct tep_handle *pevent, struct tep_record *record);
void tep_data_lat_fmt(struct tep_handle *pevent,
struct trace_seq *s, struct tep_record *record);
int tep_data_type(struct tep_handle *pevent, struct tep_record *rec);
struct event_format *tep_data_event_from_type(struct tep_handle *pevent, int type);
struct tep_event_format *tep_data_event_from_type(struct tep_handle *pevent, int type);
int tep_data_pid(struct tep_handle *pevent, struct tep_record *rec);
int tep_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec);
int tep_data_flags(struct tep_handle *pevent, struct tep_record *rec);
......@@ -679,15 +679,15 @@ int tep_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline);
void tep_print_field(struct trace_seq *s, void *data,
struct format_field *field);
void tep_print_fields(struct trace_seq *s, void *data,
int size __maybe_unused, struct event_format *event);
void tep_event_info(struct trace_seq *s, struct event_format *event,
int size __maybe_unused, struct tep_event_format *event);
void tep_event_info(struct trace_seq *s, struct tep_event_format *event,
struct tep_record *record);
int tep_strerror(struct tep_handle *pevent, enum tep_errno errnum,
char *buf, size_t buflen);
struct event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type);
struct format_field **tep_event_common_fields(struct event_format *event);
struct format_field **tep_event_fields(struct event_format *event);
struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type);
struct format_field **tep_event_common_fields(struct tep_event_format *event);
struct format_field **tep_event_fields(struct tep_event_format *event);
static inline int tep_get_cpus(struct tep_handle *pevent)
{
......@@ -884,7 +884,7 @@ struct filter_arg {
struct filter_type {
int event_id;
struct event_format *event;
struct tep_event_format *event;
struct filter_arg *filter;
};
......
......@@ -26,7 +26,7 @@ static struct format_field cpu = {
struct event_list {
struct event_list *next;
struct event_format *event;
struct tep_event_format *event;
};
static void show_error(char *error_buf, const char *fmt, ...)
......@@ -228,7 +228,7 @@ static void free_arg(struct filter_arg *arg)
}
static int add_event(struct event_list **events,
struct event_format *event)
struct tep_event_format *event)
{
struct event_list *list;
......@@ -242,7 +242,7 @@ static int add_event(struct event_list **events,
return 0;
}
static int event_match(struct event_format *event,
static int event_match(struct tep_event_format *event,
regex_t *sreg, regex_t *ereg)
{
if (sreg) {
......@@ -258,7 +258,7 @@ static enum tep_errno
find_event(struct tep_handle *pevent, struct event_list **events,
char *sys_name, char *event_name)
{
struct event_format *event;
struct tep_event_format *event;
regex_t ereg;
regex_t sreg;
int match = 0;
......@@ -333,7 +333,7 @@ static void free_events(struct event_list *events)
}
static enum tep_errno
create_arg_item(struct event_format *event, const char *token,
create_arg_item(struct tep_event_format *event, const char *token,
enum event_type type, struct filter_arg **parg, char *error_str)
{
struct format_field *field;
......@@ -939,7 +939,7 @@ static int collapse_tree(struct filter_arg *arg,
}
static enum tep_errno
process_filter(struct event_format *event, struct filter_arg **parg,
process_filter(struct tep_event_format *event, struct filter_arg **parg,
char *error_str, int not)
{
enum event_type type;
......@@ -1179,7 +1179,7 @@ process_filter(struct event_format *event, struct filter_arg **parg,
}
static enum tep_errno
process_event(struct event_format *event, const char *filter_str,
process_event(struct tep_event_format *event, const char *filter_str,
struct filter_arg **parg, char *error_str)
{
int ret;
......@@ -1204,7 +1204,7 @@ process_event(struct event_format *event, const char *filter_str,
}
static enum tep_errno
filter_event(struct event_filter *filter, struct event_format *event,
filter_event(struct event_filter *filter, struct tep_event_format *event,
const char *filter_str, char *error_str)
{
struct filter_type *filter_type;
......@@ -1456,7 +1456,7 @@ static int copy_filter_type(struct event_filter *filter,
struct filter_type *filter_type)
{
struct filter_arg *arg;
struct event_format *event;
struct tep_event_format *event;
const char *sys;
const char *name;
char *str;
......@@ -1538,7 +1538,7 @@ int tep_update_trivial(struct event_filter *dest, struct event_filter *source,
{
struct tep_handle *src_pevent;
struct tep_handle *dest_pevent;
struct event_format *event;
struct tep_event_format *event;
struct filter_type *filter_type;
struct filter_arg *arg;
char *str;
......@@ -1682,11 +1682,11 @@ int tep_filter_event_has_trivial(struct event_filter *filter,
}
}
static int test_filter(struct event_format *event, struct filter_arg *arg,
static int test_filter(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err);
static const char *
get_comm(struct event_format *event, struct tep_record *record)
get_comm(struct tep_event_format *event, struct tep_record *record)
{
const char *comm;
int pid;
......@@ -1697,7 +1697,7 @@ get_comm(struct event_format *event, struct tep_record *record)
}
static unsigned long long
get_value(struct event_format *event,
get_value(struct tep_event_format *event,
struct format_field *field, struct tep_record *record)
{
unsigned long long val;
......@@ -1733,11 +1733,11 @@ get_value(struct event_format *event,
}
static unsigned long long
get_arg_value(struct event_format *event, struct filter_arg *arg,
get_arg_value(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err);
static unsigned long long
get_exp_value(struct event_format *event, struct filter_arg *arg,
get_exp_value(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
unsigned long long lval, rval;
......@@ -1792,7 +1792,7 @@ get_exp_value(struct event_format *event, struct filter_arg *arg,
}
static unsigned long long
get_arg_value(struct event_format *event, struct filter_arg *arg,
get_arg_value(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
switch (arg->type) {
......@@ -1816,7 +1816,7 @@ get_arg_value(struct event_format *event, struct filter_arg *arg,
return 0;
}
static int test_num(struct event_format *event, struct filter_arg *arg,
static int test_num(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
unsigned long long lval, rval;
......@@ -1859,7 +1859,7 @@ static int test_num(struct event_format *event, struct filter_arg *arg,
static const char *get_field_str(struct filter_arg *arg, struct tep_record *record)
{
struct event_format *event;
struct tep_event_format *event;
struct tep_handle *pevent;
unsigned long long addr;
const char *val = NULL;
......@@ -1907,7 +1907,7 @@ static const char *get_field_str(struct filter_arg *arg, struct tep_record *reco
return val;
}
static int test_str(struct event_format *event, struct filter_arg *arg,
static int test_str(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
const char *val;
......@@ -1938,7 +1938,7 @@ static int test_str(struct event_format *event, struct filter_arg *arg,
}
}
static int test_op(struct event_format *event, struct filter_arg *arg,
static int test_op(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
switch (arg->op.type) {
......@@ -1960,7 +1960,7 @@ static int test_op(struct event_format *event, struct filter_arg *arg,
}
}
static int test_filter(struct event_format *event, struct filter_arg *arg,
static int test_filter(struct tep_event_format *event, struct filter_arg *arg,
struct tep_record *record, enum tep_errno *err)
{
if (*err) {
......
......@@ -124,7 +124,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu)
}
static int function_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
struct tep_handle *pevent = event->pevent;
unsigned long long function;
......
......@@ -27,7 +27,7 @@
static int timer_expire_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
trace_seq_printf(s, "hrtimer=");
......@@ -47,7 +47,7 @@ static int timer_expire_handler(struct trace_seq *s,
static int timer_start_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
trace_seq_printf(s, "hrtimer=");
......
......@@ -25,7 +25,7 @@
#include "trace-seq.h"
static int call_site_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
struct format_field *field;
unsigned long long val, addr;
......
......@@ -249,7 +249,7 @@ static const char *find_exit_reason(unsigned isa, int val)
}
static int print_exit_reason(struct trace_seq *s, struct tep_record *record,
struct event_format *event, const char *field)
struct tep_event_format *event, const char *field)
{
unsigned long long isa;
unsigned long long val;
......@@ -270,7 +270,7 @@ static int print_exit_reason(struct trace_seq *s, struct tep_record *record,
}
static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
unsigned long long info1 = 0, info2 = 0;
......@@ -293,7 +293,7 @@ static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record,
static int kvm_emulate_insn_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
unsigned long long rip, csbase, len, flags, failed;
int llen;
......@@ -332,7 +332,7 @@ static int kvm_emulate_insn_handler(struct trace_seq *s,
static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
if (print_exit_reason(s, record, event, "exit_code") < 0)
return -1;
......@@ -346,7 +346,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct tep_reco
}
static int kvm_nested_vmexit_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
tep_print_num_field(s, "rip %llx ", event, "rip", record, 1);
......@@ -372,7 +372,7 @@ union kvm_mmu_page_role {
};
static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
unsigned long long val;
static const char *access_str[] = {
......@@ -419,7 +419,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record,
static int kvm_mmu_get_page_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
unsigned long long val;
......
......@@ -26,7 +26,7 @@
#define INDENT 65
static void print_string(struct trace_seq *s, struct event_format *event,
static void print_string(struct trace_seq *s, struct tep_event_format *event,
const char *name, const void *data)
{
struct format_field *f = tep_find_field(event, name);
......@@ -60,7 +60,7 @@ static void print_string(struct trace_seq *s, struct event_format *event,
static int drv_bss_info_changed(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
void *data = record->data;
......
......@@ -67,7 +67,7 @@ static void write_and_save_comm(struct format_field *field,
static int sched_wakeup_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
struct format_field *field;
unsigned long long val;
......@@ -96,7 +96,7 @@ static int sched_wakeup_handler(struct trace_seq *s,
static int sched_switch_handler(struct trace_seq *s,
struct tep_record *record,
struct event_format *event, void *context)
struct tep_event_format *event, void *context)
{
struct format_field *field;
unsigned long long val;
......
......@@ -862,7 +862,7 @@ static struct syscall_fmt *syscall_fmt__find(const char *name)
* args_size: sum of the sizes of the syscall arguments, anything after that is augmented stuff: pathname for openat, etc.
*/
struct syscall {
struct event_format *tp_format;
struct tep_event_format *tp_format;
int nr_args;
int args_size;
bool is_exit;
......
......@@ -102,7 +102,7 @@ struct perf_evsel {
char *name;
double scale;
const char *unit;
struct event_format *tp_format;
struct tep_event_format *tp_format;
off_t id_offset;
struct perf_stat_evsel *stats;
void *priv;
......@@ -211,7 +211,7 @@ static inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *
struct perf_evsel *perf_evsel__new_cycles(bool precise);
struct event_format *event_format__new(const char *sys, const char *name);
struct tep_event_format *event_format__new(const char *sys, const char *name);
void perf_evsel__init(struct perf_evsel *evsel,
struct perf_event_attr *attr, int idx);
......
......@@ -3206,7 +3206,7 @@ static int read_attr(int fd, struct perf_header *ph,
static int perf_evsel__prepare_tracepoint_event(struct perf_evsel *evsel,
struct tep_handle *pevent)
{
struct event_format *event;
struct tep_event_format *event;
char bf[128];
/* already prepared */
......
......@@ -386,7 +386,7 @@ get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name)
struct format_field *field;
if (!evsel->tp_format) {
struct event_format *tp_format;
struct tep_event_format *tp_format;
tp_format = trace_event__tp_format_id(evsel->attr.config);
if (!tp_format)
......@@ -1240,7 +1240,7 @@ static struct {
static PyObject *pyrf__tracepoint(struct pyrf_evsel *pevsel,
PyObject *args, PyObject *kwargs)
{
struct event_format *tp_format;
struct tep_event_format *tp_format;
static char *kwlist[] = { "sys", "name", NULL };
char *sys = NULL;
char *name = NULL;
......
......@@ -189,7 +189,7 @@ static void define_flag_field(const char *ev_name,
LEAVE;
}
static void define_event_symbols(struct event_format *event,
static void define_event_symbols(struct tep_event_format *event,
const char *ev_name,
struct print_arg *args)
{
......@@ -338,7 +338,7 @@ static void perl_process_tracepoint(struct perf_sample *sample,
struct addr_location *al)
{
struct thread *thread = al->thread;
struct event_format *event = evsel->tp_format;
struct tep_event_format *event = evsel->tp_format;
struct format_field *field;
static char handler[256];
unsigned long long val;
......@@ -537,7 +537,7 @@ static int perl_stop_script(void)
static int perl_generate_script(struct tep_handle *pevent, const char *outfile)
{
struct event_format *event = NULL;
struct tep_event_format *event = NULL;
struct format_field *f;
char fname[PATH_MAX];
int not_first, count;
......
......@@ -264,7 +264,7 @@ static void define_field(enum print_arg_type field_type,
Py_DECREF(t);
}
static void define_event_symbols(struct event_format *event,
static void define_event_symbols(struct tep_event_format *event,
const char *ev_name,
struct print_arg *args)
{
......@@ -332,7 +332,7 @@ static void define_event_symbols(struct event_format *event,
define_event_symbols(event, ev_name, args->next);
}
static PyObject *get_field_numeric_entry(struct event_format *event,
static PyObject *get_field_numeric_entry(struct tep_event_format *event,
struct format_field *field, void *data)
{
bool is_array = field->flags & FIELD_IS_ARRAY;
......@@ -790,7 +790,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
struct perf_evsel *evsel,
struct addr_location *al)
{
struct event_format *event = evsel->tp_format;
struct tep_event_format *event = evsel->tp_format;
PyObject *handler, *context, *t, *obj = NULL, *callchain;
PyObject *dict = NULL, *all_entries_dict = NULL;
static char handler_name[256];
......@@ -1590,7 +1590,7 @@ static int python_stop_script(void)
static int python_generate_script(struct tep_handle *pevent, const char *outfile)
{
struct event_format *event = NULL;
struct tep_event_format *event = NULL;
struct format_field *f;
char fname[PATH_MAX];
int not_first, count;
......
......@@ -33,7 +33,7 @@ static int get_common_field(struct scripting_context *context,
int *offset, int *size, const char *type)
{
struct tep_handle *pevent = context->pevent;
struct event_format *event;
struct tep_event_format *event;
struct format_field *field;
if (!*size) {
......@@ -94,7 +94,7 @@ int common_pc(struct scripting_context *context)
}
unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data)
raw_field_value(struct tep_event_format *event, const char *name, void *data)
{
struct format_field *field;
unsigned long long val;
......@@ -108,12 +108,12 @@ raw_field_value(struct event_format *event, const char *name, void *data)
return val;
}
unsigned long long read_size(struct event_format *event, void *ptr, int size)
unsigned long long read_size(struct tep_event_format *event, void *ptr, int size)
{
return tep_read_number(event->pevent, ptr, size);
}
void event_format__fprintf(struct event_format *event,
void event_format__fprintf(struct tep_event_format *event,
int cpu, void *data, int size, FILE *fp)
{
struct tep_record record;
......@@ -130,7 +130,7 @@ void event_format__fprintf(struct event_format *event,
trace_seq_destroy(&s);
}
void event_format__print(struct event_format *event,
void event_format__print(struct tep_event_format *event,
int cpu, void *data, int size)
{
return event_format__fprintf(event, cpu, data, size, stdout);
......@@ -188,8 +188,8 @@ int parse_event_file(struct tep_handle *pevent,
return tep_parse_event(pevent, buf, size, sys);
}
struct event_format *trace_find_next_event(struct tep_handle *pevent,
struct event_format *event)
struct tep_event_format *trace_find_next_event(struct tep_handle *pevent,
struct tep_event_format *event)
{
static int idx;
......
......@@ -72,12 +72,12 @@ void trace_event__cleanup(struct trace_event *t)
/*
* Returns pointer with encoded error via <linux/err.h> interface.
*/
static struct event_format*
static struct tep_event_format*
tp_format(const char *sys, const char *name)
{
char *tp_dir = get_events_file(sys);
struct tep_handle *pevent = tevent.pevent;
struct event_format *event = NULL;
struct tep_event_format *event = NULL;
char path[PATH_MAX];
size_t size;
char *data;
......@@ -102,7 +102,7 @@ tp_format(const char *sys, const char *name)
/*
* Returns pointer with encoded error via <linux/err.h> interface.
*/
struct event_format*
struct tep_event_format*
trace_event__tp_format(const char *sys, const char *name)
{
if (!tevent_initialized && trace_event__init2())
......@@ -111,7 +111,7 @@ trace_event__tp_format(const char *sys, const char *name)
return tp_format(sys, name);
}
struct event_format *trace_event__tp_format_id(int id)
struct tep_event_format *trace_event__tp_format_id(int id)
{
if (!tevent_initialized && trace_event__init2())
return ERR_PTR(-ENOMEM);
......
......@@ -22,17 +22,17 @@ int trace_event__init(struct trace_event *t);
void trace_event__cleanup(struct trace_event *t);
int trace_event__register_resolver(struct machine *machine,
tep_func_resolver_t *func);
struct event_format*
struct tep_event_format*
trace_event__tp_format(const char *sys, const char *name);
struct event_format *trace_event__tp_format_id(int id);
struct tep_event_format *trace_event__tp_format_id(int id);
int bigendian(void);
void event_format__fprintf(struct event_format *event,
void event_format__fprintf(struct tep_event_format *event,
int cpu, void *data, int size, FILE *fp);
void event_format__print(struct event_format *event,
void event_format__print(struct tep_event_format *event,
int cpu, void *data, int size);
int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size);
......@@ -40,7 +40,7 @@ int parse_event_file(struct tep_handle *pevent,
char *buf, unsigned long size, char *sys);
unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data);
raw_field_value(struct tep_event_format *event, const char *name, void *data);
void parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size);
......@@ -48,9 +48,9 @@ void parse_saved_cmdline(struct tep_handle *pevent, char *file, unsigned int siz
ssize_t trace_report(int fd, struct trace_event *tevent, bool repipe);
struct event_format *trace_find_next_event(struct tep_handle *pevent,
struct event_format *event);
unsigned long long read_size(struct event_format *event, void *ptr, int size);
struct tep_event_format *trace_find_next_event(struct tep_handle *pevent,
struct tep_event_format *event);
unsigned long long read_size(struct tep_event_format *event, void *ptr, int size);
unsigned long long eval_flag(const char *flag);
int read_tracing_data(int fd, struct list_head *pattrs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册