From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Leo Yan <leo.yan@arm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf python: Track linked libraries as extension dependencies
Date: Fri, 2 Oct 2026 18:18:57 +0200 [thread overview]
Message-ID: <ar_ZcRqAZxwQpr4O@x2> (raw)
In-Reply-To: <CAP-5=fVsTGp+_gsk-yCiK58A7O3LuK0okOuHwuVr+xgiSHVGLQ@mail.gmail.com>
On Thu, Oct 01, 2026 at 09:25:02AM -0700, Ian Rogers wrote:
> On Thu, Oct 1, 2026 at 8:48 AM James Clark <james.clark@linaro.org> wrote:
> >
> > Since the Python extension switched to linking perf libraries, setup.py
> > only lists util/python.c as a source. The libraries are supplied through
> > LDFLAGS, which setuptools does not consider when deciding whether the
> > extension needs to be rebuilt.
> >
> > When a library changes, make invokes setup.py, but setuptools can skip
> > the build and the recipe copies the stale cached extension back into
> > python/. This leaves perf and its Python module running different
> > versions of the same code.
> >
> > Pass the linked library paths to setup.py and declare them as Extension
> > dependencies so that library changes trigger a rebuild. Include
> > EXTRA_PERFLIBS in the shared library list so that both make and
> > setuptools track those inputs as well, preserving the existing linker
> > order.
> >
> > Fixes: 9dabf4003423 ("perf python: Switch module to linking libraries from building source")
> > Assisted-by: Codex:GPT-6-Astra
> > Signed-off-by: James Clark <james.clark@linaro.org>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
git am complained, applied manually:
⬢ [acme@tb-x2-perf perf-tools-next]$ patch -p1 < ./20261001_james_clark_perf_python_track_linked_libraries_as_extension_dependencies.mbx
patching file tools/perf/Makefile.perf
Hunk #1 succeeded at 538 (offset 12 lines).
Hunk #2 succeeded at 571 with fuzz 1 (offset 12 lines).
patching file tools/perf/util/setup.py
⬢ [acme@tb-x2-perf perf-tools-next]$
- Arnaldo
prev parent reply other threads:[~2026-10-02 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:48 [PATCH] perf python: Track linked libraries as extension dependencies James Clark
2026-10-01 15:52 ` sashiko-bot
2026-10-01 16:25 ` Ian Rogers
2026-10-02 16:18 ` Arnaldo Carvalho de Melo [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=ar_ZcRqAZxwQpr4O@x2 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.