diff options
author | Jiri Olsa <jolsa@redhat.com> | 2014-02-19 10:52:58 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-24 07:29:36 -0500 |
commit | 0a4f2b6a3ba5066947a8cbd7cfa26fb8a9280625 (patch) | |
tree | da64b921c940b5fc6fc2354e2ffec4f22919a956 /tools/perf/arch | |
parent | 5ea8415407a76c4a85ac971ec82d110161cd77f1 (diff) |
perf tools: Setup default dwarf post unwinder
Factor NO_LIBDW_DWARF_UNWIND makefile variable and code that selects
default DWARf post unwinder based on detected features (libdw and
libunwind support)
If both are detected the libunwind is selected as default. Simple
'make' will try to add:
- libunwind unwinder if present
- libdw unwinder if present
- disable dwarf unwind if non of libunwind and libdw
libraries are present
If one of the DWARF unwind libraries is detected, message is displayed
which one (libunwind/libdw) is compiled in.
Examples:
- compile in libdw unwinder if present:
$ make NO_LIBUNWIND=1
- compile in libdw (with libdw installation directory) unwinder if present:
$ make LIBDW_DIR=/opt/elfutils/ NO_LIBUNWIND=1
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... DWARF post unwind library: libdw
- disable post dwarf unwind completely:
$ make NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... DWARF post unwind library: libunwind
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1392825179-5228-6-git-send-email-jolsa@redhat.com
[ Add suggestion about setting LIBDW_DIR when not finding libdw ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch')
-rw-r--r-- | tools/perf/arch/x86/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile index 37c4652cc48a..1641542e3636 100644 --- a/tools/perf/arch/x86/Makefile +++ b/tools/perf/arch/x86/Makefile | |||
@@ -4,12 +4,14 @@ LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o | |||
4 | endif | 4 | endif |
5 | ifndef NO_LIBUNWIND | 5 | ifndef NO_LIBUNWIND |
6 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o | 6 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o |
7 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o | ||
8 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o | ||
9 | endif | 7 | endif |
10 | ifndef NO_LIBDW_DWARF_UNWIND | 8 | ifndef NO_LIBDW_DWARF_UNWIND |
11 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o | 9 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o |
12 | endif | 10 | endif |
11 | ifndef NO_DWARF_UNWIND | ||
12 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o | ||
13 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o | ||
14 | endif | ||
13 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o | 15 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o |
14 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o | 16 | LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o |
15 | LIB_H += arch/$(ARCH)/util/tsc.h | 17 | LIB_H += arch/$(ARCH)/util/tsc.h |