[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150611135615.GC18048@kernel.org>
Date: Thu, 11 Jun 2015 10:56:15 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH] perf tools: Display 0x for hex values when printing the
attribute
Em Thu, Jun 11, 2015 at 03:51:04PM +0300, Adrian Hunter escreveu:
> Need to display '0x' prefix for hex values otherwise
> it is not obvious they are hex.
Thanks, applied.
- Arnaldo
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists