1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

utils/trace_cmd: fix event parsing

Make event preamble parsing more robust in cases there are multiple
instances of ' [' (e.g. as part of thread name) by splitting exactly
once from the right. The right-most columns are the timestamp and the
cpu id, and much more restricted (and therefore predictable) in their
formatting.
This commit is contained in:
Sergei Trofimov 2017-07-20 15:52:31 +01:00
parent 87972e2605
commit 7f8e7fed4b

View File

@ -308,7 +308,7 @@ class TraceCmdTrace(object):
if not found: if not found:
continue continue
thread_string, rest = parts[0].split(' [') thread_string, rest = parts[0].rsplit(' [', 1)
cpu_id, ts_string = rest.split('] ') cpu_id, ts_string = rest.split('] ')
body = parts[2].strip() body = parts[2].strip()