From patchwork Wed Feb 1 21:49:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diederik de Haas X-Patchwork-Id: 4839 Return-Path: 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 + 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 ); 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 To: Carsten Haitzler , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Diederik de Haas 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 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: 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?= 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(-)