* 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;
  *
  * 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);
 }
  *
  * 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);
 }
  *
  * 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);
 }
  *
  *  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);
 }
  * 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;
 
  * 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;
 
  */
 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;
  */
 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;
  */
 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;
 }
 
 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;
 
 }
 
 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) {
  * 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;
  * 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;
  * 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;
  * 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;
  */
 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;
  */
 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;
 
 #define DEBUG_RECORD 0
 #endif
 
-struct pevent_record {
+struct tep_record {
        unsigned long long      ts;
        unsigned long long      offset;
        long long               missed_events;  /* buffer dropped events before */
        int                     locked;         /* Do not free, even if ref_count is zero */
        void                    *priv;
 #if DEBUG_RECORD
-       struct pevent_record    *prev;
-       struct pevent_record    *next;
+       struct tep_record       *prev;
+       struct tep_record       *next;
        long                    alloc_addr;
 #endif
 };
 struct event_format;
 
 typedef int (*pevent_event_handler_func)(struct trace_seq *s,
-                                        struct pevent_record *record,
+                                        struct tep_record *record,
                                         struct event_format *event,
                                         void *context);
 
 
 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 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);
 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);
 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);
 
 int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size,
                             int long_size);
 void pevent_free_format_field(struct format_field *field);
 
 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);
 
 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);
 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);
 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);
 
 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);
 
 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);
 
 int pevent_register_event_handler(struct tep_handle *pevent, int id,
                                  const char *sys_name, const char *event_name,
 pevent_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name);
 
 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);
 
 void pevent_data_lat_fmt(struct tep_handle *pevent,
-                        struct trace_seq *s, struct pevent_record *record);
-int pevent_data_type(struct tep_handle *pevent, struct pevent_record *rec);
+                        struct trace_seq *s, struct tep_record *record);
+int pevent_data_type(struct tep_handle *pevent, struct tep_record *rec);
 struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type);
-int pevent_data_pid(struct tep_handle *pevent, struct pevent_record *rec);
-int pevent_data_preempt_count(struct tep_handle *pevent, struct pevent_record *rec);
-int pevent_data_flags(struct tep_handle *pevent, struct pevent_record *rec);
+int pevent_data_pid(struct tep_handle *pevent, struct tep_record *rec);
+int pevent_data_preempt_count(struct tep_handle *pevent, struct tep_record *rec);
+int pevent_data_flags(struct tep_handle *pevent, struct tep_record *rec);
 const char *pevent_data_comm_from_pid(struct tep_handle *pevent, int pid);
 struct cmdline;
 struct cmdline *pevent_data_pid_from_comm(struct tep_handle *pevent, const char *comm,
 void pevent_print_fields(struct trace_seq *s, void *data,
                         int size __maybe_unused, struct event_format *event);
 void pevent_event_info(struct trace_seq *s, struct event_format *event,
-                      struct pevent_record *record);
+                      struct tep_record *record);
 int pevent_strerror(struct tep_handle *pevent, enum pevent_errno errnum,
                    char *buf, size_t buflen);
 
                                               const char *filter_str);
 
 enum pevent_errno pevent_filter_match(struct event_filter *filter,
-                                     struct pevent_record *record);
+                                     struct tep_record *record);
 
 int pevent_filter_strerror(struct event_filter *filter, enum pevent_errno err,
                           char *buf, size_t buflen);
 
 }
 
 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;
 
 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;
 
 
 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;
 
 
 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:
 }
 
 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;
 
        }
 }
 
-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;
 }
 
 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;
 
 }
 
 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:
 }
 
 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) {
                /*
  * 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;
 
        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;
 
 #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=");
 }
 
 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=");
 
 
 #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;
 
        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;
        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;
 #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;
 }
 
 
-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)
        return 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);
        };
 };
 
-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;
 }
 
 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;
 
 #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;
 
 }
 
 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;
 }
 
 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;
 }
 
 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;
 
 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,
 
 {
        struct trace_seq seq;
        struct perf_evsel *evsel;
-       struct pevent_record rec = {
+       struct tep_record rec = {
                .data = he->raw_data,
                .size = he->raw_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));