Message ID | a5f86bcf03b2ed809245d57f5971ae42a8b85128.camel@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2666628vqg; Wed, 15 Nov 2023 08:48:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHobqxxaIF0qfyCX8CsEx+rxsT8rUXwwASXDrS/DRPzzVd0fp9Q0L7odAOoOTg7dGMeoNbX X-Received: by 2002:a05:6a21:6d93:b0:186:9a3f:f2c4 with SMTP id wl19-20020a056a216d9300b001869a3ff2c4mr10232862pzb.47.1700066902568; Wed, 15 Nov 2023 08:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700066902; cv=none; d=google.com; s=arc-20160816; b=lTFbslkybED9N4X9CfLfPuoIVRCTKLWdMTN6Di3cTcjChY2lzUTy8BB8IZNvvKaM9r DZqwYZialtE5/7aGbcpDNiZBJHRTOAWqB48W2SM9fIR988SPViddyImihAv/0KhNsmJn NVwfLunSyMjyAeiS8AQcllDBWqA+Qz0fl0rmqbJ+5LiMWn47F1lTnHCovUF8i5Wl5ifD bXHMtXyx7Y1OL7F48+in3ZRg67tsWkKB8NsTKvhkiYDeqkJLRYFZ067ghAsxJQ10SRal oGBIW80daaMoRrB44OWhK55lEmcBcwEocPYtoWHtCkg9+WlojTZPcAcZhExPo6yOm95c 5j2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:date:cc:to:from:subject :message-id:dkim-signature; bh=/m64+VL59bE7XoXu9zT2zewLDEhVyoNiu2reFj9BKi0=; fh=+d3Qg7SH9p1K6riQ5TpB+QXgAlfKmP1sAgPHeFK5C3g=; b=wOhBMJMsXnq1OBz9gAMGL/pMai10kEtVHQQO27wyd1Bdk5RNemkhgE+HQTmRspyUvu XibkmeWT3JfnMo65jmqcicyr+NWyWW675MwjqWdkvB80ZpY0gJUWlefCziiaALggwSI4 SEcauCdVsdcBU0rpPWrUVohVIzZOTPbrT5AhssONCdH1Yh9hYN1013X/7yxSxOpxMv8d q2EJzXskPvFU2woJrX/uHEz8YBwljJQEBc0I0lIvg9RnU2XTfGr4ThYtGBjVfOkGPnQn OljVh9bS6oIP5NrEGwcDrI1v9xB5i4DaIwPgj85ZtJhV5K2fYcGmvFqj0dh5zSjMNHW+ LoTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tjOGqrvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id fa14-20020a056a002d0e00b0068a85532963si10639289pfb.160.2023.11.15.08.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tjOGqrvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C285F82164E3; Wed, 15 Nov 2023 08:48:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbjKOQsT (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Wed, 15 Nov 2023 11:48:19 -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 <rfc822;linux-kernel@vger.kernel.org>); 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: <a5f86bcf03b2ed809245d57f5971ae42a8b85128.camel@infradead.org> Subject: [PATCH] PM: tools: Fix sleepgraph syntax error From: David Woodhouse <dwmw2@infradead.org> To: Len Brown <lenb@kernel.org>, Todd E Brandt <todd.e.brandt@linux.intel.com>, Xueqin Luo <luoxueqin@kylinos.cn>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: linux-pm <linux-pm@vger.kernel.org>, linux-kernel <linux-kernel@vger.kernel.org> Date: Wed, 15 Nov 2023 11:47:51 -0500 Content-Type: multipart/signed; micalg="sha-256"; protocol="application/pkcs7-signature"; boundary="=-+lKzRdjWpPAdi9zcnwFB" User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from <dwmw2@infradead.org> by casper.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 08:48:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782649352912297359 X-GMAIL-MSGID: 1782649352912297359 |
Series |
PM: tools: Fix sleepgraph syntax error
|
|
Commit Message
David Woodhouse
Nov. 15, 2023, 4:47 p.m. UTC
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>
Comments
On Wed, Nov 15, 2023 at 11:47:51AM -0500, David Woodhouse wrote: > 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> Had the same issue: Reviewed-by: Wolfram Sang <wsa@kernel.org>
On Wed, Nov 15, 2023 at 6:21 PM Wolfram Sang <wsa@kernel.org> wrote: > > On Wed, Nov 15, 2023 at 11:47:51AM -0500, David Woodhouse wrote: > > 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> > > Had the same issue: > > Reviewed-by: Wolfram Sang <wsa@kernel.org> Applied as 6.7-rc material, thanks!
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)