mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +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:
parent
87972e2605
commit
7f8e7fed4b
@ -308,7 +308,7 @@ class TraceCmdTrace(object):
|
||||
if not found:
|
||||
continue
|
||||
|
||||
thread_string, rest = parts[0].split(' [')
|
||||
thread_string, rest = parts[0].rsplit(' [', 1)
|
||||
cpu_id, ts_string = rest.split('] ')
|
||||
body = parts[2].strip()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user