Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d8e14d3 authored by He Kuang's avatar He Kuang Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarHe Kuang <hekuang@huawei.com>
Acked-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 403cacb8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
libperf-$(CONFIG_DWARF) += dwarf-regs.o

libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
libperf-$(CONFIG_LOCAL_LIBUNWIND)    += unwind-libunwind.o
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
+1 −1
Original line number Diff line number Diff line
libperf-$(CONFIG_DWARF)     += dwarf-regs.o
libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ libperf-y += group.o
libperf-$(CONFIG_DWARF) += dwarf-regs.o
libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o

libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
libperf-$(CONFIG_LOCAL_LIBUNWIND)    += unwind-libunwind.o
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o

libperf-$(CONFIG_AUXTRACE) += auxtrace.o
+17 −3
Original line number Diff line number Diff line
@@ -353,10 +353,20 @@ ifeq ($(ARCH),powerpc)
endif

ifndef NO_LIBUNWIND
  have_libunwind :=
  ifneq ($(feature-libunwind), 1)
    msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR);
    NO_LOCAL_LIBUNWIND := 1
  else
    have_libunwind := 1
    $(call detected,CONFIG_LOCAL_LIBUNWIND)
  endif

  ifneq ($(have_libunwind), 1)
    NO_LIBUNWIND := 1
  endif
else
  NO_LOCAL_LIBUNWIND := 1
endif

ifndef NO_LIBBPF
@@ -394,7 +404,7 @@ else
  NO_DWARF_UNWIND := 1
endif

ifndef NO_LIBUNWIND
ifndef NO_LOCAL_LIBUNWIND
  ifeq ($(ARCH),$(filter $(ARCH),arm arm64))
    $(call feature_check,libunwind-debug-frame)
    ifneq ($(feature-libunwind-debug-frame), 1)
@@ -405,10 +415,14 @@ ifndef NO_LIBUNWIND
    # non-ARM has no dwarf_find_debug_frame() function:
    CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
  endif
  CFLAGS  += -DHAVE_LIBUNWIND_SUPPORT
  EXTLIBS += $(LIBUNWIND_LIBS)
  LDFLAGS += $(LIBUNWIND_LIBS)
endif

ifndef NO_LIBUNWIND
  CFLAGS  += -DHAVE_LIBUNWIND_SUPPORT
  CFLAGS  += $(LIBUNWIND_CFLAGS)
  LDFLAGS += $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS)
  LDFLAGS += $(LIBUNWIND_LDFLAGS)
endif

ifndef NO_LIBAUDIT