From patchwork Sat Nov 19 02:36:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 23187 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp533422wrr; Fri, 18 Nov 2022 19:08:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf7l5qhjhiGtLHay4BS3q8ecllmIR1FrTT0da5SGwGERWm3OdfeT38Nj26bxuwq2fAfVwHxL X-Received: by 2002:aa7:c942:0:b0:458:e00e:5a85 with SMTP id h2-20020aa7c942000000b00458e00e5a85mr8605192edt.171.1668827282303; Fri, 18 Nov 2022 19:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668827282; cv=none; d=google.com; s=arc-20160816; b=AftQSorNPu5SrcHEkcxR7tXXIrW9eNABGOIxOiyyXaUJRBAc1hi0UNlStiBHY+gZ1u CBJM3YefHiYF8Y0vR9MXzVdS9zaqx2MV8BSZdHgQtCdlD0ekSleHttfRZlZLqjlCFc1z jfq6t9YuIq8MuCK3/iHcMLZAqMEDtJszOpvErp/ErG7CVQ9haLBCC9FQ+TOYYHaE359H SmTCizTczF88df4yRVwInl8fh3nO4M+4zIfllsDOa0A6UqbknQgamr/Jl2JuTybuHRb5 dfVB+0ej7zAxSgjbNkUOUr9bSgCNFtLH+bKF2Qe4BPRpdUE3zuXQg5/IwsY7Las082xJ rWlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=uFzMuxc9Q+ZCHGr757zEAx1I3UPlTgmL5vmeHX3wbEY=; b=Zi2kxQxsCtxjVyeaekQIqnBjmuar2DqXhHRsycCddaXbYkmMOhRDY8dOjZfvY/0/Bt QspP9cuy3I/gV1lhIrUNm2hT3k1jq4dvhRev+Yn7XTWsYI40LMPWg9IMPgbulMHlF7W0 ZUxQFMUIYBrlBDmkIIaRR9HLVYZoCc1uH6unGY972pvr7R6jwr8uR7s/RSz1getalVcK 6RUnK9LPtcUvHWap/sB+G+n2grThzNtTfu2kAPHeHyuKD0pXk2EIsJya+k1BoC5NfA64 PIfGzmdsh18evdnJaYnM38OBSmDiE8u6N8NojJEv4HNdWctIa2JJ/Rwn8qq8fwE1k1uX 3vPA== 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 rl24-20020a170907217800b007aacd494fe9si3526488ejb.311.2022.11.18.19.07.38; Fri, 18 Nov 2022 19:08:02 -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 S232568AbiKSCvA (ORCPT + 99 others); Fri, 18 Nov 2022 21:51:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233544AbiKSCun (ORCPT ); Fri, 18 Nov 2022 21:50:43 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C1D8BC5602 for ; Fri, 18 Nov 2022 18:37:07 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8CxLLdSQXhj9skIAA--.13310S3; Sat, 19 Nov 2022 10:37:06 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxV1dQQXhj+sIWAA--.41565S2; Sat, 19 Nov 2022 10:37:04 +0800 (CST) From: Tiezhu Yang To: Andrew Morton , Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Subject: [PATCH] tools/vm/slabinfo-gnuplot: Use "grep -E" instead of "egrep" Date: Sat, 19 Nov 2022 10:36:59 +0800 Message-Id: <1668825419-30584-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8BxV1dQQXhj+sIWAA--.41565S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFWUCFy3Gw17uw1rAr48Xrb_yoW8Xr4Upa 4rur9rXr43KFyIyanrCF4xGF17KF9xCay8JryfX3yjqFy3X3W7WFyfXF4UZF17XayrJr4k Ca4qgry7CF4kAwUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7kYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26F4j6r4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UM2AI xVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVW8JVWxJwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1Y6r17MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r 4UJbIYCTnIWIevJa73UjIFyTuYvjxUcyxRUUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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?1749892236276270772?= X-GMAIL-MSGID: =?utf-8?q?1749892236276270772?= The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/vm` Here are the steps to install the latest grep: wget http://ftp.gnu.org/gnu/grep/grep-3.8.tar.gz tar xf grep-3.8.tar.gz cd grep-3.8 && ./configure && make sudo make install export PATH=/usr/local/bin:$PATH Signed-off-by: Tiezhu Yang Reviewed-by: Sergey Senozhatsky --- tools/vm/slabinfo-gnuplot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/vm/slabinfo-gnuplot.sh b/tools/vm/slabinfo-gnuplot.sh index 26e193f..873a892 100644 --- a/tools/vm/slabinfo-gnuplot.sh +++ b/tools/vm/slabinfo-gnuplot.sh @@ -150,7 +150,7 @@ do_preprocess() let lines=3 out=`basename "$in"`"-slabs-by-loss" `cat "$in" | grep -A "$lines" 'Slabs sorted by loss' |\ - egrep -iv '\-\-|Name|Slabs'\ + grep -E -iv '\-\-|Name|Slabs'\ | awk '{print $1" "$4+$2*$3" "$4}' > "$out"` if [ $? -eq 0 ]; then do_slabs_plotting "$out" @@ -159,7 +159,7 @@ do_preprocess() let lines=3 out=`basename "$in"`"-slabs-by-size" `cat "$in" | grep -A "$lines" 'Slabs sorted by size' |\ - egrep -iv '\-\-|Name|Slabs'\ + grep -E -iv '\-\-|Name|Slabs'\ | awk '{print $1" "$4" "$4-$2*$3}' > "$out"` if [ $? -eq 0 ]; then do_slabs_plotting "$out"