diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-06-11 15:51:04 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-06-11 10:56:01 -0300 |
commit | 7310aed77ef2928bcfb8ee5ad71e2b091166b85e (patch) | |
tree | bcd03113f31fe1e256d448feb244e7f0d14ca2a6 /tools | |
parent | 5610032135c05e7bf9cba231826577a01719d010 (diff) | |
download | blackbird-op-linux-7310aed77ef2928bcfb8ee5ad71e2b091166b85e.tar.gz blackbird-op-linux-7310aed77ef2928bcfb8ee5ad71e2b091166b85e.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/evsel.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |