projects/linux·commit b85e2dab

PM: tools: Fix sleepgraph syntax error

b85e2dab · David Woodhouse <[email protected]> · 2023-11-15 11:47:51 -05:00

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 <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Commit
b85e2dab33ce467e8dcf1cb6c0c587132ff17f56
Parents
98b1cc82

Changes

1 files changed · +1 −1

FileStatusAddDelContent
tools/power/pm-graph/sleepgraph.pymodified+1−1View file

tools/power/pm-graph/sleepgraph.py

View file
diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py
index 4a356a7..40ad221 100755
--- a/tools/power/pm-graph/sleepgraph.py
+++ b/tools/power/pm-graph/sleepgraph.py
@@ -4151,7 +4151,7 @@ def parseKernelLog(data):
elif(re.match('Enabling non-boot CPUs .*', msg)):
# start of first cpu resume
cpu_start = ktime
- elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)) \
+ elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg) \
or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)):
# end of a cpu suspend, start of the next
m = re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)