aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHe Kuang <hekuang@huawei.com>2016-06-02 23:33:15 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-06-07 11:08:52 -0400
commit9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d (patch)
tree100c6cc1a79b2f8f5aaa1685c03b3791cd8d2768 /tools
parent403cacb8a25eb86d564750fce2293978814d2d15 (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/Build2
-rw-r--r--tools/perf/arch/arm64/util/Build2
-rw-r--r--tools/perf/arch/x86/util/Build2
-rw-r--r--tools/perf/config/Makefile20
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 @@
1libperf-$(CONFIG_DWARF) += dwarf-regs.o 1libperf-$(CONFIG_DWARF) += dwarf-regs.o
2 2
3libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 3libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
4libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o 4libperf-$(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 @@
1libperf-$(CONFIG_DWARF) += dwarf-regs.o 1libperf-$(CONFIG_DWARF) += dwarf-regs.o
2libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 2libperf-$(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
8libperf-$(CONFIG_DWARF) += dwarf-regs.o 8libperf-$(CONFIG_DWARF) += dwarf-regs.o
9libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o 9libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o
10 10
11libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 11libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
12libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o 12libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
13 13
14libperf-$(CONFIG_AUXTRACE) += auxtrace.o 14libperf-$(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)
353endif 353endif
354 354
355ifndef NO_LIBUNWIND 355ifndef 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
368else
369 NO_LOCAL_LIBUNWIND := 1
360endif 370endif
361 371
362ifndef NO_LIBBPF 372ifndef NO_LIBBPF
@@ -394,7 +404,7 @@ else
394 NO_DWARF_UNWIND := 1 404 NO_DWARF_UNWIND := 1
395endif 405endif
396 406
397ifndef NO_LIBUNWIND 407ifndef 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)
420endif
421
422ifndef 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)
412endif 426endif
413 427
414ifndef NO_LIBAUDIT 428ifndef NO_LIBAUDIT