}
/**
- * pevent_read_number - read a number from data
+ * tep_read_number - read a number from data
* @pevent: handle for the pevent
* @ptr: the raw data
* @size: the size of the data that holds the number
* Returns the number (converted to host) from the
* raw data.
*/
-unsigned long long pevent_read_number(struct tep_handle *pevent,
- const void *ptr, int size)
+unsigned long long tep_read_number(struct tep_handle *pevent,
+ const void *ptr, int size)
{
switch (size) {
case 1:
}
/**
- * pevent_read_number_field - read a number from data
+ * tep_read_number_field - read a number from data
* @field: a handle to the field
* @data: the raw data to read
* @value: the value to place the number in
*
* Returns 0 on success, -1 otherwise.
*/
-int pevent_read_number_field(struct format_field *field, const void *data,
- unsigned long long *value)
+int tep_read_number_field(struct format_field *field, const void *data,
+ unsigned long long *value)
{
if (!field)
return -1;
case 2:
case 4:
case 8:
- *value = pevent_read_number(field->event->pevent,
- data + field->offset, field->size);
+ *value = tep_read_number(field->event->pevent,
+ data + field->offset, field->size);
return 0;
default:
return -1;
if (ret < 0)
return ret;
}
- return pevent_read_number(pevent, data + *offset, *size);
+ return tep_read_number(pevent, data + *offset, *size);
}
static int trace_parse_common_type(struct tep_handle *pevent, void *data)
}
/* must be a number */
- val = pevent_read_number(pevent, data + arg->field.field->offset,
- arg->field.field->size);
+ val = tep_read_number(pevent, data + arg->field.field->offset,
+ arg->field.field->size);
break;
case PRINT_FLAGS:
case PRINT_SYMBOL:
switch (larg->type) {
case PRINT_DYNAMIC_ARRAY:
- offset = pevent_read_number(pevent,
+ offset = tep_read_number(pevent,
data + larg->dynarray.field->offset,
larg->dynarray.field->size);
if (larg->dynarray.field->elementsize)
default:
goto default_op; /* oops, all bets off */
}
- val = pevent_read_number(pevent,
- data + offset, field_size);
+ val = tep_read_number(pevent,
+ data + offset, field_size);
if (typearg)
val = eval_type(val, typearg, 1);
break;
}
break;
case PRINT_DYNAMIC_ARRAY_LEN:
- offset = pevent_read_number(pevent,
- data + arg->dynarray.field->offset,
- arg->dynarray.field->size);
+ offset = tep_read_number(pevent,
+ data + arg->dynarray.field->offset,
+ arg->dynarray.field->size);
/*
* The total allocated length of the dynamic array is
* stored in the top half of the field, and the offset
break;
case PRINT_DYNAMIC_ARRAY:
/* Without [], we pass the address to the dynamic data */
- offset = pevent_read_number(pevent,
- data + arg->dynarray.field->offset,
- arg->dynarray.field->size);
+ offset = tep_read_number(pevent,
+ data + arg->dynarray.field->offset,
+ arg->dynarray.field->size);
/*
* The total allocated length of the dynamic array is
* stored in the top half of the field, and the offset
case PRINT_HEX_STR:
if (arg->hex.field->type == PRINT_DYNAMIC_ARRAY) {
unsigned long offset;
- offset = pevent_read_number(pevent,
+ offset = tep_read_number(pevent,
data + arg->hex.field->dynarray.field->offset,
arg->hex.field->dynarray.field->size);
hex = data + (offset & 0xffff);
unsigned long offset;
struct format_field *field =
arg->int_array.field->dynarray.field;
- offset = pevent_read_number(pevent,
- data + field->offset,
- field->size);
+ offset = tep_read_number(pevent,
+ data + field->offset,
+ field->size);
num = data + (offset & 0xffff);
} else {
field = arg->int_array.field->field.field;
pevent->bprint_ip_field = ip_field;
}
- ip = pevent_read_number(pevent, data + ip_field->offset, ip_field->size);
+ ip = tep_read_number(pevent, data + ip_field->offset, ip_field->size);
/*
* The first arg is the IP pointer.
/* the pointers are always 4 bytes aligned */
bptr = (void *)(((unsigned long)bptr + 3) &
~3);
- val = pevent_read_number(pevent, bptr, vsize);
+ val = tep_read_number(pevent, bptr, vsize);
bptr += vsize;
arg = alloc_arg();
if (!arg) {
pevent->bprint_fmt_field = field;
}
- addr = pevent_read_number(pevent, data + field->offset, field->size);
+ addr = tep_read_number(pevent, data + field->offset, field->size);
printk = find_printk(pevent, addr);
if (!printk) {
offset = field->offset;
len = field->size;
if (field->flags & FIELD_IS_DYNAMIC) {
- val = pevent_read_number(pevent, data + offset, len);
+ val = tep_read_number(pevent, data + offset, len);
offset = val;
len = offset >> 16;
offset &= 0xffff;
field->flags &= ~FIELD_IS_STRING;
}
} else {
- val = pevent_read_number(pevent, data + field->offset,
- field->size);
+ val = tep_read_number(pevent, data + field->offset,
+ field->size);
if (field->flags & FIELD_IS_POINTER) {
trace_seq_printf(s, "0x%llx", val);
} else if (field->flags & FIELD_IS_SIGNED) {
return -1;
}
- if (pevent_read_number_field(field, record->data, val)) {
+ if (tep_read_number_field(field, record->data, val)) {
if (err)
trace_seq_printf(s, " %s=INVALID", name);
return -1;
offset = field->offset;
if (field->flags & FIELD_IS_DYNAMIC) {
- offset = pevent_read_number(event->pevent,
+ offset = tep_read_number(event->pevent,
data + offset, field->size);
*len = offset >> 16;
offset &= 0xffff;
if (!field)
goto failed;
- if (pevent_read_number_field(field, record->data, &val))
+ if (tep_read_number_field(field, record->data, &val))
goto failed;
return trace_seq_printf(s, fmt, val);
if (!field)
goto failed;
- if (pevent_read_number_field(field, record->data, &val))
+ if (tep_read_number_field(field, record->data, &val))
goto failed;
func = find_func(pevent, val);