Skip to content

perf: integrate with kconfig and CONFIG driven features

David Ahern linux-kbuild lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23perf: initial infrasructure for kconfigtools/perf/Makefile tools/perf/Pconfig+5 -02 replies
2/23perf: make perl support based on CONFIG_LIBPERLtools/perf/Makefile tools/perf/Pconfig tools/perf/builtin-script.c +2 more+28 -280 replies
3/23perf: make python support based on CONFIG_LIBPYTHONtools/perf/Makefile tools/perf/Pconfig tools/perf/builtin-script.c +2 more+61 -680 replies
4/23perf: make gtk2 support based on CONFIG_GTK2tools/perf/Makefile tools/perf/Pconfig tools/perf/config/feature-tests.mak+22 -220 replies
5/23perf: make newt support based on CONFIG_NEWTtools/perf/Makefile tools/perf/Pconfig tools/perf/config/feature-tests.mak+26 -250 replies
6/23perf: remove NEWT_SUPPORT in favor of CONFIG_NEWTtools/perf/Makefile tools/perf/ui/ui.h tools/perf/util/annotate.h +1 more+6 -40 replies
7/23perf: remove GTK2_SUPPORT in favor of CONFIG_GTK2tools/perf/Makefile tools/perf/ui/ui.h tools/perf/util/annotate.h +1 more+3 -40 replies
8/23perf: make elf support based on CONFIG_LIBELFtools/perf/Makefile tools/perf/Pconfig+54 -560 replies
9/23perf: make cfi unwind support based on CONFIG_LIBUNWINDtools/perf/Makefile tools/perf/Pconfig tools/perf/arch/x86/Makefile +1 more+27 -123 replies
10/23perf: make demangle support based on CONFIG_DEMANGLEtools/perf/Makefile tools/perf/Pconfig tools/perf/util/symbol.h+39 -381 reply
11/23perf: make dwarf support based on CONFIG_DWARFtools/perf/Makefile tools/perf/Pconfig tools/perf/arch/arm/Makefile +6 more+23 -170 replies
12/23perf: add BIONIC config optiontools/perf/Makefile tools/perf/Pconfig+10 -30 replies
13/23perf: make numa support based on CONFIG_LIBNUMAtools/perf/Makefile tools/perf/Pconfig tools/perf/builtin-bench.c+15 -130 replies
14/23perf: make backtrace support based on CONFIG_BACKTRACEtools/perf/Makefile tools/perf/Pconfig tools/perf/config/feature-tests.mak +1 more+11 -90 replies
15/23perf: make libaudit support based on CONFIG_LIBAUDITtools/perf/Makefile tools/perf/Pconfig tools/perf/config/feature-tests.mak +1 more+15 -110 replies
16/23perf: consolidate CONFIG_LIBUNWIND checks in Makefiletools/perf/Makefile+17 -210 replies
17/23perf: remove LIBUNWIND_SUPPORT in favor of CONFIG_LIBUNWINDtools/perf/Makefile tools/perf/builtin-record.c tools/perf/util/unwind.h+9 -80 replies
18/23perf: deprecate LIBELF_SUPPORT in favor of CONFIG_LIBELFtools/perf/Makefile tools/perf/builtin-inject.c tools/perf/perf.c +3 more+9 -90 replies
19/23perf: deprecate DWARF_SUPPORT in favor of CONFIG_DWARFtools/perf/Makefile tools/perf/builtin-probe.c tools/perf/util/include/dwarf-regs.h +2 more+18 -130 replies
20/23perf: consolidate CONFIG_LIBELF checks in Makefiletools/perf/Makefile+16 -182 replies
21/23perf: consolidate CONFIG_DWARF checks in Makefiletools/perf/Makefile+5 -70 replies
22/23perf: only add elf to EXTLIBS if CONFIG_LIBELF is settools/perf/Makefile+4 -50 replies
23/23perf: only add elf-based object files if CONFIG_LIBELF is settools/perf/Makefile+4 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/23] perf: integrate with kconfig and CONFIG driven features

Patches can also be retrieved from:
https://github.com/dsahern/linux.git perf-config

I still need to add the conf build targets from the top level Makefile.

For this RFC series, you can run the commands manually to generate the .config file for perf and the corresponding include/config/auto.conf and include/generated/autoconf.h files.

To build conf (if it already exists in kernel tree jump to the conf commands below):

BLDDIR=/tmp/perf-build
SRCDIR=/path/to/kernel.git

BLDDIR=/tmp/perf
SRCDIR=/opt/sw/perf/ahern.git

mkdir $BLDDIR
cd $BLDDIR
mkdir -p include/config include/generated
rsync -av $SRCDIR/scripts/ scripts/
ln -s $SRCDIR source
cd $SRCDIR
make O=$BLDDIR V=1 scripts/kconfig conf

