From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 592A3C4332F for ; Mon, 21 Nov 2022 22:07:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7C676B0071; Mon, 21 Nov 2022 17:07:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D2B686B0073; Mon, 21 Nov 2022 17:07:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1B1D8E0001; Mon, 21 Nov 2022 17:07:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B3C9F6B0071 for ; Mon, 21 Nov 2022 17:07:38 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 81AAA1A0EBC for ; Mon, 21 Nov 2022 22:07:38 +0000 (UTC) X-FDA: 80158836996.13.98B806A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id E6A03A0011 for ; Mon, 21 Nov 2022 22:07:36 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 01B9861497; Mon, 21 Nov 2022 22:07:36 +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 ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=huiFhHq8; spf=pass (imf25.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669068457; a=rsa-sha256; cv=none; b=DgL5eFpW6XPhAGIZb8aJMdPSLR58TXcZJ4X4xBfRf1vyD8PgcdzV/qayyGQfpCt7XirROk +5pJWBPZaqZFWywLOkPGxW9YqdHZ09hbpQN7ry3yMz5cIPGFN7tIChKmGH6kjjq9WlWh4V LJZYwIYbJ9qnajoa5KcHnN9bBFmWs8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669068457; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=eHwtfaTdIVIvafRCKa1NZoWhvoF19BVCC+RbKr1OuVo=; b=nTB+ca6Yv1kA1T4/3oLeIxplK2h8B40dKxDmTDunweq/w7j3FhDZTuXCzDSh8zPZN2FsXD We8bnmWVZxafSVX4QYb5gAiWqTclWbqcbzcjW9UKzgfDAkzGu5P6oRQOAIV4b/YHj0n+Ya sFxitp+RVR3xSUAn28tbamAVYOmSklo= X-Rspam-User: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=huiFhHq8; spf=pass (imf25.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: x6awjc9fj1oskord1thrfrena9tpw443 X-Rspamd-Queue-Id: E6A03A0011 X-Rspamd-Server: rspam09 X-HE-Tag: 1669068456-706201 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.