Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4945743rwb; Mon, 21 Nov 2022 14:16:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5iI02qO0tdl/Tfbpd+HlqDsaiR58KEZg0V+w7nTbS7y0/WtmuS9SyxNdfJbeam0sHGHTxx X-Received: by 2002:aa7:c85a:0:b0:45f:b9d8:9514 with SMTP id g26-20020aa7c85a000000b0045fb9d89514mr18660885edt.204.1669068985352; Mon, 21 Nov 2022 14:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669068985; cv=none; d=google.com; s=arc-20160816; b=Lc9mUcPf1CpwO+xlMy82dh3aYU9ywNYMAUSb0N+zJcQHAfAkvLWR6ofP9Gd/vpzyNe 7goezQxEeZW7hvxFmrGOT+geZjIPJX5MKwMwi6Pgi4xdMz1yT+KY+4osUQoI0dLFtt5v LdzGGsxkex0ajyw9WGL6E4ad/+uugLxLRIGBIJhoX84f42/CbLoSbry4ObWU4NVhkFWV g7bU7Ykds+fE4xoMuvc9EPNflbV3gBOOvEjptfMwP9GsxYosHAdUPT6venL9cVvEPrB9 5xarxZXLWE1F3VxpjITJ02amE7Egu0KR+iln+O3BCTsu6JeV2Q8ippRkrTbCLg39sbKr nAhQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eHwtfaTdIVIvafRCKa1NZoWhvoF19BVCC+RbKr1OuVo=; b=bbhZz3ra+0bbxZFwbSArrhyzt5BY/CRRhgakrYe16A6cbe4KU8JPBK7znKTsNC3ZZn QLIwHzm75dpJsCM4l3QlSdGDHzbgNEl7PbQfDD0X4A6aRMb7yZpLzJ2vn2IwJx85qKXX FU0T7z49gaktOd4IgHzDMuwdaavqcZVupj9YWwCA79nHFHLSk6yzFZT5cBA2W9ng7Iwu w2p23+0c0Nt+nxp43nxHpxSh97zwbiqq58TNTueHyj2emjiBzjfvNc6Bj79ZukflyE/k Ms0PJWR9zegd33cPx+9DGYI1Um+fZidenxo15KbKWunODT0npIlYy1qWRJe8CyUH3nU5 hmMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=huiFhHq8; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dc20-20020a170906c7d400b00741a0c28f07si9121170ejb.943.2022.11.21.14.16.01; Mon, 21 Nov 2022 14:16:25 -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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=huiFhHq8; 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 S229698AbiKUWHp (ORCPT + 91 others); Mon, 21 Nov 2022 17:07:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbiKUWHk (ORCPT ); Mon, 21 Nov 2022 17:07:40 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47A1330 for ; Mon, 21 Nov 2022 14:07:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 3A345CE1921 for ; Mon, 21 Nov 2022 22:07:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33B22C433D6; Mon, 21 Nov 2022 22:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1669068455; bh=xKl+5O5K9KyORH5vJyHv7kuCYgI2QDjuOh2HfIan11o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=huiFhHq8u0L7LTK0KWEjINP8i9FYRuRFHvPKj3tZsnaEM305owlyUGjwjLlsKRYp2 XVnRUbgLl1xsmfId3CF+a1+PwRvkRZr50T90HCU6twroBHao6J0pQCEkev5XHjU5yW kyhEG4qIX0N9XiXkIkwvjteRHZo3c5DA2yamWLDw= Date: Mon, 21 Nov 2022 14:07:34 -0800 From: Andrew Morton To: Tiezhu Yang Cc: Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vlastimil Babka Subject: Re: [PATCH] tools/vm/slabinfo-gnuplot: Use "grep -E" instead of "egrep" Message-Id: <20221121140734.397eacb569252aafee64c498@linux-foundation.org> In-Reply-To: <1668825419-30584-1-git-send-email-yangtiezhu@loongson.cn> References: <1668825419-30584-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, 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 On Sat, 19 Nov 2022 10:36:59 +0800 Tiezhu Yang wrote: > 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 > > ... > > --- 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" Thanks. I'll add a cc:stable to this, in an attempt to make older kernels work well with newer toolchains.