public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: Display 0x for hex values when printing the attribute
@ 2015-06-11 12:51 Adrian Hunter
  2015-06-11 13:56 ` Arnaldo Carvalho de Melo
  2015-06-12  8:51 ` [tip:perf/core] perf evsel: " tip-bot for Adrian Hunter
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Hunter @ 2015-06-11 12:51 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Jiri Olsa

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>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-12  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:perf/core] perf evsel: " tip-bot for Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox