Re: [PATCH 1/1] tools build: Don't assume libtracefs-devel is always available

From: Arnaldo Carvalho de Melo
Date: Thu Oct 02 2025 - 11:47:12 EST


On Thu, Oct 02, 2025 at 08:21:08AM -0700, Ian Rogers wrote:
> On Thu, Oct 2, 2025 at 7:13 AM Tomas Glozar <tglozar@xxxxxxxxxx> wrote:
> >
> > čt 2. 10. 2025 v 15:05 odesílatel Arnaldo Carvalho de Melo
> > <acme@xxxxxxxxxx> napsal:
> > >
> > > perf doesn't use libtracefs and so it doesn't make sense to assume it is
> > > always available when building test-all.bin, defeating the feature check
> > > speedup it provides.
> > >
> > > The other tools/build/ users such as rtla, rv, etc call $(feature_check
> > > libtracefs) to check its availability instead of using the test-all.bin
> > > mechanism, stopping the build and asking for libtracefs-devel to be
> > > installed.
> > >
> > > Noticed after applying Ian Roger's removal unused libtracefs
> > > configuration in tools/perf/.
> > >
> > > Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> > > Cc: Gabriele Monaco <gmonaco@xxxxxxxxxx>
> > > Cc: Ian Rogers <irogers@xxxxxxxxxx>
> > > Cc: James Clark <james.clark@xxxxxxxxxx>
> > > Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> > > Cc: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
> > > Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> > > Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> > > Cc: Tomas Glozar <tglozar@xxxxxxxxxx>
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> >
> > Acked-by: Tomas Glozar <tglozar@xxxxxxxxxx>
> >
> > Perhaps it would also make sense to clarify in a comment that
> > test-all.c is to speed up perf build rather than rv, rtla etc. (which
> > don't use most of the dependencies listed there)?
>
> There's a big comment in Makefile.feature:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/build/Makefile.feature#n24
> I think that FEATURE_TESTS_BASIC tests are covered by test-all.c so I
> think this change needs to remove libtracefs from FEATURE_TESTS_BASIC
> otherwise $(feature-libtracefs) will evaluate to 1 even though no
> libtracefs testing has been performed.

Done, thanks for catching this.

> We can't just remove the tracefs feature test as there are
> dependencies in rv, rtla, etc.

And those, as noted, don't rely on test-all.bin to detect the presence
of libtracefs:

⬢ [acme@toolbx perf-tools-next]$ git grep feature.*libtracefs tools/
tools/tracing/latency/Makefile.config:$(call feature_check,libtracefs)
tools/tracing/latency/Makefile.config:ifeq ($(feature-libtracefs), 1)
tools/tracing/rtla/Makefile.config:$(call feature_check,libtracefs)
tools/tracing/rtla/Makefile.config:ifeq ($(feature-libtracefs), 1)
tools/verification/rv/Makefile.config:$(call feature_check,libtracefs)
tools/verification/rv/Makefile.config:ifeq ($(feature-libtracefs), 1)
⬢ [acme@toolbx perf-tools-next]$

Can I have your Reviewed-by or Acked-by?

Thanks,

- Arnaldo