aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2010-10-18 13:42:54 +0100
committerBlue Swirl <blauwirbel@gmail.com>2010-10-20 16:27:51 +0000
commit6df40080b00ecd004466714c25cb762056036c56 (patch)
tree787384f63dd700c659b14e84b82a6fb4b4b85be5
parent38cc9b607f85017b095793cab6c129bc9844f441 (diff)
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>
-rwxr-xr-xsimpletrace.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/simpletrace.py b/simpletrace.py
index c2cf1682d0..553a72709f 100755
--- a/simpletrace.py
+++ b/simpletrace.py
@@ -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