public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  PM: tools: Fix sleepgraph syntax error
@ 2023-11-15 16:47 David Woodhouse
  2023-11-15 17:21 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2023-11-15 16:47 UTC (permalink / raw)
  To: Len Brown, Todd E Brandt, Xueqin Luo, Rafael J. Wysocki
  Cc: linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

From: David Woodhouse <dwmw@amazon.co.uk>

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>

diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py
index 4a356a706785..40ad221e8881 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)


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-20 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 16:47 [PATCH] PM: tools: Fix sleepgraph syntax error David Woodhouse
2023-11-15 17:21 ` Wolfram Sang
2023-11-20 17:01   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox