From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbbFLIv1 (ORCPT ); Fri, 12 Jun 2015 04:51:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34042 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbbFLIvZ (ORCPT ); Fri, 12 Jun 2015 04:51:25 -0400 Date: Fri, 12 Jun 2015 01:51:12 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: acme@redhat.com, tglx@linutronix.de, jolsa@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, adrian.hunter@intel.com, hpa@zytor.com Reply-To: acme@redhat.com, jolsa@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, adrian.hunter@intel.com In-Reply-To: <1434027064-7554-1-git-send-email-adrian.hunter@intel.com> References: <1434027064-7554-1-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf evsel: Display 0x for hex values when printing the attribute Git-Commit-ID: 7310aed77ef2928bcfb8ee5ad71e2b091166b85e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 7310aed77ef2928bcfb8ee5ad71e2b091166b85e Gitweb: http://git.kernel.org/tip/7310aed77ef2928bcfb8ee5ad71e2b091166b85e Author: Adrian Hunter AuthorDate: Thu, 11 Jun 2015 15:51:04 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 11 Jun 2015 10:56:01 -0300 perf evsel: Display 0x for hex values when printing the attribute Need to display '0x' prefix for hex values otherwise it is not obvious they are hex. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1434027064-7554-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index a3e36fc..d4f9994 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1058,7 +1058,7 @@ static void __p_read_format(char *buf, size_t size, u64 value) #define BUF_SIZE 1024 -#define p_hex(val) snprintf(buf, BUF_SIZE, "%"PRIx64, (uint64_t)(val)) +#define p_hex(val) snprintf(buf, BUF_SIZE, "%#"PRIx64, (uint64_t)(val)) #define p_unsigned(val) snprintf(buf, BUF_SIZE, "%"PRIu64, (uint64_t)(val)) #define p_signed(val) snprintf(buf, BUF_SIZE, "%"PRId64, (int64_t)(val)) #define p_sample_type(val) __p_sample_type(buf, BUF_SIZE, val)