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: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers
Date: Fri, 28 Jul 2017 12:14:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

28.07.2017 12:06, Daniel P. Berrange wrote:
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'
I fear that despite your cleanup, these mistakes will be frequently
re-introduced.  IOW, I think you should add to scripts/checkpatch.pl
to re-validate any patch which touches a trace-events file, to
prevent further regressions.

Good point, I'll try to do it.


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.
Yeah, I agree - mixing decimal & hex values with no 0x prefix is horribly
misleading at best.

Thank you!




Regards,
Daniel


--
Best regards,
Vladimir




reply via email to

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