Ignore the .config errors - those relate to the kernel build. What matters here is that conf is built.

cd $BLDDIR
touch .config
PATH=$BLDDIR/scripts/kconfig:$PATH ARCH=x86 conf --silentoldconfig $SRCDIR/tools/perf/Pconfig

At this point you are asked what options to enable:

Enable newt-based TUI (NEWT) [N/y] (NEW) y
Enable GTK-based UI (GTK2) [N/y] (NEW) n
Enable support for Bionic (e.g., Android platform) (BIONIC) [N/y] (NEW) Development support for libc is available - glibc or bionic (LIBC) [N/y] (NEW) y
Enable support for libelf (LIBELF) [N/y] (NEW) y
Enable support for libunwind (LIBUNWIND) [N/y] (NEW) y
Enable support for dwarf (DWARF) [N/y] (NEW) y
Enable support for demangle (DEMANGLE) [N/y] (NEW) y
Enable support for perl scripting engine (LIBPERL) [N/y] (NEW) y Enable support for python scripting engine (LIBPYTHON) [N/y] (NEW) y Enable support for libaudit (LIBAUDIT) [N/y/?] (NEW) y
Enable support for libnuma (LIBNUMA) [N/y/?] (NEW) y
Enable support for stack backtrace debugging (BACKTRACE) [N/y] (NEW) y \#
\# configuration written to .config
\#

Now build it:
cd $SRCDIR

make -C tools/perf O=$BLDDIR DESTDIR=/tmp/perf-install -j 4

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>

---
David Ahern (23):
perf: initial infrasructure for kconfig
perf: make perl support based on CONFIG_LIBPERL
perf: make python support based on CONFIG_LIBPYTHON
perf: make gtk2 support based on CONFIG_GTK2
perf: make newt support based on CONFIG_NEWT
perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT
perf: remove GTK2_SUPPORT in favor of CONFIG_GTK2
perf: make elf support based on CONFIG_LIBELF
perf: make cfi unwind support based on CONFIG_LIBUNWIND
perf: make demangle support based on CONFIG_DEMANGLE
perf: make dwarf support based on CONFIG_DWARF
perf: config: add BIONIC config option
perf config: make numa support based on CONFIG_LIBNUMA perf config: make backtrace support based on CONFIG_BACKTRACE
perf: make libaudit support based on CONFIG_LIBAUDIT
perf: consolidate CONFIG_LIBUNWIND checks in Makefile
perf: remove LIBUNWIND_SUPPORT in favor of CONFIG_LIBUNWIND
perf: deprecate LIBELF_SUPPORT in favor of CONFIG_LIBELF
perf: deprecate DWARF_SUPPORT in favor of CONFIG_DWARF
perf: consolidate CONFIG_LIBELF checks in Makefile
perf: consolidate CONFIG_DWARF checks in Makefile
perf: Makefile: only add elf to EXTLIBS if CONFIG_LIBELF is set
perf: only add elf-based object files if CONFIG_LIBELF is set

 tools/perf/Makefile                     |  512 ++++++++++++++-----------------
 tools/perf/Pconfig                      |   59 ++++
 tools/perf/arch/arm/Makefile            |    2 +-
 tools/perf/arch/powerpc/Makefile        |    2 +-
 tools/perf/arch/s390/Makefile           |    2 +-
 tools/perf/arch/sh/Makefile             |    2 +-
 tools/perf/arch/sparc/Makefile          |    2 +-
 tools/perf/arch/x86/Makefile            |    4 +-
 tools/perf/builtin-bench.c              |    5 +-
 tools/perf/builtin-inject.c             |    3 +-
 tools/perf/builtin-probe.c              |   15 +-
 tools/perf/builtin-record.c             |   11 +-
 tools/perf/builtin-script.c             |    5 +-
 tools/perf/config/feature-tests.mak     |   18 +-
 tools/perf/perf.c                       |    5 +-
 tools/perf/ui/ui.h                      |    5 +-
 tools/perf/util/annotate.h              |    5 +-
 tools/perf/util/generate-cmdlist.sh     |    4 +-
 tools/perf/util/hist.h                  |    5 +-
 tools/perf/util/include/dwarf-regs.h    |    4 +-
 tools/perf/util/map.c                   |    3 +-
 tools/perf/util/probe-event.c           |    5 +-
 tools/perf/util/probe-finder.h          |    5 +-
 tools/perf/util/symbol.h                |    7 +-
 tools/perf/util/trace-event-scripting.c |   30 +-
 tools/perf/util/unwind.h                |    5 +-
 tools/perf/util/util.c                  |    5 +-
 27 files changed, 379 insertions(+), 351 deletions(-)
 create mode 100644 tools/perf/Pconfig
Signature · 1 line
1.7.10.1