From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 3/7] perf evsel: Display 0x for hex values when printing the attribute
Date: Thu, 11 Jun 2015 23:15:39 -0300 [thread overview]
Message-ID: <1434075343-4173-4-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1434075343-4173-1-git-send-email-acme@kernel.org>
From: Adrian Hunter <adrian.hunter@intel.com>
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 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)
--
2.1.0
next prev parent reply other threads:[~2015-06-12 2:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 2:15 [GIT PULL 0/7] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-06-12 2:15 ` [PATCH 1/7] perf tools: Avoid possible race condition in copyfile() Arnaldo Carvalho de Melo
2015-06-12 2:15 ` [PATCH 2/7] perf record: Amend option summaries Arnaldo Carvalho de Melo
2015-06-12 2:15 ` Arnaldo Carvalho de Melo [this message]
2015-06-12 2:15 ` [PATCH 4/7] perf stat: Error out unsupported group leader immediately Arnaldo Carvalho de Melo
2015-06-12 2:15 ` [PATCH 5/7] perf tools: Fix build failure on 32-bit arch Arnaldo Carvalho de Melo
2015-06-12 2:15 ` [PATCH 6/7] trace: Beautify perf_event_open syscall Arnaldo Carvalho de Melo
2015-06-12 2:15 ` [PATCH 7/7] perf tools: Update MANIFEST per files removed from kernel Arnaldo Carvalho de Melo
2015-06-12 8:09 ` [GIT PULL 0/7] perf/core improvements and fixes Ingo Molnar
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=1434075343-4173-4-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).