Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784Ab1CUWfP (ORCPT ); Mon, 21 Mar 2011 18:35:15 -0400 Received: from smtp-out.google.com ([74.125.121.67]:6112 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754733Ab1CUWet (ORCPT ); Mon, 21 Mar 2011 18:34:49 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=L7ARfMRI87lAbr64oss2P55bT16cQEz9Z/D1txRLKGdHWPwSsVcCWRs2ilm7X4tXk A27TNtmY9aZvB8e9xjghw== From: David Sharp To: linux-kernel@vger.kernel.org Cc: mrubin@google.com, David Sharp , Arnaldo Carvalho de Melo , Frederic Weisbecker , Steven Rostedt , Ingo Molnar , Stephane Eranian Subject: [PATCH perf 2/2] perf: trace-event-parse: support printing short fields Date: Mon, 21 Mar 2011 15:34:06 -0700 Message-Id: <1300746846-28245-3-git-send-email-dhsharp@google.com> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1300746846-28245-1-git-send-email-dhsharp@google.com> References: <1300746846-28245-1-git-send-email-dhsharp@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1397 Lines: 47 Handle "%hd" etc. in pretty_print() Signed-off-by: David Sharp Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Steven Rostedt Cc: Ingo Molnar Cc: Stephane Eranian --- tools/perf/util/trace-event-parse.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 67fe01a..0cf4366 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c @@ -2534,6 +2534,9 @@ static void pretty_print(void *data, int size, struct event *event) case '%': printf("%%"); break; + case 'h': + ls--; + goto cont_process; case 'l': ls++; goto cont_process; @@ -2589,6 +2592,12 @@ static void pretty_print(void *data, int size, struct event *event) } } switch (ls) { + case -2: + printf(format, (char)val); + break; + case -1: + printf(format, (short)val); + break; case 0: printf(format, (int)val); break; -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/