public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Adrian Hunter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/core] perf evsel: Display 0x for hex values when printing the attribute
Date: Fri, 12 Jun 2015 01:51:12 -0700	[thread overview]
Message-ID: <tip-7310aed77ef2928bcfb8ee5ad71e2b091166b85e@git.kernel.org> (raw)
In-Reply-To: <1434027064-7554-1-git-send-email-adrian.hunter@intel.com>

Commit-ID:  7310aed77ef2928bcfb8ee5ad71e2b091166b85e
Gitweb:     http://git.kernel.org/tip/7310aed77ef2928bcfb8ee5ad71e2b091166b85e
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Thu, 11 Jun 2015 15:51:04 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1434027064-7554-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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)

      parent reply	other threads:[~2015-06-12  8:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 12:51 [PATCH] perf tools: Display 0x for hex values when printing the attribute Adrian Hunter
2015-06-11 13:56 ` Arnaldo Carvalho de Melo
2015-06-12  8:51 ` tip-bot for Adrian Hunter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-7310aed77ef2928bcfb8ee5ad71e2b091166b85e@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox