diff options
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 8f450adaa9c2..0362d575de7d 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -3435,6 +3435,19 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg | |||
3435 | goto out_warning_op; | 3435 | goto out_warning_op; |
3436 | } | 3436 | } |
3437 | break; | 3437 | break; |
3438 | case PRINT_DYNAMIC_ARRAY: | ||
3439 | /* Without [], we pass the address to the dynamic data */ | ||
3440 | offset = pevent_read_number(pevent, | ||
3441 | data + arg->dynarray.field->offset, | ||
3442 | arg->dynarray.field->size); | ||
3443 | /* | ||
3444 | * The actual length of the dynamic array is stored | ||
3445 | * in the top half of the field, and the offset | ||
3446 | * is in the bottom half of the 32 bit field. | ||
3447 | */ | ||
3448 | offset &= 0xffff; | ||
3449 | val = (unsigned long long)(data + offset); | ||
3450 | break; | ||
3438 | default: /* not sure what to do there */ | 3451 | default: /* not sure what to do there */ |
3439 | return 0; | 3452 | return 0; |
3440 | } | 3453 | } |