Message ID | 20230201214945.127474-1-didi.debian@cknow.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp530221wrn; Wed, 1 Feb 2023 13:52:52 -0800 (PST) X-Google-Smtp-Source: AK7set9j0OA18tpBreba7Hhpb0X6dtNRy3ovk0zm2MUH1XQ65Fm9D9PQ7dGKvRUx5eTfWGuM57Uj X-Received: by 2002:a05:6a20:9598:b0:b5:97de:d7e7 with SMTP id iu24-20020a056a20959800b000b597ded7e7mr4222551pzb.18.1675288372222; Wed, 01 Feb 2023 13:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675288372; cv=none; d=google.com; s=arc-20160816; b=I8U7sLmWcUmyxgad8Z+hOFA2RkNRtZHTWAsD4Cyb5oy+pRw4DjFfhlgG1+Lu/EHuHw 1POeLQV9Ap/KhZr6GIOs/H6mZ90hcKeMbi64MmlK9GA81Uc8diSAeeR4IMKtc2uV6y4T fUVcz4BOR0w5yxUGrkweHuc0blY6s9uvEf4B2EHunDhSYdJcT4jIa7xL0zUyovGxZrGV cHHy179bkZEVPDMiVzInyWCEDhbKy91OeGw+v0un84OzNdkxbQzoKHLcVza4KrqpCp8O w74XXtGjQ6ihwz7j70Bh/56QfmsvxG0jf2qEt34FvncoHE06pFOu0oERRo3LGuD+Ka6V Jz2A== 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 :message-id:date:subject:cc:to:from; bh=lGPDLXyCY9qv8YrZtId0Jks5CcdefRrNsNajEaE6jjk=; b=jnCQOv7pxxFDbQCDdIssgbTKPA9Wdm1YBj64N6RD9/WgB2AweWly0o8UYqRsBh9FKh zeVkJm3pYHJZCsUbII8lK0CAbDkUW2nk0T8QshwCPNi7NpYlL9ChZJsQy6m1nhkppwlU kiLKM15SnxhAbkYEy1CndyxMF0sS6G573wn4MF6LCqjv05JkFphjsOYdixbABOg1p0V7 hIsWqj4uxpJZqXfrFI/Zh88gD49KmV6B649iMPFd2n8c1s2vY51TcLxwO+X0TfapXiS7 BWkx+GAernVLvWNIbXE/Iyr1qwcg4gtgEyGGYnEvKrTQYlBN/rfFp4CDjfFKy0AY2UoN mQzw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y190-20020a6264c7000000b00593e4fbaa3esi7374002pfb.69.2023.02.01.13.52.27; Wed, 01 Feb 2023 13:52:52 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjBAVub (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Wed, 1 Feb 2023 16:50:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjBAVu2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Feb 2023 16:50:28 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE91CA34; Wed, 1 Feb 2023 13:50:25 -0800 (PST) Received: (Authenticated sender: didi.debian@cknow.org) by mail.gandi.net (Postfix) with ESMTPSA id BA9EF240006; Wed, 1 Feb 2023 21:50:20 +0000 (UTC) From: Diederik de Haas <didi.debian@cknow.org> To: Carsten Haitzler <carsten.haitzler@arm.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Diederik de Haas <didi.debian@cknow.org> Subject: [PATCH 0/2] Script style improvements in lib/coresight.sh Date: Wed, 1 Feb 2023 22:49:43 +0100 Message-Id: <20230201214945.127474-1-didi.debian@cknow.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756667179787898729?= X-GMAIL-MSGID: =?utf-8?q?1756667179787898729?= |
Series |
Script style improvements in lib/coresight.sh
|
|
Message
Diederik de Haas
Feb. 1, 2023, 9:49 p.m. UTC
These 2 patches improve the efficiency and quality of the lib/coresight.sh script. The first one uses grep's `-c` parameter to count the results instead of piping it to `wc -l`. The second one replaces the use of backticks (`...`) with $(...) as the former has several potential issues while the latter does not. Diederik de Haas (2): perf test: Replace 'grep | wc -l' with 'grep -c' perf test: Replace legacy `...` with $(...) tools/perf/tests/shell/lib/coresight.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
Comments
Em Wed, Feb 01, 2023 at 10:49:43PM +0100, Diederik de Haas escreveu: > These 2 patches improve the efficiency and quality of the > lib/coresight.sh script. > > The first one uses grep's `-c` parameter to count the results instead of > piping it to `wc -l`. > The second one replaces the use of backticks (`...`) with $(...) as the > former has several potential issues while the latter does not. > > Diederik de Haas (2): > perf test: Replace 'grep | wc -l' with 'grep -c' > perf test: Replace legacy `...` with $(...) Thanks, applied. - Arnaldo
On 2/1/23 21:49, Diederik de Haas wrote: > These 2 patches improve the efficiency and quality of the > lib/coresight.sh script. > > The first one uses grep's `-c` parameter to count the results instead of > piping it to `wc -l`. > The second one replaces the use of backticks (`...`) with $(...) as the > former has several potential issues while the latter does not. > > Diederik de Haas (2): > perf test: Replace 'grep | wc -l' with 'grep -c' > perf test: Replace legacy `...` with $(...) > > tools/perf/tests/shell/lib/coresight.sh | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > ACK to all of this series. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Em Thu, Feb 02, 2023 at 08:38:46AM +0000, Carsten Haitzler escreveu: > On 2/1/23 21:49, Diederik de Haas wrote: > > These 2 patches improve the efficiency and quality of the > > lib/coresight.sh script. > > > > The first one uses grep's `-c` parameter to count the results instead of > > piping it to `wc -l`. > > The second one replaces the use of backticks (`...`) with $(...) as the > > former has several potential issues while the latter does not. > > > > Diederik de Haas (2): > > perf test: Replace 'grep | wc -l' with 'grep -c' > > perf test: Replace legacy `...` with $(...) > > > > tools/perf/tests/shell/lib/coresight.sh | 18 +++++++++--------- > > 1 file changed, 9 insertions(+), 9 deletions(-) > > > ACK to all of this series. Thanks, added to the two patches, that I processed yesterday, still in tmp.perf/core. - Arnaldo