Commit 6df40080 authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Blue Swirl

trace: Relax trace-events parsing regex in

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
never needs to use it.
Signed-off-by: default avatarStefan Hajnoczi <>
Signed-off-by: default avatarBlue Swirl <>
parent 38cc9b60
......@@ -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:
disable, name, args, fmt = m.groups()
disable, name, args = m.groups()
events[event_num] = (name,) + get_argnames(args)
event_num += 1
return events
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment