[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1299715137-22768-1-git-send-email-dhsharp@google.com>
Date: Wed, 9 Mar 2011 15:58:55 -0800
From: David Sharp <dhsharp@...gle.com>
To: linux-kernel@...r.kernel.org, rostedt@...dmis.org
Cc: mrubin@...gle.com, David Sharp <dhsharp@...gle.com>
Subject: [PATCH trace-cmd 1/3] parse-events: Add support for printing short fields.
Handle "%hd" etc. in pretty_print()
Signed-off-by: David Sharp <dhsharp@...gle.com>
Google-Bug-Id: 3501052
---
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
case '#':
/* FIXME: need to handle properly */
goto cont_process;
+ case 'h':
+ ls--;
+ goto cont_process;
case 'l':
ls++;
goto cont_process;
@@ -3687,6 +3690,18 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
strcpy(format, "0x%llx");
}
switch (ls) {
+ case -2:
+ if (len_as_arg)
+ trace_seq_printf(s, format, len_arg, (char)val);
+ else
+ trace_seq_printf(s, format, (char)val);
+ break;
+ case -1:
+ if (len_as_arg)
+ trace_seq_printf(s, format, len_arg, (short)val);
+ else
+ trace_seq_printf(s, format, (short)val);
+ break;
case 0:
if (len_as_arg)
trace_seq_printf(s, format, len_arg, (int)val);
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists