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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers
Date: Fri, 28 Jul 2017 13:05:45 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Fri, Jul 28, 2017 at 11:55:47AM +0300, Vladimir Sementsov-Ogievskiy 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>
> ---
> 
> Hi all!
> 
> It is hard to read logs, when there are hex and dec numbers in one line, when
> hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm
> not alone who is not comfortable with it, so, what about a patch like this?
> May be regexp's should be improved but, I think, the common idea is clear.

Thanks, this looks useful.  Will review v2.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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