From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org,
Ravi Bangoria <ravi.bangoria@amd.com>
Subject: [PATCH v2 7/7] perf trace: Update beautifier script for clone flags
Date: Thu, 7 May 2026 00:26:32 -0700 [thread overview]
Message-ID: <20260507072632.37152-8-namhyung@kernel.org> (raw)
In-Reply-To: <20260507072632.37152-1-namhyung@kernel.org>
According to the change in the sched.h, update the script to generate
the flags array like below. Note that '+1' is needed to detect bitmask
pattern at index 0.
$ cat tools/perf/trace/beauty/generated/clone_flags_array.c
static const char *clone_flags[] = {
[32 + 1] = "CLEAR_SIGHAND",
[33 + 1] = "INTO_CGROUP",
[34 + 1] = "AUTOREAP",
[35 + 1] = "NNP",
[36 + 1] = "PIDFD_AUTOKILL",
[37 + 1] = "EMPTY_MNTNS",
};
This was found by Sashiko during review.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/trace/beauty/clone.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/trace/beauty/clone.sh b/tools/perf/trace/beauty/clone.sh
index 18b6c0d75693721d..f807372519fe2c88 100755
--- a/tools/perf/trace/beauty/clone.sh
+++ b/tools/perf/trace/beauty/clone.sh
@@ -10,8 +10,8 @@ fi
linux_sched=${beauty_uapi_linux_dir}/sched.h
printf "static const char *clone_flags[] = {\n"
-regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+CLONE_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
+regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+CLONE_([^_]+[[:alnum:]_]+)[[:space:]]+\(1ULL[[:space:]]*<<[[:space:]]*([[:digit:]]+)\)[[:space:]]*.*'
grep -E $regex ${linux_sched} | \
sed -r "s/$regex/\2 \1/g" | \
- xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
+ xargs printf "\t[%s + 1] = \"%s\",\n"
printf "};\n"
--
2.53.0
prev parent reply other threads:[~2026-05-07 7:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 7:26 [PATCH v2 0/7] perf build: Update kernel headers Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 1/7] perf trace: Sync linux/socket.h with the kernel source Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 2/7] perf trace: Sync uapi/linux/fs.h " Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 3/7] perf trace: Sync uapi/linux/mount.h " Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 4/7] perf trace: Sync uapi/linux/sched.h " Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 5/7] perf build: Add make check-headers target Namhyung Kim
2026-05-07 7:26 ` [PATCH v2 6/7] perf trace: Add beautifier script for fsmount flags Namhyung Kim
2026-05-07 7:26 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507072632.37152-8-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox