perf beauty: Add generator for fspick's 'flags' arg values
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: a1c729a5f62c090ba3c510142a6685a1989cc24b Gitweb: https://git.kernel.org/tip/a1c729a5f62c090ba3c510142a6685a1989cc24b Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Mon, 20 May 2019 16:17:55 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 28 May 2019 18:37:42 -0300
perf beauty: Add generator for fspick's 'flags' arg values
$ tools/perf/trace/beauty/fspick.sh
static const char *fspick_flags[] = {
[ilog2(0x00000001) + 1] = "CLOEXEC",
[ilog2(0x00000002) + 1] = "SYMLINK_NOFOLLOW",
[ilog2(0x00000004) + 1] = "NO_AUTOMOUNT",
[ilog2(0x00000008) + 1] = "EMPTY_PATH",
};
$Cc Adrian Hunter <[email protected]>
Cc Al Viro <[email protected]>
Cc Brendan Gregg <[email protected]>
Cc David Howells <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/trace/beauty/{move_mount_flags.sh => fspick.sh} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)tools/perf/trace/beauty/fspick.sh renamed from tools/perf/trace/beauty/move_mount_flags.sh +2 -2
@@ -9,8 +9,8 @@ fi linux_mount=${linux_header_dir}/mount.h -printf "static const char *move_mount_flags[] = {\n" -regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([FT]_[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' +printf "static const char *fspick_flags[] = {\n" +regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+FSPICK_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${linux_mount} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"