Skip to contentSkip to conversation

tools build: Remove the libunwind feature tests from the ones detected when test-all.o builds

PATCH In review Arnaldo Carvalho de Melo 5 participants 8 messages Dec 11, 2024 – Mar 19, 2025 BPF

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools build: Remove the libunwind feature tests from the ones detected when test-all.o builds

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/build/Makefile.feature | 7 -------
 1 file changed, 7 deletions(-)
tools/build/Makefile.feature +0 -7
index b2884bc23775e986..9cde51104c2d70ec 100644
@@ -90,13 +90,6 @@ FEATURE_TESTS_EXTRA :=                  \
          libbfd-liberty                 \
          libbfd-liberty-z               \
          libopencsd                     \
-         libunwind-x86                  \
-         libunwind-x86_64               \
-         libunwind-arm                  \
-         libunwind-aarch64              \
-         libunwind-debug-frame          \
-         libunwind-debug-frame-arm      \
-         libunwind-debug-frame-aarch64  \
          cxx                            \
          llvm                           \
          clang                          \
Signature · 1 line
2.47.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Quoted 8 lines
Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>

Sorry for the delay on this.

Thanks,
Ian

Quoted 25 lines
---
 tools/build/Makefile.feature | 7 -------
 1 file changed, 7 deletions(-)
tools/build/Makefile.feature +0 -8
index b2884bc23775e986..9cde51104c2d70ec 100644
@@ -90,13 +90,6 @@ FEATURE_TESTS_EXTRA :=                  \
          libbfd-liberty                 \
          libbfd-liberty-z               \
          libopencsd                     \
-         libunwind-x86                  \
-         libunwind-x86_64               \
-         libunwind-arm                  \
-         libunwind-aarch64              \
-         libunwind-debug-frame          \
-         libunwind-debug-frame-arm      \
-         libunwind-debug-frame-aarch64  \
          cxx                            \
          llvm                           \
          clang                          \
--

2.47.0

#2 lore raw

Hello,

Quoted 45 lines · Ian Rogers
Quoted 34 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Quoted 8 lines
Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Quoted 3 lines

Sorry for the delay on this.

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Thanks,
Namhyung

Quoted 26 lines
Quoted 26 lines
---
 tools/build/Makefile.feature | 7 -------
 1 file changed, 7 deletions(-)
tools/build/Makefile.feature +0 -8
index b2884bc23775e986..9cde51104c2d70ec 100644
@@ -90,13 +90,6 @@ FEATURE_TESTS_EXTRA :=                  \
          libbfd-liberty                 \
          libbfd-liberty-z               \
          libopencsd                     \
-         libunwind-x86                  \
-         libunwind-x86_64               \
-         libunwind-arm                  \
-         libunwind-aarch64              \
-         libunwind-debug-frame          \
-         libunwind-debug-frame-arm      \
-         libunwind-debug-frame-aarch64  \
          cxx                            \
          llvm                           \
          clang                          \
--

2.47.0

#3 lore raw
Quoted 49 lines · Namhyung Kim

Hello,

Quoted 45 lines · Ian Rogers
Quoted 42 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Quoted 6 lines
Quoted 3 lines

Sorry for the delay on this.

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Sgtm. The patch hasn't had attention for 3 months. A quick grep for "unwind" and "UNW_" shows only use in perf and the feature tests.

Thanks,
Ian

#4 lore raw

2025-03-17 10:16 UTC-0700 ~ Ian Rogers <[email protected]>

Quoted 54 lines · Namhyung Kim
Quoted 53 lines

Hello,

Quoted 48 lines · Ian Rogers
Quoted 34 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Quoted 8 lines
Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>

Sorry for the delay on this.

Quoted 8 lines
Quoted 2 lines

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Sgtm. The patch hasn't had attention for 3 months. A quick grep for "unwind" and "UNW_" shows only use in perf and the feature tests.

Thanks,
Ian

