Skip to content

Commit 49cf0bf

Browse files
Yanteng Siacmel
authored andcommitted
perf beauty mmap_flags: Fix script for archs that use the generic mman.h
To address this error: grep: /root/linux-next/tools/arch/xxxxx/include/uapi/asm//mman.h: No such file or directory Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Acked-by: Huacai Chen <chenhuacai@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: loongarch@lists.linux.dev Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/42e8e3565d6035302907426c1e65483b2a4007f5.1692962043.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent c56f286 commit 49cf0bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/trace/beauty/mmap_flags.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ arch_mman=${arch_header_dir}/mman.h
1919

2020
printf "static const char *mmap_flags[] = {\n"
2121
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MAP_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
22-
grep -E -q $regex ${arch_mman} && \
22+
([ -f ${arch_mman} ] && grep -E -q $regex ${arch_mman}) && \
2323
(grep -E $regex ${arch_mman} | \
2424
sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \
2525
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n")

0 commit comments

Comments
 (0)