diff --git a/wlauto/utils/trace_cmd.py b/wlauto/utils/trace_cmd.py index 9e5162ae..8887cc97 100644 --- a/wlauto/utils/trace_cmd.py +++ b/wlauto/utils/trace_cmd.py @@ -173,9 +173,11 @@ def regex_body_parser(regex, flags=0): EVENT_PARSER_MAP = { } -TRACE_EVENT_REGEX = re.compile(r'^\s+(?P\S+)\s+\[(?P\d+)\]\s+(?P[\d.]+):\s+' +TRACE_EVENT_REGEX = re.compile(r'^\s+(?P\S+.*?\S+)\s+\[(?P\d+)\]\s+(?P[\d.]+):\s+' r'(?P[^:]+):\s+(?P.*?)\s*$') +HEADER_REGEX = re.compile(r'^\s*(?:version|cpus)\s*=\s*([\d.]+)\s*$') + DROPPED_EVENTS_REGEX = re.compile(r'CPU:(?P\d+) \[\d*\s*EVENTS DROPPED\]') @@ -217,6 +219,11 @@ class TraceCmdTrace(object): yield DroppedEventsEvent(match.group('cpu_id')) continue + match = HEADER_REGEX.search(line) + if match: + logger.debug(line.strip()) + continue + match = TRACE_EVENT_REGEX.search(line) if not match: logger.warning('Invalid trace event: "{}"'.format(line))