Indeed, bpftool does not rely on libunwind, and I don't remember other BPF components doing so, either.

Quentin

#5 lore raw

Hello,

Quoted 61 lines · Quentin Monnet

2025-03-17 10:16 UTC-0700 ~ Ian Rogers <[email protected]>

Quoted 60 lines · Namhyung Kim
Quoted 49 lines

Hello,

Quoted 45 lines · Ian Rogers
Quoted 42 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Quoted 6 lines
Quoted 3 lines

Sorry for the delay on this.

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Sgtm. The patch hasn't had attention for 3 months. A quick grep for "unwind" and "UNW_" shows only use in perf and the feature tests.

Quoted 6 lines
Quoted 2 lines

Thanks,
Ian

Indeed, bpftool does not rely on libunwind, and I don't remember other BPF components doing so, either.

Right, but my concern was about the feature test itself and the related changes in the build files.

Can I get your Acked-by then?

Thanks,
Namhyung

#6 lore raw
Quoted 68 lines · Namhyung Kim

Hello,

Quoted 65 lines · Quentin Monnet

2025-03-17 10:16 UTC-0700 ~ Ian Rogers <[email protected]>

Quoted 62 lines · Namhyung Kim
Quoted 49 lines

Hello,

Quoted 45 lines · Ian Rogers
Quoted 42 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Quoted 6 lines
Quoted 3 lines

Sorry for the delay on this.

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Sgtm. The patch hasn't had attention for 3 months. A quick grep for "unwind" and "UNW_" shows only use in perf and the feature tests.

Thanks,
Ian

Quoted 7 lines
Quoted 2 lines

Indeed, bpftool does not rely on libunwind, and I don't remember other BPF components doing so, either.

Right, but my concern was about the feature test itself and the related changes in the build files.

Can I get your Acked-by then?

hi,
I might be missing something, but I see following commit in git already:
b40fbeb0b1cd tools build: Remove the libunwind feature tests from the ones detected when test-all.o builds

jirka

#7 lore raw

Hi Jiri,

Quoted 72 lines · Jiri Olsa
Quoted 71 lines · Namhyung Kim

Hello,

Quoted 67 lines · Quentin Monnet

2025-03-17 10:16 UTC-0700 ~ Ian Rogers <[email protected]>

Quoted 54 lines · Namhyung Kim
Quoted 53 lines

Hello,

Quoted 48 lines · Ian Rogers
Quoted 34 lines · Arnaldo Carvalho de Melo

We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf.

When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them.

Before this patch:

  $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP
  feature-libunwind-aarch64=1
  $

Even tho this not being test built and those header files being available:

  $ head -5 tools/build/feature/test-libunwind-aarch64.c
  // SPDX-License-Identifier: GPL-2.0
  #include <libunwind-aarch64.h>
  #include <stdlib.h>

extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $

After this patch:

  $ grep feature-libunwind- /tmp/b/FEATURE-DUMP
  $

Now an audit on what is being enabled when test-all.c builds will be performed.

Quoted 8 lines
Fixes 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>

Sorry for the delay on this.

Quoted 8 lines
Quoted 2 lines

Thanks for the review, but I think this part is used by other tools like BPF and tracing. It'd be nice to get reviews from them.

Sgtm. The patch hasn't had attention for 3 months. A quick grep for "unwind" and "UNW_" shows only use in perf and the feature tests.

Thanks,
Ian

Indeed, bpftool does not rely on libunwind, and I don't remember other BPF components doing so, either.

Quoted 8 lines
Quoted 4 lines

Right, but my concern was about the feature test itself and the related changes in the build files.

Can I get your Acked-by then?

hi,
I might be missing something, but I see following commit in git already:
b40fbeb0b1cd tools build: Remove the libunwind feature tests from the ones detected when test-all.o builds

Oops, thanks for checking this.

I was confused by Ian's late reply and thought it belongs to this cycle. :) Yep, it's already merged in the previous cycle.

Sorry for the noise.
Namhyung