trace: Relax trace-events parsing regex in simpletrace.py
The regular expression to parse trace event definitions assumed the format string would be a simple double-quoted string. However, we now use PRI?64 for portability which splits string literals. The regular expression can disregard the format string entirely since simpletrace.py never needs to use it. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
38cc9b607f
commit
6df40080b0
@ -19,7 +19,7 @@ header_version = 0
|
||||
|
||||
trace_fmt = '=QQQQQQQQ'
|
||||
trace_len = struct.calcsize(trace_fmt)
|
||||
event_re = re.compile(r'(disable\s+)?([a-zA-Z0-9_]+)\(([^)]*)\)\s+"([^"]*)"')
|
||||
event_re = re.compile(r'(disable\s+)?([a-zA-Z0-9_]+)\(([^)]*)\).*')
|
||||
|
||||
def err(msg):
|
||||
sys.stderr.write(msg + '\n')
|
||||
@ -39,7 +39,7 @@ def parse_events(fobj):
|
||||
if m is None:
|
||||
continue
|
||||
|
||||
disable, name, args, fmt = m.groups()
|
||||
disable, name, args = m.groups()
|
||||
events[event_num] = (name,) + get_argnames(args)
|
||||
event_num += 1
|
||||
return events
|
||||
|
Loading…
Reference in New Issue
Block a user