tools/lib/traceevent, tools/perf: Rename struct pevent_record to struct tep_record
RFC PATCH 2/24 tools/lib/traceevent, tools/perf: Rename struct pevent_record to struct tep_record
From: "Tzvetomir Stoyanov (VMware)" <[email protected]>
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_record to struct tep_record.
Signed-off-by Tzvetomir Stoyanov (VMware) <[email protected]>
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- tools/lib/traceevent/event-parse.c | 36 +++++++++--------- tools/lib/traceevent/event-parse.h | 44 +++++++++++----------- tools/lib/traceevent/parse-filter.c | 24 ++++++------ tools/lib/traceevent/plugin_function.c | 2 +- tools/lib/traceevent/plugin_hrtimer.c | 4 +- tools/lib/traceevent/plugin_kmem.c | 2 +- tools/lib/traceevent/plugin_kvm.c | 14 +++---- tools/lib/traceevent/plugin_mac80211.c | 2 +- tools/lib/traceevent/plugin_sched_switch.c | 6 +-- tools/perf/builtin-kmem.c | 2 +- tools/perf/util/sort.c | 2 +- tools/perf/util/trace-event-parse.c | 2 +- 12 files changed, 70 insertions(+), 70 deletions(-)
tools/lib/traceevent/event-parse.c +18 -18
@@ -5150,7 +5150,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event* and lock depth) and places it into the trace_seq. */ void pevent_data_lat_fmt (struct tep_handle *pevent, -struct trace_seq *s,struct pevent_record *record) +struct trace_seq *s,struct tep_record *record) {static int check_lock_depth =1 ;static int check_migrate_disable =1 ;
@@ -5229,7 +5229,7 @@ void pevent_data_lat_fmt(struct tep_handle *pevent,* * This returns the event id from the @rec. */ -int pevent_data_type (struct tep_handle *pevent,struct pevent_record *rec) +int pevent_data_type (struct tep_handle *pevent,struct tep_record *rec) {return trace_parse_common_type (pevent, rec->data); }
@@ -5253,7 +5253,7 @@ struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int* * This returns the PID from a record. */ -int pevent_data_pid (struct tep_handle *pevent,struct pevent_record *rec) +int pevent_data_pid (struct tep_handle *pevent,struct tep_record *rec) {return parse_common_pid (pevent, rec->data); }
@@ -5265,7 +5265,7 @@ int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec)* * This returns the preempt count from a record. */ -int pevent_data_preempt_count (struct tep_handle *pevent,struct pevent_record *rec) +int pevent_data_preempt_count (struct tep_handle *pevent,struct tep_record *rec) {return parse_common_pc (pevent, rec->data); }
@@ -5279,7 +5279,7 @@ int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *r* * Use trace_flag_type enum for the flags (see event-parse.h). */ -int pevent_data_flags (struct tep_handle *pevent,struct pevent_record *rec) +int pevent_data_flags (struct tep_handle *pevent,struct tep_record *rec) {return parse_common_flags (pevent, rec->data); }
@@ -5400,7 +5400,7 @@ int pevent_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline)* writes the print format into the trace_seq. */ void pevent_event_info (struct trace_seq *s,struct event_format *event, -struct pevent_record *record) +struct tep_record *record) {int print_pretty =1 ;
@@ -5441,7 +5441,7 @@ static bool is_timestamp_in_us(char *trace_clock, bool use_trace_clock)* is found. */ struct event_format * -pevent_find_event_by_record (struct tep_handle *pevent,struct pevent_record *record) +pevent_find_event_by_record (struct tep_handle *pevent,struct tep_record *record) {int type;
@@ -5466,7 +5466,7 @@ pevent_find_event_by_record(struct tep_handle *pevent, struct pevent_record *rec*/ void pevent_print_event_task (struct tep_handle *pevent,struct trace_seq *s,struct event_format *event, -struct pevent_record *record) +struct tep_record *record) {void *data = record->data;const char *comm;
@@ -5494,7 +5494,7 @@ void pevent_print_event_task(struct tep_handle *pevent, struct trace_seq *s,*/ void pevent_print_event_time (struct tep_handle *pevent,struct trace_seq *s,struct event_format *event, -struct pevent_record *record, +struct tep_record *record,bool use_trace_clock) {unsigned long secs;
@@ -5544,7 +5544,7 @@ void pevent_print_event_time(struct tep_handle *pevent, struct trace_seq *s,*/ void pevent_print_event_data (struct tep_handle *pevent,struct trace_seq *s,struct event_format *event, -struct pevent_record *record) +struct tep_record *record) {static const char *spaces =" " ;/* 20 spaces */ int len;
@@ -5560,7 +5560,7 @@ void pevent_print_event_data(struct tep_handle *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 tep_record *record,bool use_trace_clock) {struct event_format *event;
@@ -6244,7 +6244,7 @@ int pevent_strerror(struct tep_handle *pevent __maybe_unused, }int get_field_val (struct trace_seq *s,struct format_field *field, -const char *name,struct pevent_record *record, +const char *name,struct tep_record *record,unsigned long long *val,int err) {if (!field) {
@@ -6277,7 +6277,7 @@ int get_field_val(struct trace_seq *s, struct format_field *field,* On failure, it returns NULL. */ void *pevent_get_field_raw (struct trace_seq *s,struct event_format *event, -const char *name,struct pevent_record *record, +const char *name,struct tep_record *record,int *len,int err) {struct format_field *field;
@@ -6324,7 +6324,7 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event,* Returns 0 on success -1 on field not found. */ int pevent_get_field_val (struct trace_seq *s,struct event_format *event, -const char *name,struct pevent_record *record, +const char *name,struct tep_record *record,unsigned long long *val,int err) {struct format_field *field;
@@ -6349,7 +6349,7 @@ int pevent_get_field_val(struct trace_seq *s, struct event_format *event,* Returns 0 on success -1 on field not found. */ int pevent_get_common_field_val (struct trace_seq *s,struct event_format *event, -const char *name,struct pevent_record *record, +const char *name,struct tep_record *record,unsigned long long *val,int err) {struct format_field *field;
@@ -6374,7 +6374,7 @@ int pevent_get_common_field_val(struct trace_seq *s, struct event_format *event,* Returns 0 on success -1 on field not found. */ int pevent_get_any_field_val (struct trace_seq *s,struct event_format *event, -const char *name,struct pevent_record *record, +const char *name,struct tep_record *record,unsigned long long *val,int err) {struct format_field *field;
@@ -6400,7 +6400,7 @@ int pevent_get_any_field_val(struct trace_seq *s, struct event_format *event,*/ int pevent_print_num_field (struct trace_seq *s,const char *fmt,struct event_format *event,const char *name, -struct pevent_record *record,int err) +struct tep_record *record,int err) {struct format_field *field =pevent_find_field (event, name);unsigned long long val;
@@ -6432,7 +6432,7 @@ int pevent_print_num_field(struct trace_seq *s, const char *fmt,*/ int pevent_print_func_field (struct trace_seq *s,const char *fmt,struct event_format *event,const char *name, -struct pevent_record *record,int err) +struct tep_record *record,int err) {struct format_field *field =pevent_find_field (event, name);struct tep_handle *pevent = event->pevent;
tools/lib/traceevent/event-parse.h +22 -22
115 lines not on this page · raw message
tools/lib/traceevent/parse-filter.c +12 -12
@@ -1697,10 +1697,10 @@ int pevent_filter_event_has_trivial(struct event_filter *filter, }static int test_filter (struct event_format *event,struct filter_arg *arg, -struct pevent_record *record,enum pevent_errno *err); +struct tep_record *record,enum pevent_errno *err);static const char * -get_comm (struct event_format *event,struct pevent_record *record) +get_comm (struct event_format *event,struct tep_record *record) {const char *comm;int pid;
@@ -1712,7 +1712,7 @@ get_comm(struct event_format *event, struct pevent_record *record)static unsigned long long get_value (struct event_format *event, -struct format_field *field,struct pevent_record *record) +struct format_field *field,struct tep_record *record) {unsigned long long val;
@@ -1748,11 +1748,11 @@ get_value(struct event_format *event,static unsigned long long get_arg_value (struct event_format *event,struct filter_arg *arg, -struct pevent_record *record,enum pevent_errno *err); +struct tep_record *record,enum pevent_errno *err);static unsigned long long get_exp_value (struct event_format *event,struct filter_arg *arg, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {unsigned long long lval, rval;
@@ -1807,7 +1807,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, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {switch (arg->type) {case FILTER_ARG_FIELD :
@@ -1831,7 +1831,7 @@ get_arg_value(struct event_format *event, struct filter_arg *arg, }static int test_num (struct event_format *event,struct filter_arg *arg, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {unsigned long long lval, rval;
@@ -1871,7 +1871,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 tep_record *record) {struct event_format *event;struct tep_handle *pevent;
@@ -1922,7 +1922,7 @@ static const char *get_field_str(struct filter_arg *arg, struct pevent_record *r }static int test_str (struct event_format *event,struct filter_arg *arg, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {const char *val;
@@ -1953,7 +1953,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, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {switch (arg->op.type) {case FILTER_OP_AND :
@@ -1975,7 +1975,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, -struct pevent_record *record,enum pevent_errno *err) +struct tep_record *record,enum pevent_errno *err) {if (*err) {/*
@@ -2047,7 +2047,7 @@ int pevent_event_filtered(struct event_filter *filter, int event_id)* otherwise - error occurred during test */ enum pevent_errno pevent_filter_match (struct event_filter *filter, -struct pevent_record *record) +struct tep_record *record) {struct tep_handle *pevent = filter->pevent;struct filter_type *filter_type;
tools/lib/traceevent/plugin_function.c +1 -1
@@ -122,7 +122,7 @@ static int add_and_get_index(const char *parent, const char *child, int cpu)return 0 ; } -static int function_handler (struct trace_seq *s,struct pevent_record *record, +static int function_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {struct tep_handle *pevent = event->pevent;
tools/lib/traceevent/plugin_hrtimer.c +2 -2
@@ -25,7 +25,7 @@#include "event-parse.h" static int timer_expire_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {trace_seq_printf (s,"hrtimer=" );
@@ -45,7 +45,7 @@ static int timer_expire_handler(struct trace_seq *s, }static int timer_start_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {trace_seq_printf (s,"hrtimer=" );
tools/lib/traceevent/plugin_kmem.c +1 -1
@@ -23,7 +23,7 @@#include "event-parse.h" -static int call_site_handler (struct trace_seq *s,struct pevent_record *record, +static int call_site_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {struct format_field *field;
tools/lib/traceevent/plugin_kvm.c +7 -7
@@ -247,7 +247,7 @@ static const char *find_exit_reason(unsigned isa, int val)return strings[i].str; } -static int print_exit_reason (struct trace_seq *s,struct pevent_record *record, +static int print_exit_reason (struct trace_seq *s,struct tep_record *record,struct event_format *event,const char *field) {unsigned long long isa;
@@ -268,7 +268,7 @@ static int print_exit_reason(struct trace_seq *s, struct pevent_record *record,return 0 ; } -static int kvm_exit_handler (struct trace_seq *s,struct pevent_record *record, +static int kvm_exit_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {unsigned long long info1 =0 , info2 =0 ;
@@ -291,7 +291,7 @@ static int kvm_exit_handler(struct trace_seq *s, struct pevent_record *record,#define KVM_EMUL_INSN_F_CS_L (1 << 3)static int kvm_emulate_insn_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {unsigned long long rip, csbase, len, flags, failed;
@@ -330,7 +330,7 @@ static int kvm_emulate_insn_handler(struct trace_seq *s, } -static int kvm_nested_vmexit_inject_handler (struct trace_seq *s,struct pevent_record *record, +static int kvm_nested_vmexit_inject_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {if (print_exit_reason (s, record, event,"exit_code" ) <0 )
@@ -344,7 +344,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_rreturn 0 ; } -static int kvm_nested_vmexit_handler (struct trace_seq *s,struct pevent_record *record, +static int kvm_nested_vmexit_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {pevent_print_num_field (s,"rip %llx " , event,"rip" , record,1 );
@@ -370,7 +370,7 @@ union kvm_mmu_page_role { }; }; -static int kvm_mmu_print_role (struct trace_seq *s,struct pevent_record *record, +static int kvm_mmu_print_role (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context) {unsigned long long val;
@@ -417,7 +417,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record, }static int kvm_mmu_get_page_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {unsigned long long val;
tools/lib/traceevent/plugin_mac80211.c +1 -1
@@ -58,7 +58,7 @@ static void print_string(struct trace_seq *s, struct event_format *event,#define SP () trace_seq_putc(s, ' ')static int drv_bss_info_changed (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {void *data = record->data;
tools/lib/traceevent/plugin_sched_switch.c +3 -3
@@ -45,7 +45,7 @@ static void write_state(struct trace_seq *s, int val) }static void write_and_save_comm (struct format_field *field, -struct pevent_record *record, +struct tep_record *record,struct trace_seq *s,int pid) {const char *comm;
@@ -65,7 +65,7 @@ static void write_and_save_comm(struct format_field *field, }static int sched_wakeup_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {struct format_field *field;
@@ -94,7 +94,7 @@ static int sched_wakeup_handler(struct trace_seq *s, }static int sched_switch_handler (struct trace_seq *s, -struct pevent_record *record, +struct tep_record *record,struct event_format *event,void *context) {struct format_field *field;
tools/perf/builtin-kmem.c +1 -1
@@ -729,7 +729,7 @@ static char *compact_gfp_string(unsigned long gfp_flags)static int parse_gfp_flags (struct perf_evsel *evsel,struct perf_sample *sample,unsigned int gfp_flags) { -struct pevent_record record = { +struct tep_record record = { .cpu = sample->cpu, .data = sample->raw_data, .size = sample->raw_size,
tools/perf/util/sort.c +1 -1
@@ -601,7 +601,7 @@ static char *get_trace_output(struct hist_entry *he) {struct trace_seq seq;struct perf_evsel *evsel; -struct pevent_record rec = { +struct tep_record rec = { .data = he->raw_data, .size = he->raw_size, };
tools/perf/util/trace-event-parse.c +1 -1
@@ -116,7 +116,7 @@ unsigned long long read_size(struct event_format *event, void *ptr, int size)void event_format__fprintf (struct event_format *event,int cpu,void *data,int size,FILE *fp) { -struct pevent_record record; +struct tep_record record;struct trace_seq s;memset (&record,0 ,sizeof (record));
Signature · 1 line
2.18.0