History log of /linux-master/tools/perf/trace/beauty/move_mount_flags.sh
Revision Date Author Comments
# 920b91d9 10-Jul-2023 Arnaldo Carvalho de Melo <acme@redhat.com>

tools include UAPI: Sync linux/mount.h copy with the kernel sources

To pick the changes from:

6ac392815628f317 ("fs: allow to mount beneath top mount")

That, after a fix to the move_mount_flags.sh script, harvests the new
MOVE_MOUNT_BENEATH move_mount flag:

$ tools/perf/trace/beauty/move_mount_flags.sh > before
$ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h
$ tools/perf/trace/beauty/move_mount_flags.sh > after
$
$ diff -u before after
--- before 2023-07-11 12:38:49.244886707 -0300
+++ after 2023-07-11 12:51:15.125255940 -0300
@@ -6,4 +6,5 @@
[ilog2(0x00000020) + 1] = "T_AUTOMOUNTS",
[ilog2(0x00000040) + 1] = "T_EMPTY_PATH",
[ilog2(0x00000100) + 1] = "SET_GROUP",
+ [ilog2(0x00000200) + 1] = "BENEATH",
};
$

That will then be properly decoded when used in tools like:

# perf trace -e move_mount

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h

Cc: Christian Brauner <brauner@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/ZK17kifP%2FiYl+Hcc@kernel.org/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 818448e9 18-Nov-2022 Tiezhu Yang <yangtiezhu@loongson.cn>

perf tools: Use "grep -E" instead of "egrep"

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/perf`

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

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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>
Link: http://lore.kernel.org/lkml/1668762999-9297-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 155ed9f1 09-Sep-2021 Arnaldo Carvalho de Melo <acme@redhat.com>

perf beauty: Cover more flags in the move_mount syscall argument beautifier

Previously the regext expected MOVE_MOUNT_[FT]_*, but in the next patch
a flag that doesn't match that expression will be added, MOVE_MOUNT_SET_GROUP

To make this more future proof, take advantage of the fact that the only
one we don't need to cover is MOVE_MOUNT__MASK and use MOVE_MOUNT_[^_]+_*_.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# eefa09b4 20-May-2019 Arnaldo Carvalho de Melo <acme@redhat.com>

perf beauty: Add generator for 'move_mount' flags argument

$ tools/perf/trace/beauty/move_mount_flags.sh
static const char *move_mount_flags[] = {
[ilog2(0x00000001) + 1] = "F_SYMLINKS",
[ilog2(0x00000002) + 1] = "F_AUTOMOUNTS",
[ilog2(0x00000004) + 1] = "F_EMPTY_PATH",
[ilog2(0x00000010) + 1] = "T_SYMLINKS",
[ilog2(0x00000020) + 1] = "T_AUTOMOUNTS",
[ilog2(0x00000040) + 1] = "T_EMPTY_PATH",
};
$

Will be wired up to the 'perf trace' arg in a followup patch.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-px7v33suw1k2ehst52l7bwa3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>