qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers
Date: Fri, 28 Jul 2017 10:04:07 +0100

On 28 July 2017 at 09:55, Vladimir Sementsov-Ogievskiy
<address@hidden> wrote:
> To make logs more readable prefix all hex values with '0x' mark.
> This is needed for consistency too, as a lot of hex values are already
> prefixed with '0x'. Also, bring all hex outputs to the common form -
> use '%#', not '0x%'.
>
> This patch is done by two commands:
> find . -name trace-events | \
>  xargs sed -i 's/%\([-+ 
> *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
> find . -name trace-events | xargs sed -i 's/0x%#/%#/g'
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---

There seem to be an order of magnitude more trace format strings
using 0x% rather than %#, so maybe converting in the other direction
would be better? I think the patch would also be easier to review
if the "no change to the printed value" switches between 0x% and %#
were not in the same patch as "changing the printed value which
didn't have an 0x before".

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]