diff options
| author | He Kuang <hekuang@huawei.com> | 2016-06-02 23:33:15 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-07 11:08:52 -0400 |
| commit | 9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d (patch) | |
| tree | 100c6cc1a79b2f8f5aaa1685c03b3791cd8d2768 /tools | |
| parent | 403cacb8a25eb86d564750fce2293978814d2d15 (diff) | |
perf unwind: Separate local/remote libunwind config
CONFIG_LIBUNWIND/NO_LIBUNWIND are changed to CONFIG_LOCAL_LIBUNWIND/
NO_LOCAL_LIBUNWIND for retaining local unwind features. The new
CONFIG_LIBUNWIND stands for either local or remote or both unwind are
supported, and NO_LIBUNWIND means that neither local nor remote unwind
is supported.
LIBUNWIND_LIBS is eliminated in LDFLAGS if local libunwind is not
supported.
Signed-off-by: He Kuang <hekuang@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1464924803-22214-7-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/arch/arm/util/Build | 2 | ||||
| -rw-r--r-- | tools/perf/arch/arm64/util/Build | 2 | ||||
| -rw-r--r-- | tools/perf/arch/x86/util/Build | 2 | ||||
| -rw-r--r-- | tools/perf/config/Makefile | 20 |
4 files changed, 20 insertions, 6 deletions
diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build index d22e3d07de3d..f98da17357c0 100644 --- a/tools/perf/arch/arm/util/Build +++ b/tools/perf/arch/arm/util/Build | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | libperf-$(CONFIG_DWARF) += dwarf-regs.o | 1 | libperf-$(CONFIG_DWARF) += dwarf-regs.o |
| 2 | 2 | ||
| 3 | libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o | 3 | libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o |
| 4 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o | 4 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o |
diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/Build index e58123a8912b..02f41dba4f4f 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | libperf-$(CONFIG_DWARF) += dwarf-regs.o | 1 | libperf-$(CONFIG_DWARF) += dwarf-regs.o |
| 2 | libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o | 2 | libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o |
diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 4cd8a16b1b7b..f95e6f46ef0d 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build | |||
| @@ -8,7 +8,7 @@ libperf-y += group.o | |||
| 8 | libperf-$(CONFIG_DWARF) += dwarf-regs.o | 8 | libperf-$(CONFIG_DWARF) += dwarf-regs.o |
| 9 | libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o | 9 | libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o |
| 10 | 10 | ||
| 11 | libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o | 11 | libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o |
| 12 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o | 12 | libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o |
| 13 | 13 | ||
| 14 | libperf-$(CONFIG_AUXTRACE) += auxtrace.o | 14 | libperf-$(CONFIG_AUXTRACE) += auxtrace.o |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 118df2d04b08..3918687e7816 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
| @@ -353,10 +353,20 @@ ifeq ($(ARCH),powerpc) | |||
| 353 | endif | 353 | endif |
| 354 | 354 | ||
| 355 | ifndef NO_LIBUNWIND | 355 | ifndef NO_LIBUNWIND |
| 356 | have_libunwind := | ||
| 356 | ifneq ($(feature-libunwind), 1) | 357 | ifneq ($(feature-libunwind), 1) |
| 357 | msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR); | 358 | msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR); |
| 359 | NO_LOCAL_LIBUNWIND := 1 | ||
| 360 | else | ||
| 361 | have_libunwind := 1 | ||
| 362 | $(call detected,CONFIG_LOCAL_LIBUNWIND) | ||
| 363 | endif | ||
| 364 | |||
| 365 | ifneq ($(have_libunwind), 1) | ||
| 358 | NO_LIBUNWIND := 1 | 366 | NO_LIBUNWIND := 1 |
| 359 | endif | 367 | endif |
| 368 | else | ||
| 369 | NO_LOCAL_LIBUNWIND := 1 | ||
| 360 | endif | 370 | endif |
| 361 | 371 | ||
| 362 | ifndef NO_LIBBPF | 372 | ifndef NO_LIBBPF |
| @@ -394,7 +404,7 @@ else | |||
| 394 | NO_DWARF_UNWIND := 1 | 404 | NO_DWARF_UNWIND := 1 |
| 395 | endif | 405 | endif |
| 396 | 406 | ||
| 397 | ifndef NO_LIBUNWIND | 407 | ifndef NO_LOCAL_LIBUNWIND |
| 398 | ifeq ($(ARCH),$(filter $(ARCH),arm arm64)) | 408 | ifeq ($(ARCH),$(filter $(ARCH),arm arm64)) |
| 399 | $(call feature_check,libunwind-debug-frame) | 409 | $(call feature_check,libunwind-debug-frame) |
| 400 | ifneq ($(feature-libunwind-debug-frame), 1) | 410 | ifneq ($(feature-libunwind-debug-frame), 1) |
| @@ -405,10 +415,14 @@ ifndef NO_LIBUNWIND | |||
| 405 | # non-ARM has no dwarf_find_debug_frame() function: | 415 | # non-ARM has no dwarf_find_debug_frame() function: |
| 406 | CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME | 416 | CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME |
| 407 | endif | 417 | endif |
| 408 | CFLAGS += -DHAVE_LIBUNWIND_SUPPORT | ||
| 409 | EXTLIBS += $(LIBUNWIND_LIBS) | 418 | EXTLIBS += $(LIBUNWIND_LIBS) |
| 419 | LDFLAGS += $(LIBUNWIND_LIBS) | ||
| 420 | endif | ||
| 421 | |||
| 422 | ifndef NO_LIBUNWIND | ||
| 423 | CFLAGS += -DHAVE_LIBUNWIND_SUPPORT | ||
| 410 | CFLAGS += $(LIBUNWIND_CFLAGS) | 424 | CFLAGS += $(LIBUNWIND_CFLAGS) |
| 411 | LDFLAGS += $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS) | 425 | LDFLAGS += $(LIBUNWIND_LDFLAGS) |
| 412 | endif | 426 | endif |
| 413 | 427 | ||
| 414 | ifndef NO_LIBAUDIT | 428 | ifndef NO_LIBAUDIT |
