static unsigned long long
process_defined_func(struct trace_seq *s, void *data, int size,
- struct tep_event_format *event, struct print_arg *arg);
+ struct tep_event_format *event, struct tep_print_arg *arg);
static void free_func_handle(struct tep_function_handler *func);
x++;
}
-struct print_arg *alloc_arg(void)
+struct tep_print_arg *alloc_arg(void)
{
- return calloc(1, sizeof(struct print_arg));
+ return calloc(1, sizeof(struct tep_print_arg));
}
struct cmdline {
}
}
-static void free_flag_sym(struct print_flag_sym *fsym)
+static void free_flag_sym(struct tep_print_flag_sym *fsym)
{
- struct print_flag_sym *next;
+ struct tep_print_flag_sym *next;
while (fsym) {
next = fsym->next;
}
}
-static void free_arg(struct print_arg *arg)
+static void free_arg(struct tep_print_arg *arg)
{
- struct print_arg *farg;
+ struct tep_print_arg *farg;
if (!arg)
return;
}
static enum tep_event_type
-process_arg_token(struct tep_event_format *event, struct print_arg *arg,
+process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg,
char **tok, enum tep_event_type type);
static enum tep_event_type
-process_arg(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
enum tep_event_type type;
char *token;
}
static enum tep_event_type
-process_op(struct tep_event_format *event, struct print_arg *arg, char **tok);
+process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok);
/*
* For __print_symbolic() and __print_flags, we need to completely
* evaluate the first argument, which defines what to print next.
*/
static enum tep_event_type
-process_field_arg(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_field_arg(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
enum tep_event_type type;
}
static enum tep_event_type
-process_cond(struct tep_event_format *event, struct print_arg *top, char **tok)
+process_cond(struct tep_event_format *event, struct tep_print_arg *top, char **tok)
{
- struct print_arg *arg, *left, *right;
+ struct tep_print_arg *arg, *left, *right;
enum tep_event_type type;
char *token = NULL;
}
static enum tep_event_type
-process_array(struct tep_event_format *event, struct print_arg *top, char **tok)
+process_array(struct tep_event_format *event, struct tep_print_arg *top, char **tok)
{
- struct print_arg *arg;
+ struct tep_print_arg *arg;
enum tep_event_type type;
char *token = NULL;
}
}
-static int set_op_prio(struct print_arg *arg)
+static int set_op_prio(struct tep_print_arg *arg)
{
/* single ops are the greatest */
/* Note, *tok does not get freed, but will most likely be saved */
static enum tep_event_type
-process_op(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_op(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
- struct print_arg *left, *right = NULL;
+ struct tep_print_arg *left, *right = NULL;
enum tep_event_type type;
char *token;
if (right->type == PRINT_OP &&
get_op_prio(arg->op.op) < get_op_prio(right->op.op)) {
- struct print_arg tmp;
+ struct tep_print_arg tmp;
/* rotate ops according to the priority */
arg->op.right = right->op.left;
}
static enum tep_event_type
-process_entry(struct tep_event_format *event __maybe_unused, struct print_arg *arg,
+process_entry(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg,
char **tok)
{
enum tep_event_type type;
}
static int alloc_and_process_delim(struct tep_event_format *event, char *next_token,
- struct print_arg **print_arg)
+ struct tep_print_arg **print_arg)
{
- struct print_arg *field;
+ struct tep_print_arg *field;
enum tep_event_type type;
char *token;
int ret = 0;
return ret;
}
-static char *arg_eval (struct print_arg *arg);
+static char *arg_eval (struct tep_print_arg *arg);
static unsigned long long
eval_type_str(unsigned long long val, const char *type, int pointer)
* Try to figure out the type.
*/
static unsigned long long
-eval_type(unsigned long long val, struct print_arg *arg, int pointer)
+eval_type(unsigned long long val, struct tep_print_arg *arg, int pointer)
{
if (arg->type != PRINT_TYPE) {
do_warning("expected type argument");
return eval_type_str(val, arg->typecast.type, pointer);
}
-static int arg_num_eval(struct print_arg *arg, long long *val)
+static int arg_num_eval(struct tep_print_arg *arg, long long *val)
{
long long left, right;
int ret = 1;
return ret;
}
-static char *arg_eval (struct print_arg *arg)
+static char *arg_eval (struct tep_print_arg *arg)
{
long long val;
static char buf[20];
}
static enum tep_event_type
-process_fields(struct tep_event_format *event, struct print_flag_sym **list, char **tok)
+process_fields(struct tep_event_format *event, struct tep_print_flag_sym **list, char **tok)
{
enum tep_event_type type;
- struct print_arg *arg = NULL;
- struct print_flag_sym *field;
+ struct tep_print_arg *arg = NULL;
+ struct tep_print_flag_sym *field;
char *token = *tok;
char *value;
}
static enum tep_event_type
-process_flags(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_flags(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
- struct print_arg *field;
+ struct tep_print_arg *field;
enum tep_event_type type;
char *token = NULL;
}
static enum tep_event_type
-process_symbols(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_symbols(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
- struct print_arg *field;
+ struct tep_print_arg *field;
enum tep_event_type type;
char *token = NULL;
}
static enum tep_event_type
-process_hex_common(struct tep_event_format *event, struct print_arg *arg,
+process_hex_common(struct tep_event_format *event, struct tep_print_arg *arg,
char **tok, enum print_arg_type type)
{
memset(arg, 0, sizeof(*arg));
}
static enum tep_event_type
-process_hex(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_hex(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
return process_hex_common(event, arg, tok, PRINT_HEX);
}
static enum tep_event_type
-process_hex_str(struct tep_event_format *event, struct print_arg *arg,
+process_hex_str(struct tep_event_format *event, struct tep_print_arg *arg,
char **tok)
{
return process_hex_common(event, arg, tok, PRINT_HEX_STR);
}
static enum tep_event_type
-process_int_array(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_int_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
memset(arg, 0, sizeof(*arg));
arg->type = PRINT_INT_ARRAY;
}
static enum tep_event_type
-process_dynamic_array(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_dynamic_array(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
struct tep_format_field *field;
enum tep_event_type type;
}
static enum tep_event_type
-process_dynamic_array_len(struct tep_event_format *event, struct print_arg *arg,
+process_dynamic_array_len(struct tep_event_format *event, struct tep_print_arg *arg,
char **tok)
{
struct tep_format_field *field;
}
static enum tep_event_type
-process_paren(struct tep_event_format *event, struct print_arg *arg, char **tok)
+process_paren(struct tep_event_format *event, struct tep_print_arg *arg, char **tok)
{
- struct print_arg *item_arg;
+ struct tep_print_arg *item_arg;
enum tep_event_type type;
char *token;
static enum tep_event_type
-process_str(struct tep_event_format *event __maybe_unused, struct print_arg *arg,
+process_str(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg,
char **tok)
{
enum tep_event_type type;
}
static enum tep_event_type
-process_bitmask(struct tep_event_format *event __maybe_unused, struct print_arg *arg,
+process_bitmask(struct tep_event_format *event __maybe_unused, struct tep_print_arg *arg,
char **tok)
{
enum tep_event_type type;
static enum tep_event_type
process_func_handler(struct tep_event_format *event, struct tep_function_handler *func,
- struct print_arg *arg, char **tok)
+ struct tep_print_arg *arg, char **tok)
{
- struct print_arg **next_arg;
- struct print_arg *farg;
+ struct tep_print_arg **next_arg;
+ struct tep_print_arg *farg;
enum tep_event_type type;
char *token;
int i;
}
static enum tep_event_type
-process_function(struct tep_event_format *event, struct print_arg *arg,
+process_function(struct tep_event_format *event, struct tep_print_arg *arg,
char *token, char **tok)
{
struct tep_function_handler *func;
}
static enum tep_event_type
-process_arg_token(struct tep_event_format *event, struct print_arg *arg,
+process_arg_token(struct tep_event_format *event, struct tep_print_arg *arg,
char **tok, enum tep_event_type type)
{
char *token;
return type;
}
-static int event_read_print_args(struct tep_event_format *event, struct print_arg **list)
+static int event_read_print_args(struct tep_event_format *event, struct tep_print_arg **list)
{
enum tep_event_type type = TEP_EVENT_ERROR;
- struct print_arg *arg;
+ struct tep_print_arg *arg;
char *token;
int args = 0;
}
static unsigned long long
-eval_num_arg(void *data, int size, struct tep_event_format *event, struct print_arg *arg)
+eval_num_arg(void *data, int size, struct tep_event_format *event, struct tep_print_arg *arg)
{
struct tep_handle *pevent = event->pevent;
unsigned long long val = 0;
unsigned long long left, right;
- struct print_arg *typearg = NULL;
- struct print_arg *larg;
+ struct tep_print_arg *typearg = NULL;
+ struct tep_print_arg *larg;
unsigned long offset;
unsigned int field_size;
static void print_str_arg(struct trace_seq *s, void *data, int size,
struct tep_event_format *event, const char *format,
- int len_arg, struct print_arg *arg)
+ int len_arg, struct tep_print_arg *arg)
{
struct tep_handle *pevent = event->pevent;
- struct print_flag_sym *flag;
+ struct tep_print_flag_sym *flag;
struct tep_format_field *field;
struct printk_map *printk;
long long val, fval;
static unsigned long long
process_defined_func(struct trace_seq *s, void *data, int size,
- struct tep_event_format *event, struct print_arg *arg)
+ struct tep_event_format *event, struct tep_print_arg *arg)
{
struct tep_function_handler *func_handle = arg->func.func;
struct func_params *param;
unsigned long long *args;
unsigned long long ret;
- struct print_arg *farg;
+ struct tep_print_arg *farg;
struct trace_seq str;
struct save_str {
struct save_str *next;
return ret;
}
-static void free_args(struct print_arg *args)
+static void free_args(struct tep_print_arg *args)
{
- struct print_arg *next;
+ struct tep_print_arg *next;
while (args) {
next = args->next;
}
}
-static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event)
+static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event)
{
struct tep_handle *pevent = event->pevent;
struct tep_format_field *field, *ip_field;
- struct print_arg *args, *arg, **next;
+ struct tep_print_arg *args, *arg, **next;
unsigned long long ip, val;
char *ptr;
void *bptr;
}
static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size,
- struct tep_event_format *event, struct print_arg *arg)
+ struct tep_event_format *event, struct tep_print_arg *arg)
{
unsigned char *buf;
const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x";
*/
static int print_ipv4_arg(struct trace_seq *s, const char *ptr, char i,
void *data, int size, struct tep_event_format *event,
- struct print_arg *arg)
+ struct tep_print_arg *arg)
{
unsigned char *buf;
static int print_ipv6_arg(struct trace_seq *s, const char *ptr, char i,
void *data, int size, struct tep_event_format *event,
- struct print_arg *arg)
+ struct tep_print_arg *arg)
{
char have_c = 0;
unsigned char *buf;
static int print_ipsa_arg(struct trace_seq *s, const char *ptr, char i,
void *data, int size, struct tep_event_format *event,
- struct print_arg *arg)
+ struct tep_print_arg *arg)
{
char have_c = 0, have_p = 0;
unsigned char *buf;
static int print_ip_arg(struct trace_seq *s, const char *ptr,
void *data, int size, struct tep_event_format *event,
- struct print_arg *arg)
+ struct tep_print_arg *arg)
{
char i = *ptr; /* 'i' or 'I' */
char ver;
static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event_format *event)
{
struct tep_handle *pevent = event->pevent;
- struct print_fmt *print_fmt = &event->print_fmt;
- struct print_arg *arg = print_fmt->args;
- struct print_arg *args = NULL;
+ struct tep_print_fmt *print_fmt = &event->print_fmt;
+ struct tep_print_arg *arg = print_fmt->args;
+ struct tep_print_arg *args = NULL;
const char *ptr = print_fmt->format;
unsigned long long val;
struct func_map *func;
event->format.fields);
}
-static void print_fields(struct trace_seq *s, struct print_flag_sym *field)
+static void print_fields(struct trace_seq *s, struct tep_print_flag_sym *field)
{
trace_seq_printf(s, "{ %s, %s }", field->value, field->str);
if (field->next) {
}
/* for debugging */
-static void print_args(struct print_arg *args)
+static void print_args(struct tep_print_arg *args)
{
int print_paren = 1;
struct trace_seq s;
if (!ret && (event->flags & TEP_EVENT_FL_ISFTRACE)) {
struct tep_format_field *field;
- struct print_arg *arg, **list;
+ struct tep_print_arg *arg, **list;
/* old ftrace had no args */
list = &event->print_fmt.args;
struct tep_format_field *fields;
};
-struct print_arg_atom {
+struct tep_print_arg_atom {
char *atom;
};
-struct print_arg_string {
+struct tep_print_arg_string {
char *string;
int offset;
};
-struct print_arg_bitmask {
+struct tep_print_arg_bitmask {
char *bitmask;
int offset;
};
-struct print_arg_field {
+struct tep_print_arg_field {
char *name;
struct tep_format_field *field;
};
-struct print_flag_sym {
- struct print_flag_sym *next;
- char *value;
- char *str;
+struct tep_print_flag_sym {
+ struct tep_print_flag_sym *next;
+ char *value;
+ char *str;
};
-struct print_arg_typecast {
+struct tep_print_arg_typecast {
char *type;
- struct print_arg *item;
+ struct tep_print_arg *item;
};
-struct print_arg_flags {
- struct print_arg *field;
- char *delim;
- struct print_flag_sym *flags;
+struct tep_print_arg_flags {
+ struct tep_print_arg *field;
+ char *delim;
+ struct tep_print_flag_sym *flags;
};
-struct print_arg_symbol {
- struct print_arg *field;
- struct print_flag_sym *symbols;
+struct tep_print_arg_symbol {
+ struct tep_print_arg *field;
+ struct tep_print_flag_sym *symbols;
};
-struct print_arg_hex {
- struct print_arg *field;
- struct print_arg *size;
+struct tep_print_arg_hex {
+ struct tep_print_arg *field;
+ struct tep_print_arg *size;
};
-struct print_arg_int_array {
- struct print_arg *field;
- struct print_arg *count;
- struct print_arg *el_size;
+struct tep_print_arg_int_array {
+ struct tep_print_arg *field;
+ struct tep_print_arg *count;
+ struct tep_print_arg *el_size;
};
-struct print_arg_dynarray {
+struct tep_print_arg_dynarray {
struct tep_format_field *field;
- struct print_arg *index;
+ struct tep_print_arg *index;
};
-struct print_arg;
+struct tep_print_arg;
-struct print_arg_op {
+struct tep_print_arg_op {
char *op;
int prio;
- struct print_arg *left;
- struct print_arg *right;
+ struct tep_print_arg *left;
+ struct tep_print_arg *right;
};
struct tep_function_handler;
-struct print_arg_func {
+struct tep_print_arg_func {
struct tep_function_handler *func;
- struct print_arg *args;
+ struct tep_print_arg *args;
};
enum print_arg_type {
PRINT_HEX_STR,
};
-struct print_arg {
- struct print_arg *next;
+struct tep_print_arg {
+ struct tep_print_arg *next;
enum print_arg_type type;
union {
- struct print_arg_atom atom;
- struct print_arg_field field;
- struct print_arg_typecast typecast;
- struct print_arg_flags flags;
- struct print_arg_symbol symbol;
- struct print_arg_hex hex;
- struct print_arg_int_array int_array;
- struct print_arg_func func;
- struct print_arg_string string;
- struct print_arg_bitmask bitmask;
- struct print_arg_op op;
- struct print_arg_dynarray dynarray;
+ struct tep_print_arg_atom atom;
+ struct tep_print_arg_field field;
+ struct tep_print_arg_typecast typecast;
+ struct tep_print_arg_flags flags;
+ struct tep_print_arg_symbol symbol;
+ struct tep_print_arg_hex hex;
+ struct tep_print_arg_int_array int_array;
+ struct tep_print_arg_func func;
+ struct tep_print_arg_string string;
+ struct tep_print_arg_bitmask bitmask;
+ struct tep_print_arg_op op;
+ struct tep_print_arg_dynarray dynarray;
};
};
-struct print_fmt {
+struct tep_print_fmt {
char *format;
- struct print_arg *args;
+ struct tep_print_arg *args;
};
struct tep_event_format {
int id;
int flags;
struct tep_format format;
- struct print_fmt print_fmt;
+ struct tep_print_fmt print_fmt;
char *system;
tep_event_handler_func handler;
void *context;