Commit 8838abf6 authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT



In Makefile.config for unwinding the name dwarf implies either
libunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is really
just defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Tested-by: default avatarLeo Yan <leo.yan@arm.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Yang Jihong <yangjihong@bytedance.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Shenlin Liang <liangshenlin@eswincomputing.com>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Guilherme Amadio <amadio@gentoo.org>
Cc: Steinar H. Gunderson <sesse@google.com>
Cc: Changbin Du <changbin.du@huawei.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Chen Pei <cp0613@linux.alibaba.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-riscv@lists.infradead.org
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Atish Patra <atishp@rivosinc.com>
Cc: Dima Kogan <dima@secretsauce.net>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: linux-csky@vger.kernel.org
Link: https://lore.kernel.org/r/20241017001354.56973-11-irogers@google.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 5eb22425
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -47,15 +47,15 @@ feature::
                bpf                     /  HAVE_LIBBPF_SUPPORT
                bpf_skeletons           /  HAVE_BPF_SKEL
                debuginfod              /  HAVE_DEBUGINFOD_SUPPORT
                dwarf                   /  HAVE_DWARF_SUPPORT
                dwarf_getlocations      /  HAVE_DWARF_SUPPORT
                dwarf                   /  HAVE_LIBDW_SUPPORT
                dwarf_getlocations      /  HAVE_LIBDW_SUPPORT
                dwarf-unwind            /  HAVE_DWARF_UNWIND_SUPPORT
                auxtrace                /  HAVE_AUXTRACE_SUPPORT
                libaudit                /  HAVE_LIBAUDIT_SUPPORT
                libbfd                  /  HAVE_LIBBFD_SUPPORT
                libcapstone             /  HAVE_LIBCAPSTONE_SUPPORT
                libcrypto               /  HAVE_LIBCRYPTO_SUPPORT
                libdw-dwarf-unwind      /  HAVE_DWARF_SUPPORT
                libdw-dwarf-unwind      /  HAVE_LIBDW_SUPPORT
                libelf                  /  HAVE_LIBELF_SUPPORT
                libnuma                 /  HAVE_LIBNUMA_SUPPORT
                libopencsd              /  HAVE_CSTRACE_SUPPORT
+1 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ ifndef NO_LIBELF
      $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled)
      NO_LIBDW := 1
    else
      CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
      CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS)
      LDFLAGS += $(LIBDW_LDFLAGS)
      EXTLIBS += ${DWARFLIBS}
      $(call detected,CONFIG_DWARF)
+2 −2
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ static struct ins_ops *check_ppc_insn(struct disasm_line *dl)
 * is moved to r31. update_insn_state_powerpc tracks these state
 * changes
 */
#ifdef HAVE_DWARF_SUPPORT
#ifdef HAVE_LIBDW_SUPPORT
static void update_insn_state_powerpc(struct type_state *state,
		struct data_loc_info *dloc, Dwarf_Die * cu_die __maybe_unused,
		struct disasm_line *dl)
@@ -300,7 +300,7 @@ static void update_insn_state_powerpc(struct type_state *state,
			insn_offset, src->reg1, dst->reg1);
	pr_debug_type_name(&tsr->type, tsr->kind);
}
#endif /* HAVE_DWARF_SUPPORT */
#endif /* HAVE_LIBDW_SUPPORT */

static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
{
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ static int x86__annotate_init(struct arch *arch, char *cpuid)
	return err;
}

#ifdef HAVE_DWARF_SUPPORT
#ifdef HAVE_LIBDW_SUPPORT
static void update_insn_state_x86(struct type_state *state,
				  struct data_loc_info *dloc, Dwarf_Die *cu_die,
				  struct disasm_line *dl)
+1 −1
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ int cmd_annotate(int argc, const char **argv)
	}
#endif

#ifndef HAVE_DWARF_SUPPORT
#ifndef HAVE_LIBDW_SUPPORT
	if (annotate.data_type) {
		pr_err("Error: Data type profiling is disabled due to missing DWARF support\n");
		return -ENOTSUP;
Loading