 8908eb1a4a
			
		
	
	
		8908eb1a4a
		
	
	
	
	
		
			
			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 <vsementsov@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Message-id: 20170731160135.12101-5-vsementsov@virtuozzo.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
		
	
			
		
			
				
	
	
		
			22 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # See docs/devel/tracing.txt for syntax documentation.
 | |
| 
 | |
| # net/vhost-user.c
 | |
| vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
 | |
| 
 | |
| # net/colo.c
 | |
| colo_proxy_main(const char *chr) ": %s"
 | |
| 
 | |
| # net/colo-compare.c
 | |
| colo_compare_main(const char *chr) ": %s"
 | |
| colo_compare_udp_miscompare(const char *sta, int size) ": %s = %d"
 | |
| colo_compare_icmp_miscompare(const char *sta, int size) ": %s = %d"
 | |
| colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, const char *stc, const char *std) "ppkt size = %d, ip_src = %s, ip_dst = %s, spkt size = %d, ip_src = %s, ip_dst = %s"
 | |
| colo_old_packet_check_found(int64_t old_time) "%" PRId64
 | |
| colo_compare_miscompare(void) ""
 | |
| colo_compare_tcp_info(const char *pkt, uint32_t seq, uint32_t ack, int res, uint32_t flag, int size) "side: %s seq/ack= %u/%u res= %d flags= 0x%x pkt_size: %d\n"
 | |
| 
 | |
| # net/filter-rewriter.c
 | |
| colo_filter_rewriter_debug(void) ""
 | |
| colo_filter_rewriter_pkt_info(const char *func, const char *src, const char *dst, uint32_t seq, uint32_t ack, uint32_t flag) "%s: src/dst: %s/%s p: seq/ack=%u/%u  flags=0x%x\n"
 | |
| colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"
 |