aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/trace/beauty/mmap_prot.sh
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2020-10-23 11:06:28 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-11-04 09:42:41 -0300
commitc5e6bc23355a3b33ffc170f92e315102f1e6a59c (patch)
treeed30794d34cca758020cace6d9b380b3e06a24c6 /tools/perf/trace/beauty/mmap_prot.sh
parentperf stat: Add --quiet option (diff)
downloadlinux-dev-c5e6bc23355a3b33ffc170f92e315102f1e6a59c.tar.xz
linux-dev-c5e6bc23355a3b33ffc170f92e315102f1e6a59c.zip
perf trace beauty: Allow header files in a different path
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 <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20201023020628.346257-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rwxr-xr-xtools/perf/trace/beauty/mmap_prot.sh2
1 files changed, 1 insertions, 1 deletions
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:]]+<uapi/asm-generic/mman.*' ${arch_mman}) &&
+([ ! -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" | \