Message ID | tencent_6142CF595B97172A46AF02A34D885D060108@qq.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4201513vqr; Wed, 21 Jun 2023 01:14:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ciG2nSiXiYi8SGv6JXisM2TfaS6VAfOL8H+qQI5wD16begGhZ+9gEI1NegwPp/PoVax33 X-Received: by 2002:a05:6808:2029:b0:3a0:338f:7931 with SMTP id q41-20020a056808202900b003a0338f7931mr7636890oiw.24.1687335243280; Wed, 21 Jun 2023 01:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687335243; cv=none; d=google.com; s=arc-20160816; b=aDPHjFR5aENZgfo7OJclqFSsmoVKgsZ7cksUhFPAm4QUlbSJ4BiH67kEy8Q70JG+7E 7G/FCVJfHB0dpUs8L3VaRhNpJubgaXKYYPSz8l5ZZmcxDDN7j/mBTZxreVdAlcqplBBe 9DdzWRAx6gAC7Od17OJMy8rF2kWC9/Vm8a4zl5IowmqqG64/dPELq+YfG2TdzhFkfCIv ObC4JSakoAVtrXK12Pf9DAm0PhzwInsPCS9eHZD9Am9ndAscDwtF8SAnIp4ARSUKNIeC sJ7Xn13BWwBBgM1Zl27wllbwBbeKYXF1TLiynk7wcROGPNH9QosRgzcgtvaO3GqTMv7v bTAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :subject:cc:to:from:message-id:dkim-signature; bh=6S232VMjC7wbziWgrkeXXOdDe+/491iWQmYYurhqPhY=; b=HOdKfVBcazoYFn5kJU82y/sN9K6B9UIiXdRDzGJK+KQx6EJnBLGCgbT9tBr4XSPG4z 5aQKATfLGbQA/FpDMq+OH3I1v34tJzGsjsg8PSfXJE0K/4mT0X9NPWum/UTLd1LaEyOw ZzxjKM9yl8tD26uu6E969vXRSzge+geDXnK0bMJ2s+tQ3SyimGh2aPKInYCqO1hzLvT6 7QQsGteq3qyuWm0VsT+FGVKTjGC7LEn0Tcy5oQXRky+Zfn4hZMX9jb+XtlZoix+w8yoW S8xVVue0vIoosD8rYXmDZX4e+MHqwbTiM/AAKstOhU/rrhZWIYf4pDzvZ6t9OWugxmsx VMMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=zRpgKOSq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d128-20020a633686000000b00517a4a75528si3795553pga.162.2023.06.21.01.13.50; Wed, 21 Jun 2023 01:14:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=zRpgKOSq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbjFUHue (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Wed, 21 Jun 2023 03:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbjFUHub (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Jun 2023 03:50:31 -0400 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A6EC83; Wed, 21 Jun 2023 00:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1687333825; bh=6S232VMjC7wbziWgrkeXXOdDe+/491iWQmYYurhqPhY=; h=From:To:Cc:Subject:Date; b=zRpgKOSqxCP/4i9St0ozdufw2PbdrHBwGtd7F3XQTp/3YHXPV9dBZWC/oHyccmffd WrrhCg1mZl4p9ls9JYRwdMKUNRnbUi9rmHUWsn9Wh0yEfg/72t5h2/3RG/l7wKDoBz ttnwDJgFQKTWstQUAVeP2hiB5JHCnP+3zT2je/Hc= Received: from localhost.localdomain ([39.156.73.12]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id B0E042AA; Wed, 21 Jun 2023 15:44:14 +0800 X-QQ-mid: xmsmtpt1687333454tfjy6s68a Message-ID: <tencent_6142CF595B97172A46AF02A34D885D060108@qq.com> X-QQ-XMAILINFO: OZsapEVPoiO6eY0DWtcWpjTtkqvDLES3BnTBVKNv3l0ZaoH54gYPz06I+g/oKg lp5WLi9U9wSKT/2itYOdWzsdQwny/nVUVQH9Abg4Jx3B/e9RRMK3oHraS/uiH/jVvygzOTsWhWET qXa0uwT2TCNgv1mlvJ2UgRKRsDTSfA7o8sbv0OGxhdWCfqmj8+MFB/oVGeS2Nq/okfkQ5T8iU4gj Ywt6AB5YXzWgNqeBNv+ueD+VAEyyoWy4sFsBGY5PDg+mHiV9VV7+yEZGwjFjHtScy4Kv3lJMg76B AOPi8pMYrYZZARbV27YRmScKekrVgNXSuLM4iJnM/IqxFcf+xTd/PyvV/LSDUKTry5M3U+eHUyB4 7+xEupHa2S4IeLdUvOtl2hlOrc8ar0CbCHk36bIBxmt0n94Be6OnmdjCXQuZw7UBOLEL4jI4hBCQ WnRxEdKOfzO68Sa/8EhqlcI1xI87uvwaPPTMxitNfMOkFZYQO1QSZfUE1VUK0LcQpSFZgL/0zM8Y 65bseXdx0N8kju/Yh/koiODifdukB48B8eGl+jpzz1s1VUbv82NjvYRPAvnEupoWuTT6cXodK9yq FwoTCmKHTX7slCCqz5IGyjRfjyQymOwA5jOEIAiHIt80SP8GrRhRcgIwQnWZeIg6T8mWxGMNJWFm 3UCiZ3KJSvySL5KaIHfXu8xoQD9vWhXnLMBONIwZ/xk73HAQ/RW4TDnuIImqI3bi5JReev9UYz35 91hjGKcr8ucM1eLbFbzjMygSlxBm2lf4vsNpAnFDDKYpBviGMzzk/6l0U5pPvREgi4F3V42vj3mt WJ1PdRj7ZARY0lxskg6r7XVNmNAKCQ1zobNl8QLFWhTnS049DyAA3tf1DVvBjqEI3riBkIv8ZKfZ LW/PRp544bySZner/x8iNDq29652cleWYaXUd8u6NxWnRpAjnMI4IVRph1nMi2ZbSeyncpqnd4+Z LhmMySxek9gvbJsgOJFc5S2vFZHGbPgmezlNfNyGpBXSCIfTWi+Ftp/6shlVU+Z2wnEHCLAiym65 TxayS1qQ== X-QQ-XMRINFO: OaHeJnMbHdYJoNPX7mruotAPXHzc5BrOrw== From: Rong Tao <rtoax@foxmail.com> To: corbet@lwn.net Cc: rongtao@cestc.cn, linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] docs: trace: Convert decode_msr.py print syntax to python3 Date: Wed, 21 Jun 2023 15:44:12 +0800 X-OQ-MSGID: <20230621074413.88019-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RDNS_DYNAMIC,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769299239576483574?= X-GMAIL-MSGID: =?utf-8?q?1769299239576483574?= |
Series |
docs: trace: Convert decode_msr.py print syntax to python3
|
|
Commit Message
Rong Tao
June 21, 2023, 7:44 a.m. UTC
From: Rong Tao <rongtao@cestc.cn> Convert the decode_msr.py file to python3 to solve the following running errors: File "Documentation/trace/postprocess/decode_msr.py", line 35 print j, ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(j, end=" ")? Signed-off-by: Rong Tao <rongtao@cestc.cn> --- Documentation/trace/postprocess/decode_msr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
[Adding Andi] Rong Tao <rtoax@foxmail.com> writes: > From: Rong Tao <rongtao@cestc.cn> > > Convert the decode_msr.py file to python3 to solve the following running > errors: > > File "Documentation/trace/postprocess/decode_msr.py", line 35 > print j, > ^ > SyntaxError: Missing parentheses in call to 'print'. Did you mean > print(j, end=" ")? > > Signed-off-by: Rong Tao <rongtao@cestc.cn> > --- > Documentation/trace/postprocess/decode_msr.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/trace/postprocess/decode_msr.py b/Documentation/trace/postprocess/decode_msr.py > index aa9cc7abd5c2..2d45d6c14987 100644 > --- a/Documentation/trace/postprocess/decode_msr.py > +++ b/Documentation/trace/postprocess/decode_msr.py > @@ -32,6 +32,6 @@ for j in sys.stdin: > break > if r: > j = j.replace(" " + m.group(2), " " + r + "(" + m.group(2) + ")") > - print j, > + print(j + ",") So I certainly have no problem applying this. But it occurs to me that this file hasn't been touched since it was added in 2015, and nobody has complained that it doesn't work with modern Python. That leads me to wonder if it's being used at all. Assuming that there is value in keeping it, I wonder if a move to samples/ might make sense? Thanks, jon
Thanks for your reply, jon. How about i submit v2 to remove decode_msr.py totally? Do the two remaining perl scripts need to be removed? - Documentation/trace/postprocess/trace-pagealloc-postprocess.pl - Documentation/trace/postprocess/trace-vmscan-postprocess.pl Thanks, Rong Tao.
On Sun, Jun 25, 2023 at 09:03:57AM +0800, Rong Tao wrote: > Thanks for your reply, jon. How about i submit v2 to remove decode_msr.py > totally? Well only if you can explain how the MSR tracer should be used without it? Not sure I understand the whole discussion here. -Andi
diff --git a/Documentation/trace/postprocess/decode_msr.py b/Documentation/trace/postprocess/decode_msr.py index aa9cc7abd5c2..2d45d6c14987 100644 --- a/Documentation/trace/postprocess/decode_msr.py +++ b/Documentation/trace/postprocess/decode_msr.py @@ -32,6 +32,6 @@ for j in sys.stdin: break if r: j = j.replace(" " + m.group(2), " " + r + "(" + m.group(2) + ")") - print j, + print(j + ",")