From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbbFKN41 (ORCPT ); Thu, 11 Jun 2015 09:56:27 -0400 Received: from mail.kernel.org ([198.145.29.136]:35393 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750833AbbFKN4U (ORCPT ); Thu, 11 Jun 2015 09:56:20 -0400 Date: Thu, 11 Jun 2015 10:56:15 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: linux-kernel@vger.kernel.org, Jiri Olsa Subject: Re: [PATCH] perf tools: Display 0x for hex values when printing the attribute Message-ID: <20150611135615.GC18048@kernel.org> References: <1434027064-7554-1-git-send-email-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434027064-7554-1-git-send-email-adrian.hunter@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jun 11, 2015 at 03:51:04PM +0300, Adrian Hunter escreveu: > Need to display '0x' prefix for hex values otherwise > it is not obvious they are hex. Thanks, applied. - Arnaldo > Signed-off-by: Adrian Hunter > --- > 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 a3e36fc634dc..d4f9994ae47f 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) > -- > 1.9.1