]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf trace: Add beautifier script for fsmount flags
authorNamhyung Kim <namhyung@kernel.org>
Sun, 10 May 2026 20:23:45 +0000 (13:23 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 14 May 2026 21:48:32 +0000 (14:48 -0700)
commit552636b9317c8a843dd4496d77e56976ab48c76b
treed0a5fb4d516b8f65af49dd83fea17623aab636d2
parentbe81aed3f7492caa522493f7c67b9c4d3c8924a6
perf trace: Add beautifier script for fsmount flags

And move the existing one to fsmount_attr.sh to be more precise.
Now the fsmount_flags[] is generated from the mount.h like below.
The ilog2() + 1 is an existing pattern to handle bit flags.

  $ cat tools/perf/trace/beauty/generated/fsmount_arrays.c
  static const char *fsmount_flags[] = {
   [ilog2(0x00000001) + 1] = "CLOEXEC",
   [ilog2(0x00000002) + 1] = "NAMESPACE",
  };

It was found by Sashiko during the review.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/Makefile.perf
tools/perf/builtin-trace.c
tools/perf/trace/beauty/beauty.h
tools/perf/trace/beauty/fsmount.c
tools/perf/trace/beauty/fsmount.sh
tools/perf/trace/beauty/fsmount_attr.sh [new file with mode: 0644]