diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-03-19 20:49:32 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-03-21 19:54:40 +0300 |
commit | f122b3d6d179455ec77dc17690bea7e970433254 (patch) | |
tree | a9cb9dcdfa2b881acee0dcca2f1508facd9fd15a /tools/perf/check-headers.sh | |
parent | 3d6cfbaf279ddec9d92d434268ac7aab1a4935ca (diff) | |
download | linux-f122b3d6d179455ec77dc17690bea7e970433254.tar.xz |
perf beauty: Introduce scrape script for the 'statx' syscall 'mask' argument
It was using the first variation on producing a string representation
for a binary flag, one that used the system's stat.h and preprocessor
tricks that had to be updated everytime a new flag was introduced.
Use the more recent scrape script + strarray +
strarray__scnprintf_flags() combo.
$ tools/perf/trace/beauty/statx_mask.sh
static const char *statx_mask[] = {
[ilog2(0x00000001) + 1] = "TYPE",
[ilog2(0x00000002) + 1] = "MODE",
[ilog2(0x00000004) + 1] = "NLINK",
[ilog2(0x00000008) + 1] = "UID",
[ilog2(0x00000010) + 1] = "GID",
[ilog2(0x00000020) + 1] = "ATIME",
[ilog2(0x00000040) + 1] = "MTIME",
[ilog2(0x00000080) + 1] = "CTIME",
[ilog2(0x00000100) + 1] = "INO",
[ilog2(0x00000200) + 1] = "SIZE",
[ilog2(0x00000400) + 1] = "BLOCKS",
[ilog2(0x00000800) + 1] = "BTIME",
[ilog2(0x00001000) + 1] = "MNT_ID",
[ilog2(0x00002000) + 1] = "DIOALIGN",
[ilog2(0x00004000) + 1] = "MNT_ID_UNIQUE",
};
$
Now we need a copy of uapi/linux/stat.h from tools/include/ in the
scrape only directory tools/perf/trace/beauty/include.
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/20240320193115.811899-3-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/check-headers.sh')
-rwxr-xr-x | tools/perf/check-headers.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index d23a84fdf3ef..76726a5a7c78 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -94,6 +94,7 @@ BEAUTY_FILES=( "include/uapi/linux/mount.h" "include/uapi/linux/prctl.h" "include/uapi/linux/sched.h" + "include/uapi/linux/stat.h" "include/uapi/linux/usbdevice_fs.h" "include/uapi/sound/asound.h" ) |