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: Tzvetomir 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.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
a78cdee6fb
commit
4963b0f88b
@@ -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);
|
||||
|
Reference in New Issue
Block a user