diff options
author | David Sharp <dhsharp@google.com> | 2011-03-09 18:58:55 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-09 20:24:22 -0500 |
commit | 8037d12a9132dcdc42430b1d94548e1890e31553 (patch) | |
tree | 05558a33e7b97757a5d13fb23acac3224517534d | |
parent | fdd3983719f9d762111d56072b27ff48074d4d1f (diff) |
parse-events: Add support for printing short fields
Handle "%hd" etc. in pretty_print()
Signed-off-by: David Sharp <dhsharp@google.com>
LKML-Reference: <1299715137-22768-1-git-send-email-dhsharp@google.com>
Google-Bug-Id: 3501052
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | parse-events.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/parse-events.c b/parse-events.c index 3d59d92..bfb7ff5 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -3607,6 +3607,9 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event | |||
3607 | case '#': | 3607 | case '#': |
3608 | /* FIXME: need to handle properly */ | 3608 | /* FIXME: need to handle properly */ |
3609 | goto cont_process; | 3609 | goto cont_process; |
3610 | case 'h': | ||
3611 | ls--; | ||
3612 | goto cont_process; | ||
3610 | case 'l': | 3613 | case 'l': |
3611 | ls++; | 3614 | ls++; |
3612 | goto cont_process; | 3615 | goto cont_process; |
@@ -3687,6 +3690,18 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event | |||
3687 | strcpy(format, "0x%llx"); | 3690 | strcpy(format, "0x%llx"); |
3688 | } | 3691 | } |
3689 | switch (ls) { | 3692 | switch (ls) { |
3693 | case -2: | ||
3694 | if (len_as_arg) | ||
3695 | trace_seq_printf(s, format, len_arg, (char)val); | ||
3696 | else | ||
3697 | trace_seq_printf(s, format, (char)val); | ||
3698 | break; | ||
3699 | case -1: | ||
3700 | if (len_as_arg) | ||
3701 | trace_seq_printf(s, format, len_arg, (short)val); | ||
3702 | else | ||
3703 | trace_seq_printf(s, format, (short)val); | ||
3704 | break; | ||
3690 | case 0: | 3705 | case 0: |
3691 | if (len_as_arg) | 3706 | if (len_as_arg) |
3692 | trace_seq_printf(s, format, len_arg, (int)val); | 3707 | trace_seq_printf(s, format, len_arg, (int)val); |