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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C73A1C55178 for ; Tue, 27 Oct 2020 16:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BF2721D7B for ; Tue, 27 Oct 2020 16:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603815137; bh=+HAGE5okrHiBhnWFIPAO5CKv2KORQamF2J0Be9V5SwM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=N1k/XwxptQHxZIbj2Buw/jWNmIW4ImJMawYB2u2cYWCEGs8V9Sqwj4KiX+2hSuhaD iiCyisgvQjm9+h0ICDCO+A+GqLyuMjuY1PvmUk3yUvGsikW3nX6HFodDMGKmSUxEXN h+k5bcFFleZzsS4XowN2Vc/MZ2nrQg14Tq6qYPT4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1807615AbgJ0QMP (ORCPT ); Tue, 27 Oct 2020 12:12:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:37968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1806753AbgJ0QHs (ORCPT ); Tue, 27 Oct 2020 12:07:48 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 84CBE206B2; Tue, 27 Oct 2020 16:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603814867; bh=+HAGE5okrHiBhnWFIPAO5CKv2KORQamF2J0Be9V5SwM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZpcX00IKXUl6xSbuoIx7mcl49GK4YH2SNPeukthb+Ogu51Onii1+WP8hoSHqT7ESk PeO1aer5tzC8qdb+KW47P/D9+XqP2J+3BV9Kp7oEYsmyvluZFrB0TrH7V27jxaDyog iNSVDKfYiDqDwAkvZhTR3pbym+/pBqSzvJcYLuqs= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 533B0403C2; Tue, 27 Oct 2020 13:07:45 -0300 (-03) Date: Tue, 27 Oct 2020 13:07:45 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Namhyung Kim , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian Subject: Re: [PATCH] perf trace beauty: Allow header files in a different path Message-ID: <20201027160745.GF2479604@kernel.org> References: <20201023020628.346257-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Oct 22, 2020 at 07:09:12PM -0700, Ian Rogers escreveu: > On Thu, Oct 22, 2020 at 7:06 PM Namhyung Kim wrote: > > > > Current script to generate mmap flags and prot checks headers from the > > uapi/asm-generic directory but it might come from a different > > directory in some environment. So change the pattern to accept it. > > > > Signed-off-by: Namhyung Kim > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo > Thanks, > Ian > > > --- > > tools/perf/trace/beauty/mmap_flags.sh | 4 ++-- > > tools/perf/trace/beauty/mmap_prot.sh | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/tools/perf/trace/beauty/mmap_flags.sh b/tools/perf/trace/beauty/mmap_flags.sh > > index 39eb2595983b..76825710c725 100755 > > --- a/tools/perf/trace/beauty/mmap_flags.sh > > +++ b/tools/perf/trace/beauty/mmap_flags.sh > > @@ -28,12 +28,12 @@ egrep -q $regex ${linux_mman} && \ > > egrep -vw 'MAP_(UNINITIALIZED|TYPE|SHARED_VALIDATE)' | \ > > sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ > > xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") > > -([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+ > +([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.*' ${arch_mman}) && > > (egrep $regex ${header_dir}/mman-common.h | \ > > egrep -vw 'MAP_(UNINITIALIZED|TYPE|SHARED_VALIDATE)' | \ > > sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ > > xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") > > -([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*' ${arch_mman}) && > > +([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.h>.*' ${arch_mman}) && > > (egrep $regex ${header_dir}/mman.h | \ > > sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ > > xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") > > diff --git a/tools/perf/trace/beauty/mmap_prot.sh b/tools/perf/trace/beauty/mmap_prot.sh > > index 28f638f8d216..664d8d534a50 100755 > > --- a/tools/perf/trace/beauty/mmap_prot.sh > > +++ b/tools/perf/trace/beauty/mmap_prot.sh > > @@ -17,7 +17,7 @@ prefix="PROT" > > > > printf "static const char *mmap_prot[] = {\n" > > regex=`printf '^[[:space:]]*#[[:space:]]*define[[:space:]]+%s_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' ${prefix}` > > -([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+ > +([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.*' ${arch_mman}) && > > (egrep $regex ${common_mman} | \ > > egrep -vw PROT_NONE | \ > > sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ > > -- > > 2.29.0.rc1.297.gfa9743e501-goog > > -- - Arnaldo