From: Sasha Levin <sashal@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
linux-kbuild@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/6] tools: build perf in tools_build
Date: Tue, 13 Oct 2026 13:08:53 -0400 [thread overview]
Message-ID: <20261013170854.647305-1-sashal@kernel.org> (raw)
In-Reply-To: <CAP-5=fWFY-tpJz2vcBZvurwdZY5gwd8cuTemE9q1rtZ0Vi0dng@mail.gmail.com>
On Mon, Oct 12, 2026 at 03:07:10PM -0700, Ian Rogers wrote:
> On Sun, Oct 11, 2026 at 4:36 PM Sasha Levin <sashal@kernel.org> wrote:
> > +# Every optional feature off, so the result does not depend on which
> > +# libraries are installed
> > +perf-flags-$(CONFIG_TOOLS_BUILD_PERF_MINIMAL) += \
> > + NO_LIBELF=1 NO_LIBTRACEEVENT=1 NO_JEVENTS=1 NO_LIBPYTHON=1 NO_LIBDW=1 \
> > + NO_LIBBPF=1 BUILD_BPF_SKEL=0 NO_SLANG=1 NO_GTK2=1 NO_AIO=1 \
> > + NO_BACKTRACE=1 NO_DEMANGLE=1 NO_LZMA=1 NO_LIBZSTD=1 NO_ZLIB=1 \
> > + NO_LIBNUMA=1 NO_LIBUNWIND=1 NO_LIBLLVM=1 NO_CAPSTONE=1 NO_LIBPFM4=1 \
> > + NO_SDT=1 NO_JVMTI=1 NO_LIBDEBUGINFOD=1 NO_BABELTRACE2=1 NO_RUST=1 \
> > + NO_SHELLCHECK=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1
>
> It seems unfortunate to maintain this list here, we also have a
> minimal target as a build test here:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/make?h=perf-tools-next#n123
> I wonder we should just add support for a MINIMAL=1 variable in
> tools/perf/Makefile.config and have that set these other variables.
Yup :(
What allmodconfig really wants from perf is what allmodconfig already does for
the kernel: build everything the environment supports and skip the rest. A
kernel option that needs something the toolchain lacks just ends up off rather
than breaking the build.
perf has no mode like that I think? A default build fails when libelf,
libtraceevent or python is missing, so an arm64 cross build, or a native build
without libtraceevent-dev, breaks. Turning everything off was the only way I
found around that.
Would it make sense to add such a mode to perf instead of MINIMAL=1? A missing
library would disable its feature with a warning rather than fail the build,
and the mode could skip shellcheck, mypy and pylint too. allmodconfig would
then build as much of perf as the host allows.
--
Thanks,
Sasha
next prev parent reply other threads:[~2026-10-13 17:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 23:36 [RFC PATCH 0/6] kbuild: build the userspace tools in tools/ with the kernel Sasha Levin
2026-10-11 23:36 ` [RFC PATCH 1/6] kbuild: factor the userspace ABI flags out into KBUILD_USERABI Sasha Levin
2026-10-11 23:39 ` sashiko-bot
2026-10-13 20:31 ` Thomas Weißschuh
2026-10-11 23:36 ` [RFC PATCH 2/6] kbuild: add "make tools_build" to build userspace tools from tools/ Sasha Levin
2026-10-11 23:45 ` sashiko-bot
2026-10-13 20:38 ` Thomas Weißschuh
2026-10-11 23:36 ` [RFC PATCH 3/6] tools: build perf in tools_build Sasha Levin
2026-10-11 23:43 ` sashiko-bot
2026-10-12 22:07 ` Ian Rogers
2026-10-13 17:08 ` Sasha Levin [this message]
2026-10-13 20:21 ` Arnaldo Carvalho de Melo
2026-10-11 23:36 ` [RFC PATCH 4/6] tools: build kernel selftests " Sasha Levin
2026-10-11 23:46 ` sashiko-bot
2026-10-13 19:29 ` Shuah Khan
2026-10-13 20:41 ` Thomas Weißschuh
2026-10-11 23:36 ` [RFC PATCH 5/6] kbuild: build the tools selected in tools/Kconfig as part of "make all" Sasha Levin
2026-10-11 23:44 ` sashiko-bot
2026-10-11 23:36 ` [RFC PATCH 6/6] Documentation: describe building tools with the kernel Sasha Levin
2026-10-11 23:39 ` sashiko-bot
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=20261013170854.647305-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=shuah@kernel.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.