perf beauty: Introduce scrape script for 'clone' syscall 'flags' argument
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Mar 2024 17:49:32 +0000 (14:49 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 21 Mar 2024 13:41:29 +0000 (10:41 -0300)
commit2316ef589181b5b2fd6cbced24439ba4ac096bd8
treeece9bde561387f63db1a0ad30c9724c9a9edde52
parentbd62de08084c24a4ff1b1875d53cc4cc1ea2312d
perf beauty: Introduce scrape script for 'clone' syscall 'flags' argument

It was using the first variation on producing a string representation
for a binary flag, one that used the copy of uapi/linux/sched.h with
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/clone.sh | head -5
  static const char *clone_flags[] = {
   [ilog2(0x00000100) + 1] = "VM",
   [ilog2(0x00000200) + 1] = "FS",
   [ilog2(0x00000400) + 1] = "FILES",
   [ilog2(0x00000800) + 1] = "SIGHAND",
  $

Now we can move uapi/linux/sched.h from tools/include/, that is used for
building perf to 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/ZfnULIn3XKDq0bpc@x1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/uapi/linux/sched.h [deleted file]
tools/perf/Makefile.perf
tools/perf/check-headers.sh
tools/perf/trace/beauty/clone.c
tools/perf/trace/beauty/clone.sh [new file with mode: 0755]
tools/perf/trace/beauty/include/uapi/linux/sched.h [new file with mode: 0644]