Commit 5eb22425 authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf libdw: Remove unnecessary defines



As HAVE_DWARF_GETLOCATIONS_SUPPORT and HAVE_DWARF_CFI_SUPPORT always
match HAVE_DWARF_SUPPORT remove the macros and use
HAVE_DWARF_SUPPORT. If building the file is guarded by CONFIG_DWARF
then remove all ifs.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
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-10-irogers@google.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 91e81e98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ feature::
                bpf_skeletons           /  HAVE_BPF_SKEL
                debuginfod              /  HAVE_DEBUGINFOD_SUPPORT
                dwarf                   /  HAVE_DWARF_SUPPORT
                dwarf_getlocations      /  HAVE_DWARF_GETLOCATIONS_SUPPORT
                dwarf_getlocations      /  HAVE_DWARF_SUPPORT
                dwarf-unwind            /  HAVE_DWARF_UNWIND_SUPPORT
                auxtrace                /  HAVE_AUXTRACE_SUPPORT
                libaudit                /  HAVE_LIBAUDIT_SUPPORT
+0 −3
Original line number Diff line number Diff line
@@ -466,9 +466,6 @@ else
        $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.157, disables dwarf support. Please install new elfutils-devel/libdw-dev)
        NO_LIBDW := 1
      endif
    else
      CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT
      CFLAGS += -DHAVE_DWARF_CFI_SUPPORT
    endif # Dwarf support
  endif # libelf support
endif # NO_LIBELF
+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_GETLOCATIONS_SUPPORT
#ifndef HAVE_DWARF_SUPPORT
	if (annotate.data_type) {
		pr_err("Error: Data type profiling is disabled due to missing DWARF support\n");
		return -ENOTSUP;
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ struct feature_status supported_features[] = {
	FEATURE_STATUS("bpf_skeletons", HAVE_BPF_SKEL),
	FEATURE_STATUS("debuginfod", HAVE_DEBUGINFOD_SUPPORT),
	FEATURE_STATUS("dwarf", HAVE_DWARF_SUPPORT),
	FEATURE_STATUS("dwarf_getlocations", HAVE_DWARF_GETLOCATIONS_SUPPORT),
	FEATURE_STATUS("dwarf_getlocations", HAVE_DWARF_SUPPORT),
	FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT),
	FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT),
	FEATURE_STATUS("libaudit", HAVE_LIBAUDIT_SUPPORT),
+1 −1
Original line number Diff line number Diff line
@@ -1705,7 +1705,7 @@ int cmd_report(int argc, const char **argv)
		report.data_type = true;
		annotate_opts.annotate_src = false;

#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT
#ifndef HAVE_DWARF_SUPPORT
		pr_err("Error: Data type profiling is disabled due to missing DWARF support\n");
		goto error;
#endif
Loading