On Sat, Jul 29, 2017 at 04:11:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The only exception are groups of numers separated by symbols > '.', ' ', ':', '/', like 'ab.09.7d'. > > This patch is made by the following: > > > find . -name trace-events | xargs python script.py > > where script.py is the following python script: > ========================= > #!/usr/bin/env python > > import sys > import re > import fileinput > > rhex = '%[-+ *.0-9]*(?:[hljztL]|ll|hh)?(?:x|X|"\s*PRI[xX][^"]*"?)' > rgroup = re.compile('((?:' + rhex + '[.:/ ])+' + rhex + ')') > rbad = re.compile('(?<!0x)' + rhex) > > files = sys.argv[1:] > > for fname in files: > for line in fileinput.input(fname, inplace=True): > arr = re.split(rgroup, line) > for i in range(0, len(arr), 2): > arr[i] = re.sub(rbad, '0x\g<0>', arr[i]) > > sys.stdout.write(''.join(arr)) > ========================= > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > accel/tcg/trace-events | 2 +- > block/trace-events | 22 +++---- > hw/audio/trace-events | 4 +- > hw/char/trace-events | 12 ++-- > hw/display/trace-events | 12 ++-- > hw/dma/trace-events | 20 +++--- > hw/i386/xen/trace-events | 4 +- > hw/input/trace-events | 4 +- > hw/intc/trace-events | 156 > +++++++++++++++++++++++----------------------- > hw/isa/trace-events | 4 +- > hw/misc/trace-events | 78 +++++++++++------------ > hw/net/trace-events | 34 +++++----- > hw/nvram/trace-events | 2 +- > hw/ppc/trace-events | 64 +++++++++---------- > hw/s390x/trace-events | 20 +++--- > hw/scsi/trace-events | 112 ++++++++++++++++----------------- > hw/sd/trace-events | 4 +- > hw/timer/trace-events | 20 +++--- > hw/usb/trace-events | 56 ++++++++--------- > hw/vfio/trace-events | 44 ++++++------- > hw/virtio/trace-events | 6 +- > linux-user/trace-events | 10 +-- > migration/trace-events | 36 +++++------ > nbd/trace-events | 18 +++--- > net/trace-events | 4 +- > target/arm/trace-events | 10 +-- > target/s390x/trace-events | 2 +- > target/sparc/trace-events | 30 ++++----- > 28 files changed, 395 insertions(+), 395 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature