From patchwork Wed Nov 15 16:47:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 744854 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 565B7C072A2 for ; Wed, 15 Nov 2023 16:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229511AbjKOQsS (ORCPT ); Wed, 15 Nov 2023 11:48:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjKOQsS (ORCPT ); Wed, 15 Nov 2023 11:48:18 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61ADD9C; Wed, 15 Nov 2023 08:48:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Type:Date:Cc:To: From:Subject:Message-ID:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=/m64+VL59bE7XoXu9zT2zewLDEhVyoNiu2reFj9BKi0=; b=tjOGqrvUvDMw8pvoWHT1g40V0T +rDrZXm6gZ1LEqfRHYoZXR97sqpTkI9VQwHZwrkQcN5XIs0s9my7JXFoDJg1S+P+m/Ey1BiDYyztN WZuS3v8Bdrfx4xEEGwRJuvNH2FYV+4m9h/eGBzcKktrSf1R31dZjp+3coZZH4QBXTf6O0qS6mdyoc da4XH8fKJNhRMef/J4Q+FGy0q5SSj3mnzJBXCRuq/nmEXh7ang29URTp9WwadCBLhrIx5pRWhBHl/ 0dFM317e1QI4jPAFQPph+7XvFbcvM9Zt84chKz5Rj+4MJbbN4nFQ3kRx0bGRTJeEik1uaPYmsuwTC 0+FuNr+A==; Received: from [12.186.190.1] (helo=u3832b3a9db3152.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1r3J3S-00FIjM-I1; Wed, 15 Nov 2023 16:47:54 +0000 Message-ID: Subject: [PATCH] PM: tools: Fix sleepgraph syntax error From: David Woodhouse To: Len Brown , Todd E Brandt , Xueqin Luo , "Rafael J. Wysocki" Cc: linux-pm , linux-kernel Date: Wed, 15 Nov 2023 11:47:51 -0500 User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: David Woodhouse The sleepgraph tool currently fails: File "/usr/bin/sleepgraph", line 4155 or re.match('psci: CPU(?P[0-9]*) killed.*', msg)): ^ SyntaxError: unmatched ')' Fixes: 34ea427e01ea ("PM: tools: sleepgraph: Recognize "CPU killed" messages") Signed-off-by: David Woodhouse 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[0-9]*) is now offline', msg)) \ + elif(re.match('smpboot: CPU (?P[0-9]*) is now offline', msg) \ or re.match('psci: CPU(?P[0-9]*) killed.*', msg)): # end of a cpu suspend, start of the next m = re.match('smpboot: CPU (?P[0-9]*) is now offline', msg)