[PATCH v1 00/13] Perf tool build improvements

From: Ian Rogers
Date: Sat Mar 11 2023 - 01:58:15 EST


Make the default build options a more preferred set, such as making
BPF skeletons default and failing the build if jevents or libtracevent
dependencies fail. The binutil dependencies are opt-in given license
restrictions. abi::__cxa_demangle demangling support is added so that
libiberty, from binutils, isn't necessary for C++ demangling.

Some build/test dependencies are fixed and the code cleaned up.

Ian Rogers (13):
perf build: Support python/perf.so testing
perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL
perf build: Remove unused HAVE_GLIBC_SUPPORT
perf build: Error if no libelf and NO_LIBELF isn't set
perf util: Remove weak sched_getcpu
perf build: Error if jevents won't work and NO_JEVENTS=1 isn't set
perf build: Make binutil libraries opt in
tools build: Add feature test for abi::__cxa_demangle
perf symbol: Add abi::__cxa_demangle C++ demangling support
perf build: Switch libpfm4 to opt-out rather than opt-in
perf build: If libtraceevent isn't present error the build
tools headers: Make the difference output easier to read
perf build: Remove redundant NO_NEWT build option

tools/build/Makefile.feature | 1 +
tools/build/feature/Makefile | 4 +
tools/build/feature/test-cxa-demangle.cpp | 17 ++
tools/perf/Makefile.config | 84 +++-----
tools/perf/Makefile.perf | 21 +-
tools/perf/builtin-lock.c | 2 +-
tools/perf/builtin-record.c | 2 +-
tools/perf/builtin-version.c | 2 +-
tools/perf/check-headers.sh | 229 ++++++++++++----------
tools/perf/tests/make | 17 +-
tools/perf/tests/shell/record_offcpu.sh | 2 +-
tools/perf/util/Build | 1 +
tools/perf/util/cloexec.c | 13 --
tools/perf/util/demangle-cxx.cpp | 50 +++++
tools/perf/util/demangle-cxx.h | 16 ++
tools/perf/util/symbol-elf.c | 37 +---
tools/perf/util/util.c | 16 ++
17 files changed, 294 insertions(+), 220 deletions(-)
create mode 100644 tools/build/feature/test-cxa-demangle.cpp
create mode 100644 tools/perf/util/demangle-cxx.cpp
create mode 100644 tools/perf/util/demangle-cxx.h

--
2.40.0.rc1.284.g88254d51c5-goog