Skip to content

Commit 2e91915

Browse files
captain5050acmel
authored andcommitted
perf build: Remove NO_LIBDW_DWARF_UNWIND option
Libdw unwinding support is present for every architecture that has a perf_regs.h - perf registers are needed for the initial frame to unwind. Elfutils also supports SPARC, ARC and m68k but there is no support in the Linux kernel for perf registers on these architectures. As the perf supported DWARF unwinding architectures are a subset of the elfutils ones, remove NO_LIBDW_DWARF_UNWIND as there isn't a case of elfutils lacking the support need for perf. Signed-off-by: Ian Rogers <[email protected]> Cc: Aditya Bodkhe <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Albert Ou <[email protected]> Cc: Alexandre Ghiti <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Chun-Tse Shao <[email protected]> Cc: Dmitriy Vyukov <[email protected]> Cc: Dr. David Alan Gilbert <[email protected]> Cc: Guo Ren <[email protected]> Cc: Haibo Xu <[email protected]> Cc: Howard Chu <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Krzysztof Łopatowski <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Wielaard <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sergei Trofimovich <[email protected]> Cc: Shimin Guo <[email protected]> Cc: Stephen Brennan <[email protected]> Cc: Thomas Falcon <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 406b51a commit 2e91915

3 files changed

Lines changed: 3 additions & 22 deletions

File tree

tools/perf/Makefile.config

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ ifeq ($(ARCH),mips)
118118
endif
119119
endif
120120

121-
# So far there's only x86 and arm libdw unwind support merged in perf.
122-
# Disable it on all other architectures in case libdw unwind
123-
# support is detected in system. Add supported architectures
124-
# to the check.
125-
ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc s390 csky riscv loongarch))
126-
NO_LIBDW_DWARF_UNWIND := 1
127-
endif
128-
129121
ifneq ($(LIBUNWIND),1)
130122
NO_LIBUNWIND := 1
131123
endif
@@ -456,7 +448,6 @@ endif
456448
ifdef NO_LIBELF
457449
NO_LIBDW := 1
458450
NO_LIBUNWIND := 1
459-
NO_LIBDW_DWARF_UNWIND := 1
460451
NO_LIBBPF := 1
461452
NO_JVMTI := 1
462453
else
@@ -504,10 +495,6 @@ ifeq ($(feature-libaio), 1)
504495
endif
505496
endif
506497

507-
ifdef NO_LIBDW
508-
NO_LIBDW_DWARF_UNWIND := 1
509-
endif
510-
511498
ifeq ($(feature-scandirat), 1)
512499
# Ignore having scandirat with memory sanitizer that lacks an interceptor.
513500
ifeq ($(filter s% -fsanitize=memory%,$(EXTRA_CFLAGS),),)
@@ -757,7 +744,7 @@ dwarf-post-unwind-text := BUG
757744

758745
# setup DWARF post unwinder
759746
ifdef NO_LIBUNWIND
760-
ifdef NO_LIBDW_DWARF_UNWIND
747+
ifdef NO_LIBDW
761748
$(warning Disabling post unwind, no support found.)
762749
dwarf-post-unwind := 0
763750
else
@@ -767,10 +754,6 @@ ifdef NO_LIBUNWIND
767754
else
768755
dwarf-post-unwind-text := libunwind
769756
$(call detected,CONFIG_LIBUNWIND)
770-
# Enable libunwind support by default.
771-
ifndef NO_LIBDW_DWARF_UNWIND
772-
NO_LIBDW_DWARF_UNWIND := 1
773-
endif
774757
endif
775758

776759
ifeq ($(dwarf-post-unwind),1)

tools/perf/tests/make

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ make_no_demangle := NO_DEMANGLE=1
8383
make_no_libelf := NO_LIBELF=1
8484
make_no_libdw := NO_LIBDW=1
8585
make_libunwind := LIBUNWIND=1
86-
make_no_libdw_dwarf_unwind := NO_LIBDW_DWARF_UNWIND=1
8786
make_no_backtrace := NO_BACKTRACE=1
8887
make_no_libcapstone := NO_CAPSTONE=1
8988
make_no_libnuma := NO_LIBNUMA=1
@@ -120,7 +119,7 @@ make_static := LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX3
120119
make_minimal := NO_LIBPYTHON=1 NO_GTK2=1
121120
make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
122121
make_minimal += NO_LIBNUMA=1 NO_LIBBIONIC=1 NO_LIBDW=1
123-
make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_LIBBPF=1
122+
make_minimal += NO_LIBBPF=1
124123
make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
125124
make_minimal += NO_LIBCAP=1 NO_CAPSTONE=1
126125

tools/perf/util/Build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,8 @@ perf-util-$(CONFIG_LIBDW) += dwarf-regs-arch/
223223
perf-util-$(CONFIG_LIBDW) += debuginfo.o
224224
perf-util-$(CONFIG_LIBDW) += annotate-data.o
225225
perf-util-$(CONFIG_LIBDW) += libdw.o
226+
perf-util-$(CONFIG_LIBDW) += unwind-libdw.o
226227

227-
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
228-
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw-arch/
229228
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
230229
perf-util-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
231230
perf-util-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o

0 commit comments

Comments
 (0)