Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7310aed7 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarAdrian 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 56100321
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)