From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Melo <arnaldo.melo@gmail.com>
Cc: linux-perf-users@vger.kernel.org, Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.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: Mon, 23 Nov 2026 13:23:47 -0800 [thread overview]
Message-ID: <awSu48pUIh942Zm4@google.com> (raw)
In-Reply-To: <EC27692D-9692-4976-B7EA-4C3A91173CE3@gmail.com>
Hello,
On Mon, Nov 23, 2026 at 04:55:16PM -0300, Arnaldo Melo wrote:
>
>
> On November 23, 2026 3:44:12 PM GMT-03:00, Ian Rogers <irogers@google.com> wrote:
> >On Mon, Nov 23, 2026 at 8:46 AM James Clark <james.clark@linaro.org> wrote:
> >>
> >> Context analysis requires Clang 23 or later (see
> >> Documentation/dev-tools/context-analysis.rst), otherwise the build fails
> >> on older versions, e.g. Clang 18:
> >>
> >> util/env.h:142:39: error: use of undeclared identifier 'lock'
> >> 142 | struct rb_root infos __guarded_by(&lock);
> >>
> >> Only enable it when the Clang version is supported. Leave the other
> >> thread safety options enabled if they exist because they don't cause
> >> build failures at the moment, and might provide benefits even without
> >> -DWARN_CONTEXT_ANALYSIS.
> >
> >So we've had -Wthread-safety for a long time in the perf tree, I'm
> >guessing __guarded_by is missing on older clang versions. Can we just
> >stub out the __guarded_by for these old clang versions and keep the
> >lock checking?
>
> Looks way more reasonable, and no need for a feature test since we know
> the compiler version when __guarded_by was introduced, right?
Sorry for the trouble. I checked with clang 21 and it didn't have a
problem.
Thanks,
Namhyung
prev parent reply other threads:[~2026-11-23 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 16:46 [PATCH] perf build: Only enable context analysis with Clang 23 or later James Clark
2026-11-23 18:44 ` Ian Rogers
2026-11-23 19:55 ` Arnaldo Melo
2026-11-23 21:23 ` 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=awSu48pUIh942Zm4@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=arnaldo.melo@gmail.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=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