From: Arnaldo Melo <arnaldo.melo@gmail.com>
To: James Clark <james.clark@linaro.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf build: Only enable context analysis with Clang 23 or later
Date: Tue, 24 Nov 2026 10:08:31 -0300 [thread overview]
Message-ID: <0E9F372C-C100-41EC-B5B3-46FEDC813E01@gmail.com> (raw)
In-Reply-To: <46a896ba-cd45-4747-837d-50ea4b4dbed9@linaro.org>
On November 24, 2026 8:24:37 AM GMT-03:00, James Clark <james.clark@linaro.org> wrote:
>Looks like __guarded_by() has also been around since at least clang 18, so that wasn't the issue. The problem is that it's not supported on struct _members_ specifically until clang 19.
>I sent another version that stubs it out for < 19 which works. The commit summary changed to "perf build: Stub out __guarded_by() on older Clang versions".
>The header diverges from the kernel one which isn't great, but I suppose that's better
Right, but you changed how check-headers.sh treats it to cope with the difference and I'll make sure that tools/perf/scripts/sync-headers.sh handles this case as well, namely if check-headers.sh detects drift, sync-headers.sh will update the tools copy while keeping the tools specific parts.
acme@number:~/git/perf-tools-next$ make -C tools/perf help | grep headers
check-headers - check which header copies are out of sync with the kernel
sync-headers - sync those header copies with the kernel, creating commits
acme@number:~/git/perf-tools-next$ tools/perf/scripts/sync-headers.sh --helpUsage: sync-headers.sh [OPTIONS]
Sync tools/ header copies with the kernel sources and create commits.
Options:
-n, --dry-run Show what would be done without making changes
-N, --no-build Skip the perf build verification step
-C, --no-commit Copy files but do not create git commits
-f, --filter PAT Only process headers matching PAT (substring match
against the kernel-side path)
-F, --force Sync also when both copies have content the other
lacks, after manual investigation; tools/ additions
dropped are recorded in the commit
-o, --output DIR Build output directory (default: /tmp/build/perf-tools-1000)
-v, --verbose Show more details
-h, --help Show this help
Environment:
SIGN_OFF_NAME Override git user.name for Signed-off-by
SIGN_OFF_EMAIL Override git user.email for Signed-off-by
OUTPUT_DIR Build output directory
Through make:
SYNC_HEADERS_ARGS Options to pass to this script, e.g.:
make -C tools/perf sync-headers SYNC_HEADERS_ARGS='-n'
The script:
1. Runs 'make -C tools/perf check-headers' to find stale copies.
2. For each stale header, identifies the kernel commits that changed it,
including the merges that brought content of their own.
3. Copies the kernel header into the tools/ tree, skipping it when only
the tools/ copy changed (it is ahead) or when it carries intentional
edits, and stopping for manual investigation when both sides have
content the other lacks.
4. For beauty headers, runs the relevant beauty script(s) before and
after, showing new/changed string table entries.
5. Builds perf and the other consumers of the header to verify nothing
breaks.
6. Creates a git commit per header (or group) with the standard commit
message format.
acme@number:~/git/perf-tools-next$
I.e. the limitation in point number three, about intentional edits, needs to be lifted.
- Arnaldo
> than someone on clang 17 or 18 missing out on all of the lock analysis.
Right.
- Arnaldo
next prev parent reply other threads:[~2026-11-24 13:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 16:46 James Clark
2026-11-23 18:44 ` Ian Rogers
2026-11-23 19:55 ` Arnaldo Melo
2026-11-23 21:23 ` Namhyung Kim
2026-11-24 11:24 ` James Clark
2026-11-24 13:08 ` Arnaldo Melo [this message]
2026-11-24 13:43 ` James Clark
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=0E9F372C-C100-41EC-B5B3-46FEDC813E01@gmail.com \
--to=arnaldo.melo@gmail.com \
--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@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®