arg->field.name = field;
if (is_flag_field) {
- arg->field.field = pevent_find_any_field(event, arg->field.name);
+ arg->field.field = tep_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_FLAG;
is_flag_field = 0;
} else if (is_symbolic_field) {
- arg->field.field = pevent_find_any_field(event, arg->field.name);
+ arg->field.field = tep_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_SYMBOLIC;
is_symbolic_field = 0;
}
/* Find the field */
- field = pevent_find_field(event, token);
+ field = tep_find_field(event, token);
if (!field)
goto out_free;
arg->type = PRINT_DYNAMIC_ARRAY_LEN;
/* Find the field */
- field = pevent_find_field(event, token);
+ field = tep_find_field(event, token);
if (!field)
goto out_free;
}
/**
- * pevent_find_common_field - return a common field by event
+ * tep_find_common_field - return a common field by event
* @event: handle for the event
* @name: the name of the common field to return
*
* This only searchs the common fields and not all field.
*/
struct format_field *
-pevent_find_common_field(struct event_format *event, const char *name)
+tep_find_common_field(struct event_format *event, const char *name)
{
struct format_field *format;
}
/**
- * pevent_find_field - find a non-common field
+ * tep_find_field - find a non-common field
* @event: handle for the event
* @name: the name of the non-common field
*
* This does not search common fields.
*/
struct format_field *
-pevent_find_field(struct event_format *event, const char *name)
+tep_find_field(struct event_format *event, const char *name)
{
struct format_field *format;
}
/**
- * pevent_find_any_field - find any field by name
+ * tep_find_any_field - find any field by name
* @event: handle for the event
* @name: the name of the field
*
* the non-common ones if a common one was not found.
*/
struct format_field *
-pevent_find_any_field(struct event_format *event, const char *name)
+tep_find_any_field(struct event_format *event, const char *name)
{
struct format_field *format;
- format = pevent_find_common_field(event, name);
+ format = tep_find_common_field(event, name);
if (format)
return format;
- return pevent_find_field(event, name);
+ return tep_find_field(event, name);
}
/**
}
event = pevent->events[0];
- field = pevent_find_common_field(event, type);
+ field = tep_find_common_field(event, type);
if (!field)
return -1;
static int events_id_cmp(const void *a, const void *b);
/**
- * pevent_find_event - find an event by given id
+ * tep_find_event - find an event by given id
* @pevent: a handle to the pevent
* @id: the id of the event
*
* Returns an event that has a given @id.
*/
-struct event_format *pevent_find_event(struct tep_handle *pevent, int id)
+struct event_format *tep_find_event(struct tep_handle *pevent, int id)
{
struct event_format **eventptr;
struct event_format key;
return strtoull(arg->atom.atom, NULL, 0);
case PRINT_FIELD:
if (!arg->field.field) {
- arg->field.field = pevent_find_any_field(event, arg->field.name);
+ arg->field.field = tep_find_any_field(event, arg->field.name);
if (!arg->field.field)
goto out_warning_field;
case PRINT_FIELD:
if (!larg->field.field) {
larg->field.field =
- pevent_find_any_field(event, larg->field.name);
+ tep_find_any_field(event, larg->field.name);
if (!larg->field.field) {
arg = larg;
goto out_warning_field;
case PRINT_FIELD:
field = arg->field.field;
if (!field) {
- field = pevent_find_any_field(event, arg->field.name);
+ field = tep_find_any_field(event, arg->field.name);
if (!field) {
str = arg->field.name;
goto out_warning_field;
field = arg->hex.field->field.field;
if (!field) {
str = arg->hex.field->field.name;
- field = pevent_find_any_field(event, str);
+ field = tep_find_any_field(event, str);
if (!field)
goto out_warning_field;
arg->hex.field->field.field = field;
field = arg->int_array.field->field.field;
if (!field) {
str = arg->int_array.field->field.name;
- field = pevent_find_any_field(event, str);
+ field = tep_find_any_field(event, str);
if (!field)
goto out_warning_field;
arg->int_array.field->field.field = field;
if (arg->string.offset == -1) {
struct format_field *f;
- f = pevent_find_any_field(event, arg->string.string);
+ f = tep_find_any_field(event, arg->string.string);
arg->string.offset = f->offset;
}
str_offset = data2host4(pevent, data + arg->string.offset);
if (arg->bitmask.offset == -1) {
struct format_field *f;
- f = pevent_find_any_field(event, arg->bitmask.bitmask);
+ f = tep_find_any_field(event, arg->bitmask.bitmask);
arg->bitmask.offset = f->offset;
}
bitmask_offset = data2host4(pevent, data + arg->bitmask.offset);
ip_field = pevent->bprint_ip_field;
if (!field) {
- field = pevent_find_field(event, "buf");
+ field = tep_find_field(event, "buf");
if (!field) {
do_warning_event(event, "can't find buffer field for binary printk");
return NULL;
}
- ip_field = pevent_find_field(event, "ip");
+ ip_field = tep_find_field(event, "ip");
if (!ip_field) {
do_warning_event(event, "can't find ip field for binary printk");
return NULL;
field = pevent->bprint_fmt_field;
if (!field) {
- field = pevent_find_field(event, "fmt");
+ field = tep_find_field(event, "fmt");
if (!field) {
do_warning_event(event, "can't find format field for binary printk");
return NULL;
fmt = "%.2x%.2x%.2x%.2x%.2x%.2x";
if (!arg->field.field) {
arg->field.field =
- pevent_find_any_field(event, arg->field.name);
+ tep_find_any_field(event, arg->field.name);
if (!arg->field.field) {
do_warning_event(event, "%s: field %s not found",
__func__, arg->field.name);
if (!arg->field.field) {
arg->field.field =
- pevent_find_any_field(event, arg->field.name);
+ tep_find_any_field(event, arg->field.name);
if (!arg->field.field) {
do_warning("%s: field %s not found",
__func__, arg->field.name);
if (!arg->field.field) {
arg->field.field =
- pevent_find_any_field(event, arg->field.name);
+ tep_find_any_field(event, arg->field.name);
if (!arg->field.field) {
do_warning("%s: field %s not found",
__func__, arg->field.name);
if (!arg->field.field) {
arg->field.field =
- pevent_find_any_field(event, arg->field.name);
+ tep_find_any_field(event, arg->field.name);
if (!arg->field.field) {
do_warning("%s: field %s not found",
__func__, arg->field.name);
*/
struct event_format *pevent_data_event_from_type(struct tep_handle *pevent, int type)
{
- return pevent_find_event(pevent, type);
+ return tep_find_event(pevent, type);
}
/**
type = trace_parse_common_type(pevent, record->data);
- return pevent_find_event(pevent, type);
+ return tep_find_event(pevent, type);
}
/**
if (!event)
return NULL;
- field = pevent_find_field(event, name);
+ field = tep_find_field(event, name);
if (!field) {
if (err)
if (!event)
return -1;
- field = pevent_find_field(event, name);
+ field = tep_find_field(event, name);
return get_field_val(s, field, name, record, val, err);
}
if (!event)
return -1;
- field = pevent_find_common_field(event, name);
+ field = tep_find_common_field(event, name);
return get_field_val(s, field, name, record, val, err);
}
if (!event)
return -1;
- field = pevent_find_any_field(event, name);
+ field = tep_find_any_field(event, name);
return get_field_val(s, field, name, record, val, err);
}
struct event_format *event, const char *name,
struct tep_record *record, int err)
{
- struct format_field *field = pevent_find_field(event, name);
+ struct format_field *field = tep_find_field(event, name);
unsigned long long val;
if (!field)
struct event_format *event, const char *name,
struct tep_record *record, int err)
{
- struct format_field *field = pevent_find_field(event, name);
+ struct format_field *field = tep_find_field(event, name);
struct tep_handle *pevent = event->pevent;
unsigned long long val;
struct func_map *func;
if (id >= 0) {
/* search by id */
- event = pevent_find_event(pevent, id);
+ event = tep_find_event(pevent, id);
if (!event)
return NULL;
if (event_name && (strcmp(event_name, event->name) != 0))