Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM: tools: Fix sleepgraph syntax error

The sleepgraph tool currently fails:

File "/usr/bin/sleepgraph", line 4155
or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)):
^
SyntaxError: unmatched ')'

Fixes: 34ea427e01ea ("PM: tools: sleepgraph: Recognize "CPU killed" messages")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

David Woodhouse and committed by
Rafael J. Wysocki
b85e2dab 98b1cc82

+1 -1
+1 -1
tools/power/pm-graph/sleepgraph.py
··· 4151 4151 elif(re.match('Enabling non-boot CPUs .*', msg)): 4152 4152 # start of first cpu resume 4153 4153 cpu_start = ktime 4154 - elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)) \ 4154 + elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg) \ 4155 4155 or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)): 4156 4156 # end of a cpu suspend, start of the next 4157 4157 m = re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)