* and lock depth) and places it into the trace_seq.
*/
void pevent_data_lat_fmt(struct pevent *pevent,
- struct trace_seq *s, struct record *record)
+ struct trace_seq *s, struct pevent_record *record)
{
static int check_lock_depth = 1;
static int lock_depth_exists;
*
* This returns the event id from the @rec.
*/
-int pevent_data_type(struct pevent *pevent, struct record *rec)
+int pevent_data_type(struct pevent *pevent, struct pevent_record *rec)
{
return trace_parse_common_type(pevent, rec->data);
}
*
* This returns the PID from a raw data.
*/
-int pevent_data_pid(struct pevent *pevent, struct record *rec)
+int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec)
{
return parse_common_pid(pevent, rec->data);
}
* writes the print format into the trace_seq.
*/
void pevent_event_info(struct trace_seq *s, struct event_format *event,
- struct record *record)
+ struct pevent_record *record)
{
int print_pretty = 1;
}
void pevent_print_event(struct pevent *pevent, struct trace_seq *s,
- struct record *record)
+ struct pevent_record *record)
{
static char *spaces = " "; /* 20 spaces */
struct event_format *event;
}
int get_field_val(struct trace_seq *s, struct format_field *field,
- const char *name, struct record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record, int err)
+ struct pevent_record *record, int err)
{
struct format_field *field = pevent_find_field(event, name);
unsigned long long val;
#define DEBUG_RECORD 0
#endif
-struct record {
+struct pevent_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 *private;
#if DEBUG_RECORD
- struct record *prev;
- struct record *next;
+ struct pevent_record *prev;
+ struct pevent_record *next;
long alloc_addr;
#endif
};
struct event_format;
typedef int (*pevent_event_handler_func)(struct trace_seq *s,
- struct record *record,
+ struct pevent_record *record,
struct event_format *event,
void *context);
int pevent_pid_is_registered(struct pevent *pevent, int pid);
void pevent_print_event(struct pevent *pevent, struct trace_seq *s,
- struct record *record);
+ struct pevent_record *record);
int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size,
int long_size);
unsigned long size, const char *sys);
void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event,
- const char *name, struct record *record,
+ const char *name, struct pevent_record *record,
int *len, int err);
int pevent_get_field_val(struct trace_seq *s, struct event_format *event,
- const char *name, struct record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record,
+ const char *name, struct pevent_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 record *record, int err);
+ struct pevent_record *record, int err);
int pevent_register_event_handler(struct pevent *pevent, int id, char *sys_name, char *event_name,
pevent_event_handler_func func, void *context);
pevent_find_event_by_name(struct pevent *pevent, const char *sys, const char *name);
void pevent_data_lat_fmt(struct pevent *pevent,
- struct trace_seq *s, struct record *record);
-int pevent_data_type(struct pevent *pevent, struct record *rec);
+ struct trace_seq *s, struct pevent_record *record);
+int pevent_data_type(struct pevent *pevent, struct pevent_record *rec);
struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type);
-int pevent_data_pid(struct pevent *pevent, struct record *rec);
+int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec);
const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid);
void pevent_event_info(struct trace_seq *s, struct event_format *event,
- struct record *record);
+ struct pevent_record *record);
struct event_format **pevent_list_events(struct pevent *pevent, enum event_sort_type);
struct format_field **pevent_event_common_fields(struct event_format *event);
int pevent_filter_match(struct event_filter *filter,
- struct record *record);
+ struct pevent_record *record);
int pevent_event_filtered(struct event_filter *filter,
int event_id);
}
static int test_filter(struct event_format *event,
- struct filter_arg *arg, struct record *record);
+ struct filter_arg *arg, struct pevent_record *record);
static const char *
-get_comm(struct event_format *event, struct record *record)
+get_comm(struct event_format *event, struct pevent_record *record)
{
const char *comm;
int pid;
static unsigned long long
get_value(struct event_format *event,
- struct format_field *field, struct record *record)
+ struct format_field *field, struct pevent_record *record)
{
unsigned long long val;
}
static unsigned long long
-get_arg_value(struct event_format *event, struct filter_arg *arg, struct record *record);
+get_arg_value(struct event_format *event, struct filter_arg *arg, struct pevent_record *record);
static unsigned long long
-get_exp_value(struct event_format *event, struct filter_arg *arg, struct record *record)
+get_exp_value(struct event_format *event, struct filter_arg *arg, struct pevent_record *record)
{
unsigned long long lval, rval;
}
static unsigned long long
-get_arg_value(struct event_format *event, struct filter_arg *arg, struct record *record)
+get_arg_value(struct event_format *event, struct filter_arg *arg, struct pevent_record *record)
{
switch (arg->type) {
case FILTER_ARG_FIELD:
}
static int test_num(struct event_format *event,
- struct filter_arg *arg, struct record *record)
+ struct filter_arg *arg, struct pevent_record *record)
{
unsigned long long lval, rval;
}
}
-static const char *get_field_str(struct filter_arg *arg, struct record *record)
+static const char *get_field_str(struct filter_arg *arg, struct pevent_record *record)
{
const char *val = record->data + arg->str.field->offset;
}
static int test_str(struct event_format *event,
- struct filter_arg *arg, struct record *record)
+ struct filter_arg *arg, struct pevent_record *record)
{
const char *val;
}
static int test_op(struct event_format *event,
- struct filter_arg *arg, struct record *record)
+ struct filter_arg *arg, struct pevent_record *record)
{
switch (arg->op.type) {
case FILTER_OP_AND:
}
static int test_filter(struct event_format *event,
- struct filter_arg *arg, struct record *record)
+ struct filter_arg *arg, struct pevent_record *record)
{
switch (arg->type) {
case FILTER_ARG_BOOLEAN:
* -2 - if no filters exist
*/
int pevent_filter_match(struct event_filter *filter,
- struct record *record)
+ struct pevent_record *record)
{
struct pevent *pevent = filter->pevent;
struct filter_type *filter_type;
int trace_parse_common_type(void *data)
{
- struct record record;
+ struct pevent_record record;
record.data = data;
return pevent_data_type(pevent, &record);
int trace_parse_common_pid(void *data)
{
- struct record record;
+ struct pevent_record record;
record.data = data;
return pevent_data_pid(pevent, &record);
void print_trace_event(int cpu, void *data, int size)
{
struct event_format *event;
- struct record record;
+ struct pevent_record record;
struct trace_seq s;
int type;
void print_event(int cpu, void *data, int size, unsigned long long nsecs,
char *comm)
{
- struct record record;
+ struct pevent_record record;
struct trace_seq s;
int pid;
unsigned long long offset;
unsigned long long size;
unsigned long long timestamp;
- struct record *next;
+ struct pevent_record *next;
char *page;
int cpu;
int index;
return (unsigned long)ptr - (unsigned long)cpu_data[cpu].page;
}
-struct record *trace_peek_data(int cpu)
+struct pevent_record *trace_peek_data(int cpu)
{
- struct record *data;
+ struct pevent_record *data;
void *page = cpu_data[cpu].page;
int idx = cpu_data[cpu].index;
void *ptr = page + idx;
return data;
}
-struct record *trace_read_data(int cpu)
+struct pevent_record *trace_read_data(int cpu)
{
- struct record *data;
+ struct pevent_record *data;
data = trace_peek_data(cpu);
cpu_data[cpu].next = NULL;
int parse_ftrace_file(char *buf, unsigned long size);
int parse_event_file(char *buf, unsigned long size, char *sys);
-struct record *trace_peek_data(int cpu);
+struct pevent_record *trace_peek_data(int cpu);
struct event_format *trace_find_event(int type);
unsigned long long
unsigned long long read_size(void *ptr, int size);
unsigned long long eval_flag(const char *flag);
-struct record *trace_read_data(int cpu);
+struct pevent_record *trace_read_data(int cpu);
int read_tracing_data(int fd, struct list_head *pattrs);
struct tracing_data {