From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06F711AB6F8 for ; Tue, 24 Sep 2024 16:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193888; cv=none; b=iz7OWc9ytlIC+ALgVH8IlBM2q11rLw7rs3YZFOEiTKkVwKTeqyPSwPQio3PeLhGU0cOW/+UNPt1e5Lng7PRd+GpU65uv5l7Yc0dzC6D3xT4PHS4MHiVgAyqjIpOJk24w04o1teOr3GPeQYdffXFMXJQkyEVIXewbwenqezQlUiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193888; c=relaxed/simple; bh=6ldSzspe4/zfU6p8RY13b2Whrjh9/0dgtmSSNim1Au8=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=uux7tQ1FcxetAT/pCq3xUfSYkqOQWYbHRAMPvm1q5+YmJ4fM86l/usWf06SaeedsgzFIb0TPTP0ctZfLw/zPDU6JwzIFH85lR0mDzxknppdBaEHIYL3csUt77q9s7Fq4jP6hoj5EiA8ltCClOhFx9JgOmuXMC1AMr/CmzwFhYBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=IKpVOd7v; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IKpVOd7v" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6db7a8c6910so85563417b3.0 for ; Tue, 24 Sep 2024 09:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193885; x=1727798685; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=MIuym/Se3whvq0Q9G+aE4AofiMsCpDlgHN99NPdUOcI=; b=IKpVOd7vQRvifirkxe62PUozDdL5tkaliBMoSyr0NzuaFcacDZbqzFp/9eNqCqdaII AaZl/2yVBelczhD5LEmUsBBZ6BjkqUWjtOCa7bxJeu3IQ4nazljuimCPmFds1Net+cri 3h5Vna9d9MwYzq6fosHvJ0lNVvokgwY+xkdW/nV1j31KIR35lzmWQZ9rwUiTT5TnUJB9 cdxj8RSrHnycB05bDAd049RmDCn2bB+g30zELoycSw9HuIs7m8QoYUM+xZpEvd5CfL4T ob4NeHyfIKcn3TzercuJQ+z2J8ChmH/fr36Be33vUj7QY169Y2pmIgWPRtWnqZ0ZzRVE SjVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193885; x=1727798685; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MIuym/Se3whvq0Q9G+aE4AofiMsCpDlgHN99NPdUOcI=; b=GwcnWO5sETVrfHpai0l7RJoggscL2t1CH4y+QWcMe3yXQZ3eE/vSjUCCW3t5rkygxa LN1hpSH0ob6A11cR7qS1GRtQoKl1V0UWC4COl7rOzuohwxLvd+JDJd6QxRMwdBdFbP3W jIyxDGKCpHh2qFZiQpvm3GYZFY3Fs78+LNLEbkdcQxqbWON+GRiBngRRyuiev3+oEc7o Bao/o/sZIvCVMdYRJD1yMNzZKtlM414wMn4fl9mlr60zh8VHbca5kFFck5a8+3fZMiu7 4ZUCzKOiE9OiYvA2nLzmsr8ySXTYsAIwodQYwXJHqxVYzDDOElqMb4MBiXoHH5yIqcyP hcoA== X-Forwarded-Encrypted: i=1; AJvYcCVeSCkg9+9dXCzbiYzm25vlCNTKgyDlrVhusecVu5vslNElnm/ad6DBQQIcZvRYxCMOXhNWHbLxh5E/T9I=@vger.kernel.org X-Gm-Message-State: AOJu0Yz6TRPHumJA0JB/GADbTEI9yoFjf1k5NfeTlsbDzO+ycT89ot0r Oq7Az/FJfVRuBaPN/ECPESXHFiJnLobbo+eGHlFdBSodNHfkFJNKjW8nRHINdRWUCQa3mfr0gov uPOLUAw== X-Google-Smtp-Source: AGHT+IEhjsG2ZGO2x/HqgX5T0/aN9BdMijIJURe/2RWcP8Yo1jU3pzKYrC3MPs4BlLhOz9cbMlLyoTQB57zn X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a81:8603:0:b0:6b0:57ec:c5f9 with SMTP id 00721157ae682-6dfeea02193mr1014117b3.0.1727193884972; Tue, 24 Sep 2024 09:04:44 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:08 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-2-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 01/11] perf build: Rename NO_DWARF to NO_LIBDW From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" NO_DWARF could mean more than NO_LIBDW support, in particular no libunwind support. Rename to be more intention revealing. Signed-off-by: Ian Rogers Reviewed-by: Masami Hiramatsu (Google) Tested-by: Leo Yan --- tools/perf/Makefile.config | 16 ++++++++-------- tools/perf/Makefile.perf | 2 +- tools/perf/arch/arm/Makefile | 2 +- tools/perf/arch/arm64/Makefile | 2 +- tools/perf/arch/csky/Makefile | 2 +- tools/perf/arch/loongarch/Makefile | 2 +- tools/perf/arch/mips/Makefile | 2 +- tools/perf/arch/powerpc/Makefile | 2 +- tools/perf/arch/riscv/Makefile | 2 +- tools/perf/arch/s390/Makefile | 2 +- tools/perf/arch/sh/Makefile | 2 +- tools/perf/arch/sparc/Makefile | 2 +- tools/perf/arch/x86/Makefile | 2 +- tools/perf/arch/xtensa/Makefile | 2 +- tools/perf/builtin-probe.c | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 5e26d3a91b36..55a39211496d 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -429,7 +429,7 @@ ifeq ($(feature-file-handle), 1) endif =20 ifdef NO_LIBELF - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 NO_LIBUNWIND :=3D 1 NO_LIBDW_DWARF_UNWIND :=3D 1 NO_LIBBPF :=3D 1 @@ -471,9 +471,9 @@ else endif endif ifneq ($(feature-dwarf), 1) - ifndef NO_DWARF + ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 endif else ifneq ($(feature-dwarf_getlocations), 1) @@ -496,7 +496,7 @@ ifeq ($(feature-libaio), 1) endif endif =20 -ifdef NO_DWARF +ifdef NO_LIBDW NO_LIBDW_DWARF_UNWIND :=3D 1 endif =20 @@ -574,17 +574,17 @@ ifndef NO_LIBELF endif endif =20 - ifndef NO_DWARF + ifndef NO_LIBDW ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) $(warning DWARF register mappings have not been defined for architec= ture $(SRCARCH), DWARF support disabled) - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 else CFLAGS +=3D -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} $(call detected,CONFIG_DWARF) endif # PERF_HAVE_DWARF_REGS - endif # NO_DWARF + endif # NO_LIBDW =20 ifndef NO_LIBBPF ifeq ($(feature-bpf), 1) @@ -633,7 +633,7 @@ ifdef PERF_HAVE_JITDUMP endif =20 ifeq ($(SRCARCH),powerpc) - ifndef NO_DWARF + ifndef NO_LIBDW CFLAGS +=3D -DHAVE_SKIP_CALLCHAIN_IDX endif endif diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 9dd2e8d3f3c9..a144bfaf8aeb 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -40,7 +40,7 @@ include ../scripts/utilities.mak # # Define EXTRA_PERFLIBS to pass extra libraries to PERFLIBS. # -# Define NO_DWARF if you do not want debug-info analysis feature at all. +# Define NO_LIBDW if you do not want debug-info analysis feature at all. # # Define WERROR=3D0 to disable treating any warnings as errors. # diff --git a/tools/perf/arch/arm/Makefile b/tools/perf/arch/arm/Makefile index 1d88fdab13bf..9b164d379548 100644 --- a/tools/perf/arch/arm/Makefile +++ b/tools/perf/arch/arm/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile index 5735ed4479bb..8a5ffbfe809f 100644 --- a/tools/perf/arch/arm64/Makefile +++ b/tools/perf/arch/arm64/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/csky/Makefile b/tools/perf/arch/csky/Makefile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/csky/Makefile +++ b/tools/perf/arch/csky/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/arch/loongarch/Makefile b/tools/perf/arch/loongarch= /Makefile index c89d6bb6b184..1cc5eb01f32b 100644 --- a/tools/perf/arch/loongarch/Makefile +++ b/tools/perf/arch/loongarch/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/mips/Makefile b/tools/perf/arch/mips/Makefile index cd0b011b3be5..733f7b76f52d 100644 --- a/tools/perf/arch/mips/Makefile +++ b/tools/perf/arch/mips/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Mak= efile index bf6d323574f6..7672d555f6cd 100644 --- a/tools/perf/arch/powerpc/Makefile +++ b/tools/perf/arch/powerpc/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/riscv/Makefile b/tools/perf/arch/riscv/Makefile index 90c3c476a242..4664a78a1afd 100644 --- a/tools/perf/arch/riscv/Makefile +++ b/tools/perf/arch/riscv/Makefile @@ -1,4 +1,4 @@ -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile index 56994e63b43a..3f66e2ede3f7 100644 --- a/tools/perf/arch/s390/Makefile +++ b/tools/perf/arch/s390/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 diff --git a/tools/perf/arch/sh/Makefile b/tools/perf/arch/sh/Makefile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/sh/Makefile +++ b/tools/perf/arch/sh/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/arch/sparc/Makefile b/tools/perf/arch/sparc/Makefile index 4031db72ba71..7741184894c8 100644 --- a/tools/perf/arch/sparc/Makefile +++ b/tools/perf/arch/sparc/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile index 67b4969a6738..9aa58acb5564 100644 --- a/tools/perf/arch/x86/Makefile +++ b/tools/perf/arch/x86/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makef= ile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/xtensa/Makefile +++ b/tools/perf/arch/xtensa/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 003a3bcebfdf..91672bb3047c 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -616,7 +616,7 @@ __cmd_probe(int argc, const char **argv) set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); #else -# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_DWARF= =3D1", c) +# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_LIBDW= =3D1", c) set_nobuild('L', "line", false); set_nobuild('V', "vars", false); set_nobuild('\0', "externs", false); --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E3CA1ABEB1 for ; Tue, 24 Sep 2024 16:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193889; cv=none; b=rQsckc778aQufPqIfKAnJW0dUAUmbWnsB9gSyH/lgpmpFA7RxnldJ7164nlG5xMk3jUrc7odRDiosdooDXW2TaxkawHys7GnvVmYkeogZ7fZs9mwpJDp0UsRZLFdSb/AMLRBgpOebLatgjgbxWUPkDgXGt8KAAbPt2uWn4Z1hIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193889; c=relaxed/simple; bh=lOIkeFxBr9KJmYjHvA6kEldEhr5V551MPVf7R9cQ/Xc=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=sjU0xJSCvEKZQIyGT+iWXwTOeh9aoBxNLWj36Zy4KR9TGcRJB2wi7cUOIP365E4DLKZNWmdHibNDi7DdWI2oq8TtuHXpkB26yzHEXZBJOTZKoWd9eyHze03E5RmD11s5e/Jlx9irTHDi31TMVCTXHfUlidn2DF/e9HDGh8JGfuA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=loUhXXD0; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="loUhXXD0" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e2146737f2so10232857b3.1 for ; Tue, 24 Sep 2024 09:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193887; x=1727798687; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=3t0OVVOToxT9eDI/sUQz+XrDg6OUTflpEIB0w34UBIA=; b=loUhXXD0z9lob2woxmM9lgwOUzGLr1aUd1x4+TJzX4beO05zNAFkDmRSHrJb/OhGeS +/e6q/EnqchYvbENClLl1rpISfCMzTIBeBs/7kmevJgjNQR4pc/LXOM9fhiQ4heSsQIT mxPqPZfL0uBrFh0TbQWBfsyeMwN3uwklCTjdgBWMpxAepJDcuH/FoCfadfX9wriKBB+m FfySFtewlViWzEyvBnaeh2GwP5atPS29d8Shm7kQkJibacsQLiQvhbADZ4E+7eVlW3Ff 2TlD/+thyWJ2kjWsOn9tHoqGfcVA9ul72LQ+L5hyvhJ/AtNp3yNNlI/iu7rIzhk5Fzl4 ueMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193887; x=1727798687; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3t0OVVOToxT9eDI/sUQz+XrDg6OUTflpEIB0w34UBIA=; b=HbZnhbpiTcN6ojtinUlx0QQ+WZOHEu7cnXyMTYxcwjKgx9KKK/oyb375+rlyjbzV5y KcDFmf7tu7KekKCMhZ+hHTKtmKqVXQaMPsqyCiNdrfvxRuWsCLOLYek/fgbd9bdSOZ8m 98IC6cjFgtWK7f4wqOOFv+jWG57ST0GCYd0ovHjToO3SYg95bZMEWhuXIxtPnVyLDL6m 15QN6QAC1Cfs6UV772CZDYVCocxekbPrIHU+28wtzRwuehi+GP2YEvZ/gCpX/Hm0LO3A kuyzcp0nvtRf8yUA9mrGwYYjGtP0YfsjrVtPHNJGYcYwNoxdSNzi/2KGxPGCdpR9z+t1 NbJw== X-Forwarded-Encrypted: i=1; AJvYcCWnl5wgxXJId2LMPOZqRMVpolVjqrd68TI0zJneupoUNNKLIpLliNyvsovhjU2jvtWCLbsbw4PNOY4BFVk=@vger.kernel.org X-Gm-Message-State: AOJu0YymQR6cSnu8W559ZY7lLizFJFcLSBw2Q4FB5eoSQ7iuKAT5fRKk ijRypxYaljqHnlFb/87g59lLVvJirjmegVX1vTDib3Ia0OXxTzQXm+fY+KWqrP8/OnD/6UQVVfe rJg2kvQ== X-Google-Smtp-Source: AGHT+IF37gOj9FE2Xs9jnvIRNygnS/TyFwBKwryzuDiqUK2T+INXLVMaWw33Z/HlSNoZvxxm4oauHzQyspya X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a81:a783:0:b0:6c1:298e:5a7 with SMTP id 00721157ae682-6dfeeff6918mr934617b3.5.1727193887266; Tue, 24 Sep 2024 09:04:47 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:09 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-3-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 02/11] perf build: Remove defined but never used variable From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Previously NO_DWARF_UNWIND was part of conditional compilation but it is now unused so remove. Signed-off-by: Ian Rogers Reviewed-by: Masami Hiramatsu (Google) Tested-by: Leo Yan --- tools/perf/Makefile.config | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 55a39211496d..182e14e39cd5 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -753,8 +753,6 @@ endif ifeq ($(dwarf-post-unwind),1) CFLAGS +=3D -DHAVE_DWARF_UNWIND_SUPPORT $(call detected,CONFIG_DWARF_UNWIND) -else - NO_DWARF_UNWIND :=3D 1 endif =20 ifndef NO_LOCAL_LIBUNWIND --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B08DB1ABEDA for ; Tue, 24 Sep 2024 16:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193892; cv=none; b=UR+j6LHSSufK06UwAafmc52JW0EFiZyw//bqMjzQ4PdsARruaercYEYnGhzY1w1O7z77CJMiClVB1//a+ylIpZ5Y1cOB/0g2FbGn0ilfqxqXF8z5Y0NL8JbrcNWpVWHptZ+JzrT0AyTjc/TCkTAYHbOj1KR26jUiMo+8qKlNOl8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193892; c=relaxed/simple; bh=PLU4I0lDGlMLrK+xY01KoXdu2LXpXiaMNRUqveJo6Ps=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=TE3G67jWJVCFuLLUoHuaJw6933uKKGJhm5Bten2JXmxLzAaxyC2TtPkgYyabMyyzfFfOPKewEnWoH3YKqFheZpPMtrpObq0TBjeUgDFJv74RLc6JXHivpagHoOCYLSKQCaWwEmq+7Geyv92DqDEtAuxMlVA482OMdXKtGiJ07d4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=U6Yhu30p; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="U6Yhu30p" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e1ce98dcafaso7797007276.0 for ; Tue, 24 Sep 2024 09:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193890; x=1727798690; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=OqorPOT5WI1jcIIEa3LclCQTORysR8OKk4M5Adg397w=; b=U6Yhu30pwKb4v9t4W8eYvXC1ZabOU0YjRaKTk+q3rtEFJxXBDuhbQ/PXZOd6x3kxEM Pq0y18ggAwJNq1Qbv96g2RIrJeepsrb5q4TIk4pbvYuS2knob5Ncd0yQY1ynR0Cx9VdU qWdJK77d9kUOQf2kyeVnjM8ox97MR+CVuiTfgelcRCBWcJr1c0eOqNofVc8U2UIRbano 7qpq8dMAKc9vZ2wpTjni3M4K7aiZc2LjmShJHtoAkFxsTJROteLtdOZSbf/dHjG41oAf k+aYoZHAaz8Fdg75hNZ4TUxzjxPu2Zq5tesruUEM0cYS+rgvoAubqUyR8PMk9Jfy6+st VxvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193890; x=1727798690; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OqorPOT5WI1jcIIEa3LclCQTORysR8OKk4M5Adg397w=; b=omkD+LaXIpaJXKiHDPYBPGEA2hYRL1Y1AgEES2dPki0nb89aToCXjrVwyrGbzf+ha4 jfh/0Uh0PlkyGIMAH8h10yJ2fhixZHncwH1PBVDj5UVqD9PtK7fbWBTRLDwsW3f6T/lQ id3NsdZGWvPLrrcKg5FIrCYfLiY96YnNeecZmJeNrWV0Q4zGFpwZ7PpcIE8rK7FX7mvz 1kcKtbh7wH10cG6xy6TpULctoUfCYw4JfkUkyEfPU1//5WT58D1ovJjP+qzY2fNIhYU0 eir6Ri+F04Cag3MA3snb8/JMLZcUENACzbhfUn1XrNcBD5ckxbRfOHcNGs3FgiHbssTw SWUQ== X-Forwarded-Encrypted: i=1; AJvYcCUGidjm6XqcfLzuP3HJIXN7+ACAJZ36PTQuui/uJekAeRT2uMyK20UaHDKzrDBgOPIsCvd7GzKin0esR9E=@vger.kernel.org X-Gm-Message-State: AOJu0YxD8PU/hjW1/Y1TSSfq8JQYbjR/uarB6Mu6StV2ytLcmbKwHKGu jBJVi0Jek4qQ4lLNY8NaXVy9g0JoIhBMzUxFavAm2vnvD0QiU9XweRA5pA7CpP4iPyqonbpTZab UrfuGmg== X-Google-Smtp-Source: AGHT+IG2Q/xLed4ZQt4yjlTA+ew21JIESrkVnLSdxire2/fqHlOBZff+LPagYrBCe3WX48WZ914CwoJdSIVp X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a25:8045:0:b0:e20:2b5b:c6e6 with SMTP id 3f1490d57ef6-e2250cc2238mr30434276.9.1727193889646; Tue, 24 Sep 2024 09:04:49 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:10 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-4-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 03/11] perf build: Rename test-dwarf to test-libdw From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Be more intention revealing that the dwarf test is actually testing for libdw support. Signed-off-by: Ian Rogers Reviewed-by: Masami Hiramatsu (Google) Tested-by: Leo Yan --- tools/build/Makefile.feature | 6 +++--- tools/build/feature/Makefile | 16 ++++++++-------- tools/build/feature/test-all.c | 6 +++--- .../build/feature/{test-dwarf.c =3D> test-libdw.c} | 0 tools/perf/Makefile.config | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) rename tools/build/feature/{test-dwarf.c =3D> test-libdw.c} (100%) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index ffd117135094..6025810cc346 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -30,7 +30,7 @@ endef # FEATURE_TESTS_BASIC :=3D \ backtrace \ - dwarf \ + libdw \ dwarf_getlocations \ dwarf_getcfi \ eventfd \ @@ -120,7 +120,7 @@ ifeq ($(FEATURE_TESTS),all) endif =20 FEATURE_DISPLAY ?=3D \ - dwarf \ + libdw \ dwarf_getlocations \ glibc \ libbfd \ @@ -233,7 +233,7 @@ endef =20 # # generates feature value assignment for name, like: -# $(call feature_assign,dwarf) =3D=3D feature-dwarf=3D1 +# $(call feature_assign,libdw) =3D=3D feature-libdw=3D1 # feature_assign =3D feature-$(1)=3D$(feature-$(1)) =20 diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 5938cf799dc6..bece326ac93b 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -5,7 +5,7 @@ FILES=3D \ test-all.bin \ test-backtrace.bin \ test-bionic.bin \ - test-dwarf.bin \ + test-libdw.bin \ test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ @@ -168,9 +168,9 @@ $(OUTPUT)test-libopencsd.bin: $(BUILD) # -lopencsd_c_api -lopencsd provided by # $(FEATURE_CHECK_LDFLAGS-libopencsd) =20 -DWARFLIBS :=3D -ldw +DWLIBS :=3D -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS +=3D -lelf -lz -llzma -lbz2 -lzstd + DWLIBS +=3D -lelf -lz -llzma -lbz2 -lzstd =20 LIBDW_VERSION :=3D $(shell $(PKG_CONFIG) --modversion libdw) LIBDW_VERSION_1 :=3D $(word 1, $(subst ., ,$(LIBDW_VERSION))) @@ -179,18 +179,18 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) # Elfutils merged libebl.a into libdw.a starting from version 0.177, # Link libebl.a only if libdw is older than this version. ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0) - DWARFLIBS +=3D -lebl + DWLIBS +=3D -lebl endif endif =20 -$(OUTPUT)test-dwarf.bin: - $(BUILD) $(DWARFLIBS) +$(OUTPUT)test-libdw.bin: + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 6f4bf386a3b5..d60e072b6eca 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -38,8 +38,8 @@ # include "test-glibc.c" #undef main =20 -#define main main_test_dwarf -# include "test-dwarf.c" +#define main main_test_libdw +# include "test-libdw.c" #undef main =20 #define main main_test_dwarf_getlocations @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) main_test_get_current_dir_name(); main_test_gettid(); main_test_glibc(); - main_test_dwarf(); + main_test_libdw(); main_test_dwarf_getlocations(); main_test_eventfd(); main_test_libelf_getphdrnum(); diff --git a/tools/build/feature/test-dwarf.c b/tools/build/feature/test-li= bdw.c similarity index 100% rename from tools/build/feature/test-dwarf.c rename to tools/build/feature/test-libdw.c diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 182e14e39cd5..c8e157cc0c5e 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -159,8 +159,8 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) DWARFLIBS +=3D -lebl endif endif -FEATURE_CHECK_CFLAGS-dwarf :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) @@ -470,7 +470,7 @@ else $(warning No libdw DWARF unwind found, Please install elfutils-dev= el/libdw-dev >=3D 0.158 and/or set LIBDW_DIR) endif endif - ifneq ($(feature-dwarf), 1) + ifneq ($(feature-libdw), 1) ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EC821AC43D for ; Tue, 24 Sep 2024 16:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193896; cv=none; b=c6NRfvrmfnHCgd01bSfWVJ63iPaoCyd3KP8YZij4GINIsWDTancxigC/p4P2t4C3Qt2r7B05jKtI9WxIxeqKpfzbZH2i3eUOyMZgZgtx8nd1cG0K8klWX5AxyjsBvwsI1HiGmM1kFH/V+tfWR21OEIgu8XNuSKJc+Z3l+TCn03s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193896; c=relaxed/simple; bh=5+TP5c012LI2AoqEdXEI8GvA+4ixa18Xpdmo9YFnRNM=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=Z8GQoLAfowlZ0No5jCFeSmijG7gdd3F0YnidxsaiOxw9Db1cJ5F260GcdiKUqWUnheach5c6LM/O/4E7eKsWa/ld0VKfAPKhqW6yAUT7WFrwobP19y+jBYv7OlsI36RQ+Uh7tCDArgyh7zWj9REfHV8Xzz0xXFFTIQTHn56ANak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AvRnai/N; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AvRnai/N" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6db7a8c6831so91224117b3.3 for ; Tue, 24 Sep 2024 09:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193892; x=1727798692; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=AjuTqW9o4pHYWqMKRuPj6vA5c1OHRz2lfcyVQCR2e1g=; b=AvRnai/NHed3oA0L7RUeFmI3cZRl+yrXrkijyDnJHAnwGQPk0JEmhPia4Q7zHUJJo1 J6OdzkA6t+JbzmbP81BqBOqycV/dPojMjlYPmEG54bdNIJOwuGWV/G6kngG2XVQN/76R io/qDtiVIsQbg/FM+xVFmefbcxT6VNxTxjd37pcJMEJEQ8SCJgq+BSDDTAVYqsRXO+Ey L5DeWhfy7gVoDomWN34JG8sKbO8TRwcs+lfXR8wLQeKYYinHw2ugfdzqDLBEGSETaZZ6 OSt9bjflV5VPqtffuxWbtWIAD52Tgo5PoZT3Wc1H7MV2pZvDWqJo3pXvbh9q64C48gEO nh9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193892; x=1727798692; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AjuTqW9o4pHYWqMKRuPj6vA5c1OHRz2lfcyVQCR2e1g=; b=W/vYprw7hmXWdiTty9kntI97cT/SbyaEEsGbztr2l4+9LMdbwUDP6QXsEDdkXZFHZm 1Y/WYeyLJZRyUE5ROwNYEj94GEkCIZfzWmcTR/IWAJwE67z203+q1MH0mG6L+Bia28oc 4QzQQdRHbaSoYqaGuK0cwcre0flEafAYZ0qNFxKuiwCAVym68VWdbhIGezLkzW3KRBfC ZgwfW9uxBt0WMe2XYejXL/tgWtmU4yok2I6xUcZkhQOvZoSMu8f7w5qUY6K9NrJnN3PC 0QysHPSxjbWyC+Xd7aViO6IWSjGhQuQSLhH0B1O8j2S4BM+M7pwUOsrlEcP+Nes2Zn1/ 8kFQ== X-Forwarded-Encrypted: i=1; AJvYcCUFuFY1g/uqZE/5YazTzRRyTQnx+uVwquzwtRtUDlJB81sZp2q7/mtwaGSAU9iZSSTR7mNxhJRV5ikHiAg=@vger.kernel.org X-Gm-Message-State: AOJu0YxXXgvxcJzTNjbmDhMRlAZSF+FBy/049UNeyygevSXCZgMMNUhI Xqn6s1sKUrtuWrknup7ryuI3Mnnw4mSxKQDdUD4LZwt14nnwL3X7Zc9e1gwBvjM3pQcAa1g7rPw YyCdpDg== X-Google-Smtp-Source: AGHT+IGhTzyOV9p0U4//yxmppvbUdb592+O3yKg5lTmRXUxVgP8HrO/MQGhSKuOL5lMIGVLVUgkiQTtmBrFa X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a25:dcd3:0:b0:e11:7246:963b with SMTP id 3f1490d57ef6-e2252f1c53emr49215276.1.1727193891984; Tue, 24 Sep 2024 09:04:51 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:11 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-5-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 04/11] perf build: Combine libdw-dwarf-unwind into libdw feature tests From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Support in libdw has been present for 10 years so let's simplify the build logic with a single feature test. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 4 ---- tools/build/feature/test-all.c | 5 ----- tools/build/feature/test-libdw-dwarf-unwind.c | 14 -------------- tools/build/feature/test-libdw.c | 19 ++++++++++++++++++- tools/perf/Makefile.config | 8 -------- 6 files changed, 18 insertions(+), 34 deletions(-) delete mode 100644 tools/build/feature/test-libdw-dwarf-unwind.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 6025810cc346..db3695ec5f83 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -60,7 +60,6 @@ FEATURE_TESTS_BASIC :=3D \ reallocarray \ stackprotector-all \ timerfd \ - libdw-dwarf-unwind \ zlib \ lzma \ get_cpuid \ @@ -133,7 +132,6 @@ FEATURE_DISPLAY ?=3D \ libpython \ libcrypto \ libunwind \ - libdw-dwarf-unwind \ libcapstone \ llvm-perf \ zlib \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index bece326ac93b..7bb409c1f7e6 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -52,7 +52,6 @@ FILES=3D \ test-pthread-barrier.bin \ test-stackprotector-all.bin \ test-timerfd.bin \ - test-libdw-dwarf-unwind.bin \ test-libbabeltrace.bin \ test-libcapstone.bin \ test-compile-32.bin \ @@ -314,9 +313,6 @@ $(OUTPUT)test-backtrace.bin: $(OUTPUT)test-timerfd.bin: $(BUILD) =20 -$(OUTPUT)test-libdw-dwarf-unwind.bin: - $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind) - $(OUTPUT)test-libbabeltrace.bin: $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) =20 diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index d60e072b6eca..863c82516433 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -98,10 +98,6 @@ # include "test-stackprotector-all.c" #undef main =20 -#define main main_test_libdw_dwarf_unwind -# include "test-libdw-dwarf-unwind.c" -#undef main - #define main main_test_zlib # include "test-zlib.c" #undef main @@ -202,7 +198,6 @@ int main(int argc, char *argv[]) main_test_numa_num_possible_cpus(); main_test_timerfd(); main_test_stackprotector_all(); - main_test_libdw_dwarf_unwind(); main_test_zlib(); main_test_pthread_attr_setaffinity_np(); main_test_pthread_barrier(); diff --git a/tools/build/feature/test-libdw-dwarf-unwind.c b/tools/build/fe= ature/test-libdw-dwarf-unwind.c deleted file mode 100644 index ed03d9505609..000000000000 --- a/tools/build/feature/test-libdw-dwarf-unwind.c +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 - -#include - -int main(void) -{ - /* - * This function is guarded via: __nonnull_attribute__ (1, 2). - * Passing '1' as arguments value. This code is never executed, - * only compiled. - */ - dwfl_thread_getframes((void *) 1, (void *) 1, NULL); - return 0; -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 8d474bd7371b..793f4ac49514 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -1,11 +1,28 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include =20 -int main(void) +int test_libdw(void) { Dwarf *dbg =3D dwarf_begin(0, DWARF_C_READ); =20 return (long)dbg; } + +int test_libdw_unwind(void) +{ + /* + * This function is guarded via: __nonnull_attribute__ (1, 2). + * Passing '1' as arguments value. This code is never executed, + * only compiled. + */ + dwfl_thread_getframes((void *) 1, (void *) 1, NULL); + return 0; +} + +int main(void) +{ + return test_libdw() + test_libdw_unwind(); +} diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index c8e157cc0c5e..93fd6bd74d20 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -161,8 +161,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getlocations :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) @@ -464,12 +462,6 @@ else endif endif else - ifndef NO_LIBDW_DWARF_UNWIND - ifneq ($(feature-libdw-dwarf-unwind),1) - NO_LIBDW_DWARF_UNWIND :=3D 1 - $(warning No libdw DWARF unwind found, Please install elfutils-dev= el/libdw-dev >=3D 0.158 and/or set LIBDW_DIR) - endif - endif ifneq ($(feature-libdw), 1) ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82C6C1AC43B for ; Tue, 24 Sep 2024 16:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193897; cv=none; b=paSE3+X79CxFNth3/WHoM2vak2k+LPezwUGlnUymhJqPVq5p69AVfyhmIoisaRR5GrMOkDmEahFP3crmT15olmnYqAJDXnEq2Sv3sDIDoCbwAkjXJMAAqt+kMsrN7fRPTLymQRsTSLWb4T/T2xeaxCKrV5Z2GUkoQ4D2jnYDbMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193897; c=relaxed/simple; bh=rruGH38TSZOYfjW1/N60pJ/41Dq2JxcGpa5/2StUC4I=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=oE7kGQJMWH0wRiORG7YVUCY1vT89EWeTlVGx3RqQ3xSe7NCwDYOmXTtTeALUG9e67Ia0shZJw+Af0OGDSRqjfuWs9Kf+QDa9vFY80rXzgKxymKHy/fTjgkdZELPqNX6HmUCQh7742BrJHTxO+KXtAvY/85N3gw6vppU25v6y6yA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xbnkjaXL; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xbnkjaXL" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6db7a8c6910so85567877b3.0 for ; Tue, 24 Sep 2024 09:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193894; x=1727798694; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=azi3lOMKsZm5eq2iYCYCweyd2aFTYwHfrQ9vExF9G2E=; b=xbnkjaXL2mVZ9JAPzj8k0K5jRSjXQYTu+0n0Z7pP8/JHn8R7Rf1pjtFgnugdGMwYks 2Wl2ULnBh5V+ss57L1cc+fgTLA9EJZ+9jZ2qb8ufwWw76sxPlQQ4EY6RU2JXN5i8FkJ0 pOH/INPrlpV/wtx8vXoRhJy7k8ydHeFw3FgbGaLeaX1XC4P0xNn7mKSCLUKd500lhFha TaL0q+epF425XnEY3560kKAM/LLpkhqvMMpUfute7k+HK92u/TAX4H7b9A3YmT7T27uN 1bqGYUvUSVmmNpXUyl2/yBoWNAUDanA8N07qaqMqU/ABtuEfbDYVaRgg8KlF/dvj2sU4 ZxMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193894; x=1727798694; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=azi3lOMKsZm5eq2iYCYCweyd2aFTYwHfrQ9vExF9G2E=; b=cAOiuM4Gl611uZmM6y2Koh7ViSdAKyMo425JMNXgUrLXwvRqtyVcmYDMggf5LAORN2 QGj0DbcD5PT/7wGM5eQw8YRD55uHyVmytpWG115WAnAJUximtM2Hu8O8DDWu92IT0VE2 PKhyVgkJYYnPdkdKuVMEFxRPsWsSujVjEAlVmwX4BI8gQuNfqhjt7YboCqY/rb+J5l2F FgwA+Ji03dE84qhlq4upAl+pGEi05nIKXiZZiIwyj3/eq3R0rQjhEMIZp3+vZau1GnJ7 J95nsrzM5p5dGQmIAn65GDwZwiyIAUQ+LsepbZ1pTHkAe+POyM5qANs+2TIhRMQ/cZez lZwQ== X-Forwarded-Encrypted: i=1; AJvYcCVjSn1oqbfX3dUuXCzOZUXWkTZPapPSpW8CJg+/JaOhJ+ZdlLuTS9Ski083p1B3l3KFBOYSbRrKDwq1mTQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyXANo+jw0BErQJGDQClOSxKfvGDJ6TQDvv9/ISe3qs9A1IxiHb iqrgTB34j7xLRxMzTfVxMF/4b2AYMJnbZxiSvUfGycmeFNHqONO/JCAuuKnpxN89gs4zCLboop5 GgdcB5Q== X-Google-Smtp-Source: AGHT+IFn//Bxcg3ECI3/hVbMi2EJYSViXIOaG1A9ioaU0lUv/zG4eCg+ouDnNx9U6BnSyTpMXpRdK1ayN/4Q X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a81:8603:0:b0:6b0:57ec:c5f9 with SMTP id 00721157ae682-6dfeea02193mr1014207b3.0.1727193894573; Tue, 24 Sep 2024 09:04:54 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:12 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-6-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 05/11] perf build: Combine test-dwarf-getlocations into test-libdw From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dwarf_getlocations support in libdw is more than 10 years old. Make libdw imply dwarf_getlocations support and simplify build logic. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 4 ---- tools/build/feature/test-all.c | 5 ----- tools/build/feature/test-dwarf_getlocations.c | 13 ------------- tools/build/feature/test-libdw.c | 14 +++++++++++++- tools/perf/Makefile.config | 10 ++-------- 6 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 tools/build/feature/test-dwarf_getlocations.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index db3695ec5f83..cf6a967575ea 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -31,7 +31,6 @@ endef FEATURE_TESTS_BASIC :=3D \ backtrace \ libdw \ - dwarf_getlocations \ dwarf_getcfi \ eventfd \ fortify-source \ @@ -120,7 +119,6 @@ endif =20 FEATURE_DISPLAY ?=3D \ libdw \ - dwarf_getlocations \ glibc \ libbfd \ libbfd-buildid \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 7bb409c1f7e6..7683d171f744 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES=3D \ test-backtrace.bin \ test-bionic.bin \ test-libdw.bin \ - test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ test-fortify-source.bin \ @@ -185,9 +184,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) =20 -$(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-dwarf_getcfi.bin: $(BUILD) $(DWLIBS) =20 diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 863c82516433..59ef3d7fe6a4 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -42,10 +42,6 @@ # include "test-libdw.c" #undef main =20 -#define main main_test_dwarf_getlocations -# include "test-dwarf_getlocations.c" -#undef main - #define main main_test_eventfd # include "test-eventfd.c" #undef main @@ -184,7 +180,6 @@ int main(int argc, char *argv[]) main_test_gettid(); main_test_glibc(); main_test_libdw(); - main_test_dwarf_getlocations(); main_test_eventfd(); main_test_libelf_getphdrnum(); main_test_libelf_gelf_getnote(); diff --git a/tools/build/feature/test-dwarf_getlocations.c b/tools/build/fe= ature/test-dwarf_getlocations.c deleted file mode 100644 index 78fb4a1fa68c..000000000000 --- a/tools/build/feature/test-dwarf_getlocations.c +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include - -int main(void) -{ - Dwarf_Addr base, start, end; - Dwarf_Attribute attr; - Dwarf_Op *op; - size_t nops; - ptrdiff_t offset =3D 0; - return (int)dwarf_getlocations(&attr, offset, &base, &start, &end,= &op, &nops); -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 793f4ac49514..83ea5d5f235d 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include @@ -22,7 +23,18 @@ int test_libdw_unwind(void) return 0; } =20 +int test_libdw_getlocations(void) +{ + Dwarf_Addr base, start, end; + Dwarf_Attribute attr; + Dwarf_Op *op; + size_t nops; + ptrdiff_t offset =3D 0; + + return (int)dwarf_getlocations(&attr, offset, &base, &start, &end, &op, &= nops); +} + int main(void) { - return test_libdw() + test_libdw_unwind(); + return test_libdw() + test_libdw_unwind() + test_libdw_getlocations(); } diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 93fd6bd74d20..903de48c140d 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -161,8 +161,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getlocations :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getcfi :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 @@ -464,15 +462,11 @@ else else ifneq ($(feature-libdw), 1) ifndef NO_LIBDW - $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) + $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.157, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 endif else - ifneq ($(feature-dwarf_getlocations), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.157) - else - CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - endif # dwarf_getlocations + CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT ifneq ($(feature-dwarf_getcfi), 1) $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.142) else --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 469971AC452 for ; Tue, 24 Sep 2024 16:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193899; cv=none; b=iCQ8KdRYGh/7u+UZnEu9zp5zOgWJ9zSK39IqACL+pqr1RS1OgPFYuhuO+mYMcwIDpBxsDdOMiB/DMMTCfUMSJha2O4dI/Dhamyjqyhh49A/AKzJR6i0J2+ZJHOzw7ZZYSeuA6ZIrdz+ya/P+W9T0JLUnUGMYtfqsjq0lLtUZNrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193899; c=relaxed/simple; bh=HgtplYdqCMWgkrpqDu/oJfFklGqzSqhPOh3TiNIHB5k=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=RaCDqR+wJGa25ZrToqDelDN4Ih0TrVc478yxPkMTKKsZR79lTvciDah4v+nHfhhzDbrIOuXng1PGvduHbn6NQLprS5Vbta9LkdvL4ShGHQCYBCe074Pl5f57WFDfGZFE3SQSqoX0c8EqRRy474N1lA57eNjiiXst5Nl99zoGs74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=SgjhGvDO; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SgjhGvDO" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6d54ab222fcso118712087b3.1 for ; Tue, 24 Sep 2024 09:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193897; x=1727798697; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=/HA+7dw3RtBIuFOxFJuWuOogi0B/JaIuk1VQyQU3th8=; b=SgjhGvDOklX22aR2kvLbUlT+Vw7dP0F4REKHD39ROACrIor0Z408+lnGd8SDaMUTA9 jyNyRiHWY60LdMdcxpiyIRWGQjyl2TYMI8RmxkGtTkNr/dzv2pHGnr7L82EX2MNtysGn 1ZnMpS2gGc2Ibt6B53ESaJs/YU5ni5fo2KEK4HMJ0piSWH1J4nQDts81OcAk7urP5Y4r syELpHpl0F6sfWg3UsXkveLJSkVe3DI0pUD+Q0iqdgeXlEuFNNyJHJhsOJ7SNRPQhv1J VExJBLXG+uqBTV8hYZ8/TKesTOjvbqyThguSktaVhGNo/RcycHyKapk8mr2i17A1L2bz EOwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193897; x=1727798697; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/HA+7dw3RtBIuFOxFJuWuOogi0B/JaIuk1VQyQU3th8=; b=RhA2HvDBpdVgkEveRuKLnKvIXUctcIiev9tNldeNabEua0rlegTRK4ixF0bQVZqxcc eB2XGkQXAb++SBtLZzCcOk9VntA+lOuHKC8jZBKuHLSpl/8pkL+/31kqqeS/xdbaadPf rTBPXjBhYNs9hAjoLyeUMT3SiC4eslwZRttWM1oaZX0wWP5oIW/6u8SojgnDPJEh3VTI adUKBep43Vmm3TJSgwwmd9RMSzuUjXlMJHOsFHdxhqa6CsErkNzYWTz45v5KdtsnaQ+s 7RUrf80dITohS2Eu1iqpdd7ttdpv96jeolhNzunTWwIW/ubwdD5FReIhJ3nr4VxX7H54 Pbdg== X-Forwarded-Encrypted: i=1; AJvYcCXsF59ql7p7js1gLfr4yyJd+AwoOduTAO/gIkM0c4tlCASFboDUkIFiZrwwAgzBdLtoSmDJxh3kTj4kIbM=@vger.kernel.org X-Gm-Message-State: AOJu0YynYxIPDkbwvgeOPQZXQY6GlHViTy6FysFIct7MKHvd7eCpSKor axtoAyzpbfiOZj8NV2J1EBGBRpvuHoZ7WPDhVi1ZBbZ14m3nhqW/yF1T7NHOYfWedSd5Sw4bJfS jaf947g== X-Google-Smtp-Source: AGHT+IHgbaLlS5UPYP2QT/IFZVE1+4hZGKpP8RHMFveYH58SJAZjQY2AHyXTkehShjGYLwStnffO/+tF37rX X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a05:690c:2004:b0:6a9:3d52:79e9 with SMTP id 00721157ae682-6dfeeec1a9fmr2097177b3.4.1727193897074; Tue, 24 Sep 2024 09:04:57 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:13 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-7-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 06/11] perf build: Combine test-dwarf-getcfi into test-libdw From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dwarf_getcfi support in libdw is 15 years old. Make libdw imply dwarf_getcfi support and simplify build logic. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/build/Makefile.feature | 1 - tools/build/feature/Makefile | 4 ---- tools/build/feature/test-dwarf_getcfi.c | 9 --------- tools/build/feature/test-libdw.c | 10 +++++++++- tools/perf/Makefile.config | 8 +------- 5 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 tools/build/feature/test-dwarf_getcfi.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index cf6a967575ea..ef72aae3dd49 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -31,7 +31,6 @@ endef FEATURE_TESTS_BASIC :=3D \ backtrace \ libdw \ - dwarf_getcfi \ eventfd \ fortify-source \ get_current_dir_name \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 7683d171f744..f94afd522ebb 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES=3D \ test-backtrace.bin \ test-bionic.bin \ test-libdw.bin \ - test-dwarf_getcfi.bin \ test-eventfd.bin \ test-fortify-source.bin \ test-get_current_dir_name.bin \ @@ -184,9 +183,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) =20 -$(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf =20 diff --git a/tools/build/feature/test-dwarf_getcfi.c b/tools/build/feature/= test-dwarf_getcfi.c deleted file mode 100644 index 50e7d7cb7bdf..000000000000 --- a/tools/build/feature/test-dwarf_getcfi.c +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include - -int main(void) -{ - Dwarf *dwarf =3D NULL; - return dwarf_getcfi(dwarf) =3D=3D NULL; -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 83ea5d5f235d..71c6f8e3b0ee 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -34,7 +34,15 @@ int test_libdw_getlocations(void) return (int)dwarf_getlocations(&attr, offset, &base, &start, &end, &op, &= nops); } =20 +int test_libdw_getcfi(void) +{ + Dwarf *dwarf =3D NULL; + + return dwarf_getcfi(dwarf) =3D=3D NULL; +} + int main(void) { - return test_libdw() + test_libdw_unwind() + test_libdw_getlocations(); + return test_libdw() + test_libdw_unwind() + test_libdw_getlocations() + + test_libdw_getcfi(); } diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 903de48c140d..9da0dc001d98 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -161,8 +161,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getcfi :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 # for linking with debug library, run like: # make DEBUG=3D1 LIBBABELTRACE_DIR=3D/opt/libbabeltrace/ @@ -467,11 +465,7 @@ else endif else CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - ifneq ($(feature-dwarf_getcfi), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.142) - else - CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT - endif # dwarf_getcfi + CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B13D51AC8AE for ; Tue, 24 Sep 2024 16:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193902; cv=none; b=D07pNR1n9toJeM75geXzrlHDD0fDH/mO+CPOsG/b9QHHzcFuoEkZ8rxvsSsa3jfa/MvuiEbGj9+mK5cGRm0QERV/9RkbjRPcdXSH00msR3qVk2nJn+jeFNctYE3irP3Ma/mmEY8571HWYKLiSzQeTfS1IgSyg7VlncnpY5y4Gu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193902; c=relaxed/simple; bh=K1y0Mje8m3N8dndehLVLcK715auTxacs2f4JEK1wA7w=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=iX+yrnYjJ1IbOmRoyQsl64twasXPrcUrVlZmIYfHJXCNtxgtagqkqIVH4QlZ6ViF8asnS2RI9BUXvzXtIbdPzc1H8Uoo4wih1NgMT1gzlVAZ44Skx++04WGx/rR5aj73CEt61D/zkKD25Ps85jjuEN5mOna/4vfOXDZBBj0AnYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=4XGYN5eE; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="4XGYN5eE" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e2146737f2so10238127b3.1 for ; Tue, 24 Sep 2024 09:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193899; x=1727798699; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=13Dc2kNxgsJ010+fs+f/kwyOUj5isZdPOF/Qd6jwZKU=; b=4XGYN5eEThvyWpBfuBzTOSZ9YFK4Dl4jn1VGoVMy9z9ADAiIltLkbT8NqcU69xWzFk pD7vK2xeWk6KIs0yqzUr/JvTUJkueuXVbarmKvdj6aO1SrmQINVX9hYy81mB5GB3j9g1 1rauXEivFo76nYQQl1mB8GelDhtverQlkv3+pI8r87ExWYq18pVuc2L2ZkZC54TCBwmm h6xn2KkJfBozJ9UU7Ohe2VTiYZBjJ/X55mhRprnMzT0Fp4Sp/qCtmzFqy5EE849W4TS3 SR4H2MabH/RfJBNxzJqINhGyI5f9iRbbsuqpKRMPHaFuH5imDwC1xVfgluapgLNrgbr+ DAXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193899; x=1727798699; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=13Dc2kNxgsJ010+fs+f/kwyOUj5isZdPOF/Qd6jwZKU=; b=DxPnDWh4SaOIHBaJIy3Ls9ecEI2mKnel5b2I/m8sg7BbibuY3qTd6ALB00Io3iRGhX szmDclHJEEKyCLcGV2rKHXkGmyRFKXnsqHYj81pN7utP1enW2gDH5QZQOSptmSnVp2fQ kHFKmVJrsRhDRVFEPoIklFKYGStO++cVSGIF7+d9tQ6eal9VRhUWgC+wQPCEyxJ7hfqd NxLcFLT9YWiPQ+Sep6bRTC42olycb8D3/FPsQWMGnMZ67YtudwH/1TZ1Bl1c+3h3so6p /IH3OPz9XbOLharUbO8wLt2zlfiVdnV++nLFyMfH8lPPfIAAZWeWwwzcHs6M5YwSfqrI ycqw== X-Forwarded-Encrypted: i=1; AJvYcCXlsvrz2Is9t8+7Vyt76QPcOuuT+h9YxtuXndrQ1N1xRELs2VQ38gb4kSGHWJ9Ewkv1SsHvq2GGBbzT+hk=@vger.kernel.org X-Gm-Message-State: AOJu0Yymn5fUBA4Ldt30a4oA7SXXTebw4QrZi1e1hhCgJ6oEPCiCMgz1 TXaD1ysJI3F6O5bvab62+9L8taajbvxs6HBs34JPRDHFui1i5ycl52kl2wj69XGBhartJU25F/L Mj7LJxQ== X-Google-Smtp-Source: AGHT+IFC/V2dI9Q8GDIisaM4xJaSH419Ve6aOH/o6dp1dUD7HUUpOn9kWS+/jRg4GXNEjosZl5fBgGRmSB5d X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a81:8603:0:b0:6b0:57ec:c5f9 with SMTP id 00721157ae682-6dfeea02193mr1014227b3.0.1727193899303; Tue, 24 Sep 2024 09:04:59 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:14 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-8-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 07/11] perf probe: Move elfutils support check to libdw check From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The test _ELFUTILS_PREREQ(0, 142) is false for elfutils before 2009-06-13, but that is 15 years ago and very unlikely. Add a test to test-libdw.c and assume the libdw version is at least 0.142 to simplify the build logic. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/build/feature/test-libdw.c | 10 +++++++++- tools/perf/util/probe-finder.c | 2 -- tools/perf/util/probe-finder.h | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 71c6f8e3b0ee..2fb59479ab77 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -41,8 +41,16 @@ int test_libdw_getcfi(void) return dwarf_getcfi(dwarf) =3D=3D NULL; } =20 +int test_elfutils(void) +{ + Dwarf_CFI *cfi =3D NULL; + + dwarf_cfi_end(cfi); + return 0; +} + int main(void) { return test_libdw() + test_libdw_unwind() + test_libdw_getlocations() + - test_libdw_getcfi(); + test_libdw_getcfi() + test_elfutils(); } diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 78f34fa0c391..7434b38596b9 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -1379,10 +1379,8 @@ int debuginfo__find_trace_events(struct debuginfo *d= bg, if (ret >=3D 0 && tf.pf.skip_empty_arg) ret =3D fill_empty_trace_arg(pev, tf.tevs, tf.ntevs); =20 -#if _ELFUTILS_PREREQ(0, 142) dwarf_cfi_end(tf.pf.cfi_eh); dwarf_cfi_end(tf.pf.cfi_dbg); -#endif =20 if (ret < 0 || tf.ntevs =3D=3D 0) { for (i =3D 0; i < tf.ntevs; i++) diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 3add5ff516e1..f0149d72310c 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h @@ -63,12 +63,10 @@ struct probe_finder { struct intlist *lcache; /* Line cache for lazy match */ =20 /* For variable searching */ -#if _ELFUTILS_PREREQ(0, 142) /* Call Frame Information from .eh_frame */ Dwarf_CFI *cfi_eh; /* Call Frame Information from .debug_frame */ Dwarf_CFI *cfi_dbg; -#endif Dwarf_Op *fb_ops; /* Frame base attribute */ unsigned int machine; /* Target machine arch */ struct perf_probe_arg *pvar; /* Current target variable */ --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CD4E1ACDF9 for ; Tue, 24 Sep 2024 16:05:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193905; cv=none; b=sO1+IOWRlB4zityHyOcoxxIhPlzjJz1++Zo2XIuxldaCI3uMn5rUUbZKli94imjZs/955kiQbBWFRGKw5NewhBmfMn5Q1HrGYSknA18BK41urtG/DCM2pG6pJnEQBrbdViBBx2DtwhpnHCTYdLTqXLw7AXu9cRhMdd0jBztg7RQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193905; c=relaxed/simple; bh=qfUmU5IPdNn5x1J9BUsLpX16sUAVrH6InykTvYOOEXU=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=u8kdHqRb9Mssv+ZJpWehD7K5gdHKxg77EcGn3WB1DRmrQsg9eqS7MF6pP7BiA2hNbvvWGhBEN5vfC4ZmTm4ts4O6Iz0wifDcKZdcsKBqsZ1+f97tn+HM+D9CJnTKFkfgoWqsUZoTDMFmiMX/dxaxfPMtLszYVQoypHZYozsizcM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AdLbtznz; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AdLbtznz" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6d3e062dbeeso216007b3.0 for ; Tue, 24 Sep 2024 09:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193902; x=1727798702; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Ml+3WQr7BKPbaQN1lshaRre+L540nby+DWGQ2gTmC3U=; b=AdLbtznzQkX18ip+Wj92o5TsqoidKx8NKjjk0uxvOSoZrS09C3BJ53Ia37mAngvsiB oPR2M3FkybHd4CESitZuLYGk/dzXOxBfW6B3vGaPbbW+ZZoAtAqbTiKYYV/UsZXXOn2a UQgSccIMdyrSwyfPd2lUg9nPH9EXxKwcqBukPHwYqXDXHfmpfzzPcvyiWGJm1d+At35C xppRrxBSXO4m4xSQN+t16uxvdsBCjAaqP7gnnsLOuYXyF/odObjWIrnbPWDypKOdwMws JZkB5BibPWcvu7OzJd/ttcM2ml9LkkVDA+HT5I0z3Z4SzPeyJtkSnDExk1lhxqpYccdS 2WuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193902; x=1727798702; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ml+3WQr7BKPbaQN1lshaRre+L540nby+DWGQ2gTmC3U=; b=fm4W9RUgfHmRisr7BaTh+c2t5jfzioe4mCt5hCkbyUcyShLtbzrMeqTP7gFhKil7Oz yh9FuLHe86e2gk3CeuPUfOvpK95ISXfV1pou7x30+h6y51zeZnpgBwEKTmupj0xeAIiZ knQHD02df7v4pHQZBSC8SQRxWMb0tRQ2MjzcA9vgg8vlZpt6aggYl3a0P5nv/kUeOZ2x k9aCLFScaqx6CDFP48yFR5cVZBE7OzUjiy+7NtcNDvvN10oWHBBx7yHLXZvgXF+ITO8m NuUryAEXRTfz4pvtmKC8rapXVJc2LXll225CcGh4Y6T4nGSFdXcVGMevBkRYHaS1KU8l CJ6A== X-Forwarded-Encrypted: i=1; AJvYcCWQsh/NjPjKugffJHS0/FpLBYKNrf63wWym3pPdYJ2UGO/S7LdMx1PstY1uYQNq8YxtDgJuQXFdDkdvlN0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywfur7xqjvkke0btmk3v9Itk3VfSvWmCNQH7TCAe8TKXxVuxqhe fIv4f2inXnt3awFeevxLrmtU3MGlAALOXVN4gHwKOnlhCjZ3IpMvTxwpFf/NKPrgoELhSfhxF+F Z9qxGcQ== X-Google-Smtp-Source: AGHT+IEe9B1OQkne7xCk8DGhm2mrb3Vo8p+rzBDKMxPB6WY62DtPht4AHjRJ05DOcWqdooPzywfKFvkii8V4 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a81:c105:0:b0:6d3:e7e6:8462 with SMTP id 00721157ae682-6e2084c1e25mr840357b3.1.1727193901900; Tue, 24 Sep 2024 09:05:01 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:15 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-9-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 08/11] perf libdw: Remove unnecessary defines From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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: Ian Rogers Reviewed-by: Masami Hiramatsu (Google) Tested-by: Leo Yan --- tools/perf/Documentation/perf-check.txt | 2 +- tools/perf/Makefile.config | 3 -- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-check.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/util/dwarf-aux.c | 6 --- tools/perf/util/dwarf-aux.h | 54 ------------------------- tools/perf/util/probe-finder.c | 4 -- 8 files changed, 4 insertions(+), 71 deletions(-) diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documenta= tion/perf-check.txt index 10f69fb6850b..45101a8e4154 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -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 diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 9da0dc001d98..db79b25ada6f 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -463,9 +463,6 @@ else $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.157, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 endif - else - CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 3dc6197ef3fa..04af13eb4a4c 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -840,7 +840,7 @@ int cmd_annotate(int argc, const char **argv) } #endif =20 -#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 supp= ort\n"); return -ENOTSUP; diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 0b76b6e42b78..18c0a815243b 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -28,7 +28,7 @@ struct feature_status supported_features[] =3D { 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), diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 5dc17ffee27a..426cbc9110d1 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -1701,7 +1701,7 @@ int cmd_report(int argc, const char **argv) report.data_type =3D true; annotate_opts.annotate_src =3D false; =20 -#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT +#ifndef HAVE_DWARF_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); goto error; #endif diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index 92eb9c8dc3e5..559c953ca172 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c @@ -1182,7 +1182,6 @@ int die_get_varname(Dwarf_Die *vr_die, struct strbuf = *buf) return ret < 0 ? ret : strbuf_addf(buf, "\t%s", dwarf_diename(vr_die)); } =20 -#if defined(HAVE_DWARF_GETLOCATIONS_SUPPORT) || defined(HAVE_DWARF_CFI_SUP= PORT) static int reg_from_dwarf_op(Dwarf_Op *op) { switch (op->atom) { @@ -1245,9 +1244,7 @@ static bool check_allowed_ops(Dwarf_Op *ops, size_t n= ops) } return true; } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT || HAVE_DWARF_CFI_SUPPORT */ =20 -#ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT /** * die_get_var_innermost_scope - Get innermost scope range of given variab= le DIE * @sp_die: a subprogram DIE @@ -1697,9 +1694,7 @@ void die_collect_global_vars(Dwarf_Die *cu_die, struc= t die_var_type **var_types) =20 die_find_child(cu_die, __die_collect_global_vars_cb, (void *)var_types, &= die_mem); } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ =20 -#ifdef HAVE_DWARF_CFI_SUPPORT /** * die_get_cfa - Get frame base information * @dwarf: a Dwarf info @@ -1732,7 +1727,6 @@ int die_get_cfa(Dwarf *dwarf, u64 pc, int *preg, int = *poffset) } return -1; } -#endif /* HAVE_DWARF_CFI_SUPPORT */ =20 /* * die_has_loclist - Check if DW_AT_location of @vr_die is a location list diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h index 925a9bb9fb15..892c8c5c23fc 100644 --- a/tools/perf/util/dwarf-aux.h +++ b/tools/perf/util/dwarf-aux.h @@ -156,8 +156,6 @@ Dwarf_Die *die_get_member_type(Dwarf_Die *type_die, int= offset, Dwarf_Die *die_m /* Return type info where the pointer and offset point to */ Dwarf_Die *die_deref_ptr_type(Dwarf_Die *ptr_die, int offset, Dwarf_Die *d= ie_mem); =20 -#ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT - /* Get byte offset range of given variable DIE */ int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf = *buf); =20 @@ -176,59 +174,7 @@ void die_collect_vars(Dwarf_Die *sc_die, struct die_va= r_type **var_types); /* Save all global variables in this CU */ void die_collect_global_vars(Dwarf_Die *cu_die, struct die_var_type **var_= types); =20 -#else /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ -#include - -static inline int die_get_var_range(Dwarf_Die *sp_die __maybe_unused, - Dwarf_Die *vr_die __maybe_unused, - struct strbuf *buf __maybe_unused) -{ - return -ENOTSUP; -} - -static inline Dwarf_Die *die_find_variable_by_reg(Dwarf_Die *sc_die __mayb= e_unused, - Dwarf_Addr pc __maybe_unused, - int reg __maybe_unused, - int *poffset __maybe_unused, - bool is_fbreg __maybe_unused, - Dwarf_Die *die_mem __maybe_unused) -{ - return NULL; -} - -static inline Dwarf_Die *die_find_variable_by_addr(Dwarf_Die *sc_die __may= be_unused, - Dwarf_Addr addr __maybe_unused, - Dwarf_Die *die_mem __maybe_unused, - int *offset __maybe_unused) -{ - return NULL; -} - -static inline void die_collect_vars(Dwarf_Die *sc_die __maybe_unused, - struct die_var_type **var_types __maybe_unused) -{ -} - -static inline void die_collect_global_vars(Dwarf_Die *cu_die __maybe_unuse= d, - struct die_var_type **var_types __maybe_unused) -{ -} - -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ - -#ifdef HAVE_DWARF_CFI_SUPPORT - /* Get the frame base information from CFA */ int die_get_cfa(Dwarf *dwarf, u64 pc, int *preg, int *poffset); =20 -#else /* HAVE_DWARF_CFI_SUPPORT */ - -static inline int die_get_cfa(Dwarf *dwarf __maybe_unused, u64 pc __maybe_= unused, - int *preg __maybe_unused, int *poffset __maybe_unused) -{ - return -1; -} - -#endif /* HAVE_DWARF_CFI_SUPPORT */ - #endif /* _DWARF_AUX_H */ diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 7434b38596b9..8019d232f515 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -602,7 +602,6 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct = probe_finder *pf) ret =3D dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1); if (ret <=3D 0 || nops =3D=3D 0) { pf->fb_ops =3D NULL; -#ifdef HAVE_DWARF_CFI_SUPPORT } else if (nops =3D=3D 1 && pf->fb_ops[0].atom =3D=3D DW_OP_call_frame_cf= a && (pf->cfi_eh !=3D NULL || pf->cfi_dbg !=3D NULL)) { if ((dwarf_cfi_addrframe(pf->cfi_eh, pf->addr, &frame) !=3D 0 && @@ -613,7 +612,6 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct = probe_finder *pf) free(frame); return -ENOENT; } -#endif /* HAVE_DWARF_CFI_SUPPORT */ } =20 /* Call finder's callback handler */ @@ -1138,7 +1136,6 @@ static int debuginfo__find_probes(struct debuginfo *d= bg, =20 pf->machine =3D ehdr.e_machine; =20 -#ifdef HAVE_DWARF_CFI_SUPPORT do { GElf_Shdr shdr; =20 @@ -1148,7 +1145,6 @@ static int debuginfo__find_probes(struct debuginfo *d= bg, =20 pf->cfi_dbg =3D dwarf_getcfi(dbg->dbg); } while (0); -#endif /* HAVE_DWARF_CFI_SUPPORT */ =20 ret =3D debuginfo__find_probe_location(dbg, pf); return ret; --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F2011ACE19 for ; Tue, 24 Sep 2024 16:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193907; cv=none; b=jNxdtOLyH9i1cWFgNo+UoMjQFnM5Ko8Lr4bRZcXUvzGlW/WS9gJ1Q7w2hTf/po+PuQbJNsy570ay174kEuOEKDQdgX2wtNCD2MIZ7dnmumx1ZQv8BnYblweSfN/GLL2tqB6jXeNhDb8YOv3CPKRQiKoXPa2tZSob5OeEl15pLOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193907; c=relaxed/simple; bh=be6Br7t7JJuChqJcHEEIyDqBMAxfgiPyKovXnXsCQzs=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=Q3lbJSGlvjS5OYvOam0M63zOkO+T+uHaRlR+7gntMoELZuAoyP/nDKtF598LeIbZb67El8GcNgMzq5QS659HnyjBBeRC8ZO2/5Jx/IEoyxNy9xufGV0nmi9PE44ClHrATRMmzD7ynwSQi2ifdwlN71gILNB0yDjOHgVkkNF6cYw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NQVIbucd; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NQVIbucd" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e0082c1dd0so69600447b3.3 for ; Tue, 24 Sep 2024 09:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193904; x=1727798704; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=HNakM6FkHNrD9rPAWwux66nydIOrUNl1zkccN2f0X5Y=; b=NQVIbucdF6cqtwKLERGfaTmFH6qZjReMoE1cu668QQheRtdU895JlS9xGtHOVDSzkI TVsmTFpRrkpGiEC6Rk6eR3WKlS+j69/vjV64ZFzdLKN81GYcAFFRGhFqp5ZEWrUuJf1f KB+3T87ExAmPCod/HIy53idsNdn6yjkNB20fQNLK/ft5xsKepjG7rTPW6QZxd4ltkVgK 4y+NpjurB7lFNW2TDuFNa0K7asIj3lAFN1/ncBAZ4V8MOpoaZmqo6Js/D81zFy6u4SWi J5g6EuDeMX17lckKdHJyrUDJoi7RpsXqVuFFlL5jlR5jOraiIlUzPJzY4xSJy1CDN/LZ 99TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193904; x=1727798704; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HNakM6FkHNrD9rPAWwux66nydIOrUNl1zkccN2f0X5Y=; b=F1n+rRYoh9bEnJDSu0F6H6DL81NbTgam3joaC6s7+aUKyzGm6wcJ5zwgtqrJlUBpPb i22ME1Pj374CQfbfZAG5kgkUtpLMUp0SRDFA5Oh/Zsm9YsgHEX497eYwisjiYQWScGbw DSOkO8ifw7Ui7AMKll5Yzluhy++B9MCa9P2MgzKN2B/cGunI+gktr9Je+cH9DnVNByZb CgcOO4Fne2J09Pwj4Lh1sBOlLvw4bZxzA2d4Nj9d5f+tmuxLRDwlCvBaiD4G6ZdMtyge fff2Vwy5C0qAp88DQW/NBm60SEmv/x1Ktnl3wwbjA/FldOoRb4HxGPn8nrnBm1r0+eVo Ketw== X-Forwarded-Encrypted: i=1; AJvYcCXy/TRRPjhd1gH5PDThB39/1H4mxCvffjLWIfiRnX8huzfEZRYbpOo/chxOlnuaK4/1EAvCBaSWEM++sWA=@vger.kernel.org X-Gm-Message-State: AOJu0YzGeFSFuHPqPMfm24U2inmdPX77bFrQdM5zNcV4Rtui4l/V0l/E EtIqu/+Iw8YRuDsJBgdHSuzrPPKer4FLlSpiiS/Z1wyz2+czmSt+MrjCqAmFsBTHCZpjcMjBG6x V1N0PEA== X-Google-Smtp-Source: AGHT+IHhOO3BdGotUcPk3DKBZCsGLzUiw3SpiRV9rEQVlWQiV4TpDQbRC7X+QN9L6yPyequ5zuPRtvnkmpzr X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a05:690c:7085:b0:6dd:d1be:ca0e with SMTP id 00721157ae682-6dfee9fe3e3mr3239397b3.0.1727193904302; Tue, 24 Sep 2024 09:05:04 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:16 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-10-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 09/11] perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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: Ian Rogers Tested-by: Leo Yan --- tools/perf/Documentation/perf-check.txt | 6 +++--- tools/perf/Makefile.config | 2 +- tools/perf/arch/powerpc/annotate/instructions.c | 4 ++-- tools/perf/arch/x86/annotate/instructions.c | 2 +- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-check.c | 6 +++--- tools/perf/builtin-probe.c | 12 ++++++------ tools/perf/builtin-report.c | 4 ++-- tools/perf/util/annotate-data.h | 8 ++++---- tools/perf/util/debuginfo.h | 6 +++--- tools/perf/util/disasm.c | 4 ++-- tools/perf/util/disasm.h | 4 ++-- tools/perf/util/genelf.c | 4 ++-- tools/perf/util/genelf.h | 2 +- tools/perf/util/include/dwarf-regs.h | 6 +++--- tools/perf/util/probe-event.c | 4 ++-- tools/perf/util/probe-finder.h | 4 ++-- 17 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documenta= tion/perf-check.txt index 45101a8e4154..31741499e786 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -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 diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index db79b25ada6f..9ed0909db170 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -556,7 +556,7 @@ ifndef NO_LIBELF $(warning DWARF register mappings have not been defined for architec= ture $(SRCARCH), DWARF support disabled) NO_LIBDW :=3D 1 else - CFLAGS +=3D -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) + CFLAGS +=3D -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} $(call detected,CONFIG_DWARF) diff --git a/tools/perf/arch/powerpc/annotate/instructions.c b/tools/perf/a= rch/powerpc/annotate/instructions.c index ede9eeade0ab..54478cf5cccc 100644 --- a/tools/perf/arch/powerpc/annotate/instructions.c +++ b/tools/perf/arch/powerpc/annotate/instructions.c @@ -255,7 +255,7 @@ static struct ins_ops *check_ppc_insn(struct disasm_lin= e *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 */ =20 static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_u= nused) { diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/= x86/annotate/instructions.c index 5caf5a17f03d..c869abe3c31d 100644 --- a/tools/perf/arch/x86/annotate/instructions.c +++ b/tools/perf/arch/x86/annotate/instructions.c @@ -207,7 +207,7 @@ static int x86__annotate_init(struct arch *arch, char *= cpuid) return err; } =20 -#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) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 04af13eb4a4c..bb87e6e7687d 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -840,7 +840,7 @@ int cmd_annotate(int argc, const char **argv) } #endif =20 -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT if (annotate.data_type) { pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); return -ENOTSUP; diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 18c0a815243b..2346536a5ee1 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -27,15 +27,15 @@ struct feature_status supported_features[] =3D { FEATURE_STATUS("bpf", HAVE_LIBBPF_SUPPORT), 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_SUPPORT), + FEATURE_STATUS("dwarf", HAVE_LIBDW_SUPPORT), + FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT), FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT), FEATURE_STATUS("libaudit", HAVE_LIBAUDIT_SUPPORT), FEATURE_STATUS("libbfd", HAVE_LIBBFD_SUPPORT), FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), FEATURE_STATUS("libcrypto", HAVE_LIBCRYPTO_SUPPORT), - FEATURE_STATUS("libdw-dwarf-unwind", HAVE_DWARF_SUPPORT), + FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT), FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT), FEATURE_STATUS("libopencsd", HAVE_CSTRACE_SUPPORT), diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 91672bb3047c..69800e4d9530 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -229,7 +229,7 @@ static int opt_set_target_ns(const struct option *opt _= _maybe_unused, =20 /* Command option callbacks */ =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT static int opt_show_lines(const struct option *opt, const char *str, int unset __maybe_unused) { @@ -505,7 +505,7 @@ static int perf_del_probe_events(struct strfilter *filt= er) return ret; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #define PROBEDEF_STR \ "[EVENT=3D]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT [[NAME=3D]ARG .= ..]" #else @@ -521,7 +521,7 @@ __cmd_probe(int argc, const char **argv) "perf probe [] --add 'PROBEDEF' [--add 'PROBEDEF' ...]", "perf probe [] --del '[GROUP:]EVENT' ...", "perf probe --list [GROUP:]EVENT ...", -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT "perf probe [] --line 'LINEDESC'", "perf probe [] --vars 'PROBEPOINT'", #endif @@ -545,7 +545,7 @@ __cmd_probe(int argc, const char **argv) "\t\tFUNC:\tFunction name\n" "\t\tOFF:\tOffset from function entry (in byte)\n" "\t\t%return:\tPut the probe at function return\n" -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT "\t\tSRC:\tSource code path\n" "\t\tRL:\tRelative line number from function entry.\n" "\t\tAL:\tAbsolute line number in file.\n" @@ -612,7 +612,7 @@ __cmd_probe(int argc, const char **argv) set_option_flag(options, 'd', "del", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'D', "definition", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'l', "list", PARSE_OPT_EXCLUSIVE); -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); #else @@ -694,7 +694,7 @@ __cmd_probe(int argc, const char **argv) if (ret < 0) pr_err_with_code(" Error: Failed to show functions.", ret); return ret; -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT case 'L': ret =3D show_line_range(¶ms->line_range, params->target, params->nsi, params->uprobes); diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 426cbc9110d1..13cc57e99d35 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -455,7 +455,7 @@ static int report__setup_sample_type(struct report *rep) if (!(evlist__combined_branch_type(session->evlist) & PERF_SAMPLE_BRANCH_= ANY)) rep->nonany_branch_mode =3D true; =20 -#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_DWARF_SUPPORT) +#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_LIBDW_SUPPORT) if (dwarf_callchain_users) { ui__warning("Please install libunwind or libdw " "development packages during the perf build.\n"); @@ -1701,7 +1701,7 @@ int cmd_report(int argc, const char **argv) report.data_type =3D true; annotate_opts.annotate_src =3D false; =20 -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); goto error; #endif diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-dat= a.h index 8ac0fd94a0ba..98c80b2268dd 100644 --- a/tools/perf/util/annotate-data.h +++ b/tools/perf/util/annotate-data.h @@ -9,7 +9,7 @@ #include "dwarf-regs.h" #include "annotate.h" =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "debuginfo.h" #endif =20 @@ -165,7 +165,7 @@ struct annotated_data_stat { }; extern struct annotated_data_stat ann_data_stat; =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT /* * Type information in a register, valid when @ok is true. * The @caller_saved registers are invalidated after a function call. @@ -244,7 +244,7 @@ bool get_global_var_info(struct data_loc_info *dloc, u6= 4 addr, const char **var_name, int *var_offset); void pr_debug_type_name(Dwarf_Die *die, enum type_state_kind kind); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 static inline struct annotated_data_type * find_data_type(struct data_loc_info *dloc __maybe_unused) @@ -276,7 +276,7 @@ static inline int hist_entry__annotate_data_tty(struct = hist_entry *he __maybe_un return -1; } =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #ifdef HAVE_SLANG_SUPPORT int hist_entry__annotate_data_tui(struct hist_entry *he, struct evsel *evs= el, diff --git a/tools/perf/util/debuginfo.h b/tools/perf/util/debuginfo.h index ad6422c3f8ca..a52d69932815 100644 --- a/tools/perf/util/debuginfo.h +++ b/tools/perf/util/debuginfo.h @@ -5,7 +5,7 @@ #include #include =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 #include "dwarf-aux.h" =20 @@ -25,7 +25,7 @@ void debuginfo__delete(struct debuginfo *dbg); int debuginfo__get_text_offset(struct debuginfo *dbg, Dwarf_Addr *offs, bool adjust_offset); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 /* dummy debug information structure */ struct debuginfo { @@ -49,7 +49,7 @@ static inline int debuginfo__get_text_offset(struct debug= info *dbg __maybe_unuse return -EINVAL; } =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #ifdef HAVE_DEBUGINFOD_SUPPORT int get_source_from_debuginfod(const char *raw_path, const char *sbuild_id, diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 2c8063660f2e..aef06a36bf40 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -151,14 +151,14 @@ static struct arch architectures[] =3D { .memory_ref_char =3D '(', .imm_char =3D '$', }, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state =3D update_insn_state_x86, #endif }, { .name =3D "powerpc", .init =3D powerpc__annotate_init, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state =3D update_insn_state_powerpc, #endif }, diff --git a/tools/perf/util/disasm.h b/tools/perf/util/disasm.h index f56beedeb9da..486c269b29ba 100644 --- a/tools/perf/util/disasm.h +++ b/tools/perf/util/disasm.h @@ -4,7 +4,7 @@ =20 #include "map_symbol.h" =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "dwarf-aux.h" #endif =20 @@ -39,7 +39,7 @@ struct arch { char memory_ref_char; char imm_char; } objdump; -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT void (*update_insn_state)(struct type_state *state, struct data_loc_info *dloc, Dwarf_Die *cu_die, struct disasm_line *dl); diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c index c8f6bee1fa61..cdce7f173d00 100644 --- a/tools/perf/util/genelf.c +++ b/tools/perf/util/genelf.c @@ -16,7 +16,7 @@ #include #include #include -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include #endif =20 @@ -499,7 +499,7 @@ jit_write_elf(int fd, uint64_t load_addr, const char *s= ym, shdr->sh_size =3D sizeof(bnote); shdr->sh_entsize =3D 0; =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT if (debug && nr_debug_entries) { retval =3D jit_add_debug_info(e, load_addr, debug, nr_debug_entries); if (retval) diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h index 4e2e4f40e134..9f0b875d6548 100644 --- a/tools/perf/util/genelf.h +++ b/tools/perf/util/genelf.h @@ -8,7 +8,7 @@ int jit_write_elf(int fd, uint64_t code_addr, const char *sym, const void *code, int csize, void *debug, int nr_debug_entries, void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_si= ze); -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT /* genelf_debug.c */ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_deb= ug_entries); #endif diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include= /dwarf-regs.h index 75b28dcc8317..29a7d0546b82 100644 --- a/tools/perf/util/include/dwarf-regs.h +++ b/tools/perf/util/include/dwarf-regs.h @@ -6,7 +6,7 @@ #define DWARF_REG_PC 0xd3af9c /* random number */ #define DWARF_REG_FB 0xd3affb /* random number */ =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT const char *get_arch_regstr(unsigned int n); /* * get_dwarf_regstr - Returns ftrace register string from DWARF regnum @@ -23,7 +23,7 @@ int get_arch_regnum(const char *name); */ int get_dwarf_regnum(const char *name, unsigned int machine); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 static inline int get_dwarf_regnum(const char *name __maybe_unused, unsigned int machine __maybe_unused) @@ -32,7 +32,7 @@ static inline int get_dwarf_regnum(const char *name __may= be_unused, } #endif =20 -#if !defined(__powerpc__) || !defined(HAVE_DWARF_SUPPORT) +#if !defined(__powerpc__) || !defined(HAVE_LIBDW_SUPPORT) static inline void get_powerpc_regs(u32 raw_insn __maybe_unused, int is_so= urce __maybe_unused, struct annotated_op_loc *op_loc __maybe_unused) { diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index a17c9b8a7a79..fd94614a4022 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -342,7 +342,7 @@ static char *find_module_name(const char *module) return mod_name; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 static int kernel_get_module_dso(const char *module, struct dso **pdso) { @@ -1250,7 +1250,7 @@ int show_available_vars(struct perf_probe_event *pevs= , int npevs, return ret; } =20 -#else /* !HAVE_DWARF_SUPPORT */ +#else /* !HAVE_LIBDW_SUPPORT */ =20 static void debuginfo_cache__exit(void) { diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index f0149d72310c..b9a5afca4cc1 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h @@ -21,7 +21,7 @@ static inline int is_c_varname(const char *name) return isalpha(name[0]) || name[0] =3D=3D '_'; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 #include "dwarf-aux.h" #include "debuginfo.h" @@ -102,6 +102,6 @@ struct line_finder { int found; }; =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #endif /*_PROBE_FINDER_H */ --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ABC81AD3F2 for ; Tue, 24 Sep 2024 16:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193910; cv=none; b=XHkc+/imVCSzzWkk7V0MckHX8IDfn+mEqQvnZFG2Dr8Q2tVkS6TiJ4KpKg4FWJ5Qcwizaipm2jHKqQzIie/5FOA8rFFwjG2+mH36SaZlkutE2tkDBOSkWUgAGcDspHM0vMEgrQeu5z9LFlp0m8sDc237reWXTYErV8TdlufgGK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193910; c=relaxed/simple; bh=yR3S/QpjquObBe7JFP5pEHpgsdRsAxAPtK1ohMcO5pM=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=PrzsN7l1jIUJvETA5rLeiEnLtLgDp40q27d0AXVFiPZ5QjIn4jX5zuZ1BdqEYwXpLu8ADhRNesmIfzZBwF+ZuqVGmJtgIG8XqTHMCFysbaBkAqX3JJNtDs+R0KGKiKRsXQC4aXC7zv1z5XTXM6IYhryd5Mmw98fPZChC33Uostw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AFmGTMH4; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AFmGTMH4" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e163641feb9so32184276.0 for ; Tue, 24 Sep 2024 09:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193907; x=1727798707; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=wghZHiK6xOuwsFpy1Cr3uM6o408gcIshRLTrqEU1l1A=; b=AFmGTMH4h/kf+jDbZaPCHIdcTfoauWzK4wxP2rcg1FJkscCOvgECI3h1dcz79g5vE1 i62wg9Msn0WuF+0wv3r/0tEXhFWGZxJAScqMm+QN2nHVkpZN+ea0Wb5HM3zr7oIQPp/U A0YOAWhWJI0DM8zOENUQ4xCoNZVgBQ90ghkPMfBnRZ1uw2PYjRsApoLoLvzRmXgt65VS 0q/RTKgmwh45qw3lHn5kER8NzBqERr5Zni5qylgoSOmzebBC8qtzUCJp/u8FaP/KE/Wf FB37hVo61YKoWKjNQOyIRqvUiHQQR9piugbNDQH4z+vsGldGuItQZ91dQd9tTP9QCE6K SsBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193907; x=1727798707; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wghZHiK6xOuwsFpy1Cr3uM6o408gcIshRLTrqEU1l1A=; b=RW2ewzbEmXBsmJrXVDsfiIGG5dUF89IR8S5PGMNs4jp8V119K/wRQUsykVpVCtHGjU zzxCG9oNSKVSYAn/2+Xapgfd38A4mep3UMrWPk47YBiBIWWVTvzuzY1qAKlbBplMiquk TbELktPie2Xhsfk5720CuvOVbbwYoNFqbH2AzwD7QElMGq/Ig9VMq2COZquL7NhN6Chy sIZMXPw1V9LP6Yi7iLK+/Pil2UoKkMS5Jlg5C2tXbKZqkRm3wNuCcqHXkMfFOfPgLwDD qn9+yLKYnHLfFU8cwm0zd7M/MEwDNPrlhyZVJ6HIVYKJGe8lx0wgS2dxKjr5nHl9e7h8 IIIA== X-Forwarded-Encrypted: i=1; AJvYcCWvLFxZEUJwMCHyiKTq0IOQ+ysJoCfq+A4Swi04JN73LdLjp5oUa4uFjwIR6B9pd6gZ7hx9IVE9BfRZg+8=@vger.kernel.org X-Gm-Message-State: AOJu0YyVSak/eQLpdKoXVGaPaCI80sdjo6Jcmz/r8CxKuREcekuutI6K s1w0PteV6SMeg8gfLMChzzkhtdTaBJA7Bi5TXI8yxg19/OjUj2QFhg3UmfS/4q3CCz+hz50j7F0 pD8xDew== X-Google-Smtp-Source: AGHT+IHK7CWmw4K4/CFOVeEQBpTQhVH3F5ZQ+PWdG+TbKzCE3GwA+6c3+rdZhZyxVVfJZ/FHS/aE7lmcBSID X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a25:dc8c:0:b0:e0b:b36e:d73d with SMTP id 3f1490d57ef6-e24979369b9mr22619276.4.1727193907464; Tue, 24 Sep 2024 09:05:07 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:17 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-11-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 10/11] perf build: Rename CONFIG_DWARF to CONFIG_LIBDW From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In Makefile.config for unwinding the name dwarf implies either libunwind or libdw. Make it clearer that CONFIG_DWARF is really just defined when libdw is present by renaming to CONFIG_LIBDW. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/perf/Makefile.config | 2 +- tools/perf/arch/arm/util/Build | 2 +- tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/csky/util/Build | 2 +- tools/perf/arch/loongarch/util/Build | 2 +- tools/perf/arch/mips/util/Build | 2 +- tools/perf/arch/powerpc/util/Build | 4 ++-- tools/perf/arch/riscv/util/Build | 2 +- tools/perf/arch/s390/util/Build | 2 +- tools/perf/arch/sh/util/Build | 2 +- tools/perf/arch/sparc/util/Build | 2 +- tools/perf/arch/x86/util/Build | 2 +- tools/perf/arch/xtensa/util/Build | 2 +- tools/perf/util/Build | 12 ++++++------ 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 9ed0909db170..b14430ab2898 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -559,7 +559,7 @@ ifndef NO_LIBELF CFLAGS +=3D -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} - $(call detected,CONFIG_DWARF) + $(call detected,CONFIG_LIBDW) endif # PERF_HAVE_DWARF_REGS endif # NO_LIBDW =20 diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build index e6dd7cd79ebd..e06fea1ea8ff 100644 --- a/tools/perf/arch/arm/util/Build +++ b/tools/perf/arch/arm/util/Build @@ -1,6 +1,6 @@ perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o =20 perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/= Build index 343ef7589a77..4387a6d6a6c3 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build @@ -4,7 +4,7 @@ perf-util-y +=3D perf_regs.o perf-util-y +=3D tsc.o perf-util-y +=3D pmu.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 diff --git a/tools/perf/arch/csky/util/Build b/tools/perf/arch/csky/util/Bu= ild index 99d83f41bf43..1325310cab6a 100644 --- a/tools/perf/arch/csky/util/Build +++ b/tools/perf/arch/csky/util/Build @@ -1,4 +1,4 @@ perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/loongarch/util/Build b/tools/perf/arch/loongar= ch/util/Build index b6b97de48233..06ff95394921 100644 --- a/tools/perf/arch/loongarch/util/Build +++ b/tools/perf/arch/loongarch/util/Build @@ -1,7 +1,7 @@ perf-util-y +=3D header.o perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o diff --git a/tools/perf/arch/mips/util/Build b/tools/perf/arch/mips/util/Bu= ild index e4644f1e68a0..b328109fc16c 100644 --- a/tools/perf/arch/mips/util/Build +++ b/tools/perf/arch/mips/util/Build @@ -1,3 +1,3 @@ perf-util-y +=3D perf_regs.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/u= til/Build index 6c588ecdf3bd..3d979480a188 100644 --- a/tools/perf/arch/powerpc/util/Build +++ b/tools/perf/arch/powerpc/util/Build @@ -7,8 +7,8 @@ perf-util-y +=3D sym-handling.o perf-util-y +=3D evsel.o perf-util-y +=3D event.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o -perf-util-$(CONFIG_DWARF) +=3D skip-callchain-idx.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D skip-callchain-idx.o =20 perf-util-$(CONFIG_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/riscv/util/Build b/tools/perf/arch/riscv/util/= Build index f865cb0489ec..8f93091b8345 100644 --- a/tools/perf/arch/riscv/util/Build +++ b/tools/perf/arch/riscv/util/Build @@ -2,5 +2,5 @@ perf-util-y +=3D perf_regs.o perf-util-y +=3D header.o =20 perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Bu= ild index 1ac830030ff3..787410f99bb3 100644 --- a/tools/perf/arch/s390/util/Build +++ b/tools/perf/arch/s390/util/Build @@ -2,7 +2,7 @@ perf-util-y +=3D header.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 perf-util-y +=3D machine.o diff --git a/tools/perf/arch/sh/util/Build b/tools/perf/arch/sh/util/Build index 32f44fc4ab98..2337a0b710a2 100644 --- a/tools/perf/arch/sh/util/Build +++ b/tools/perf/arch/sh/util/Build @@ -1 +1 @@ -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/arch/sparc/util/Build b/tools/perf/arch/sparc/util/= Build index 32f44fc4ab98..2337a0b710a2 100644 --- a/tools/perf/arch/sparc/util/Build +++ b/tools/perf/arch/sparc/util/Build @@ -1 +1 @@ -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 2607ed5c4296..9705cda4f240 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build @@ -12,7 +12,7 @@ perf-util-y +=3D evsel.o perf-util-y +=3D iostat.o perf-util-y +=3D env.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_BPF_PROLOGUE) +=3D dwarf-regs.o =20 perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o diff --git a/tools/perf/arch/xtensa/util/Build b/tools/perf/arch/xtensa/uti= l/Build index e813e618954b..2d1a48696ad9 100644 --- a/tools/perf/arch/xtensa/util/Build +++ b/tools/perf/arch/xtensa/util/Build @@ -1 +1 @@ -perf-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/util/Build b/tools/perf/util/Build index dc616292b2dd..1d08608b7e1b 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -199,11 +199,11 @@ ifndef CONFIG_SETNS perf-util-y +=3D setns.o endif =20 -perf-util-$(CONFIG_DWARF) +=3D probe-finder.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-aux.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o -perf-util-$(CONFIG_DWARF) +=3D debuginfo.o -perf-util-$(CONFIG_DWARF) +=3D annotate-data.o +perf-util-$(CONFIG_LIBDW) +=3D probe-finder.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-aux.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D debuginfo.o +perf-util-$(CONFIG_LIBDW) +=3D annotate-data.o =20 perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind-local.o @@ -234,7 +234,7 @@ perf-util-$(CONFIG_LIBLLVM) +=3D llvm-c-helpers.o ifdef CONFIG_JITDUMP perf-util-$(CONFIG_LIBELF) +=3D jitdump.o perf-util-$(CONFIG_LIBELF) +=3D genelf.o -perf-util-$(CONFIG_DWARF) +=3D genelf_debug.o +perf-util-$(CONFIG_LIBDW) +=3D genelf_debug.o endif =20 perf-util-y +=3D perf-hooks.o --=20 2.46.0.792.g87dc391469-goog From nobody Fri Nov 29 04:29:50 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E37DB1AD40B for ; Tue, 24 Sep 2024 16:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193912; cv=none; b=M5WTxkmAall41Y0pP37igPBpOWk/n8jk6GYGxXYb85xROX4BBPF8119njoEiBkViUecPJhAWBP6J6Dc1x2lmM+yLwxuycIIgDOmCLLX7gVLY1enwoIig6TjcDgwteqNL8i23Gk5/eZmNHbzLgyN8At2sIkn2Ripcq24L1/TreE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727193912; c=relaxed/simple; bh=lSqkj/40NVRa02AhEWAVQazltw1LzWSoAiy67w/c2jA=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=t8DHJ5/qB+jb+YNvgbhydA73hT3QdGgwZLN0Y8wlOAp0ijR1NrGlR+sk7pGLiyXx73Moq7mBSsjg0ax2MiQaiwHxp143xKtkARZL2/iSFnvnDPqn4/zmJvfAVZYUt0JyzHJ0C3hR5OYmDv8vA7Uu40pQeS+L+3QxXoZbaqYN6jI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=u0bRjuco; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="u0bRjuco" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e1fbe2a6b1so36409377b3.2 for ; Tue, 24 Sep 2024 09:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727193910; x=1727798710; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=+mrzvyO3a3OSC4Wwsy52IiF981940PgOYxjk5hjhaV8=; b=u0bRjucoLCvJcEXu1EoyoCVbkgK8rQMiwNzvPceyckTfmB+Tw2VQqz1ezQosI4DVCY hZPkDDB5e3MIBHsES+p3sTMUIhtqX62npRaOK01EriwYrofNjl5KsQRMy2BQcZhX0mQ6 tHv/EAAAhLNp+RBXqZ+WMQlPsQeOijU2kkqodmopB9Pk6lK2Fot42/Gc+hLTVDeIcxmG mUk8ylufIGja3WyZRv01aQdG63oPprFpD9OMZhBnDXBkS2s4izboBVAHnPAXejxpAFip A7c8ntg1ro1Jmy0iyp56Vyi295FbHcINNLogVzl3aWA4deGwun31Eovd76NLsk/eni8w ajvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727193910; x=1727798710; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+mrzvyO3a3OSC4Wwsy52IiF981940PgOYxjk5hjhaV8=; b=uG/rX/KCsOOyoWQlrlZTP0vDX7tPXHuGTJLfpsh5O1Li4ZdB6uxenFfdV1dAKvIHyF ylqtEqRtl+c/n4Xr1il1odOCfykqk/LL82qFXwUnHIgvyRQqGd3Dd7SaEIyJM2xw+oDV B/KccYM84Ur5ZqCssqbXVqS3/9qmHn/BukCpsQESL2meTxiT41faDf0tFHjvA+S2Oa5c gW9uqTKBYMboJFffQTtW6quk4EbRcmtxFOSgDXS/t7Ttwx0MhLLDDK9UbSAMrsPd3asM eYm+jVWkLLAXZSe3NbmYpLpZR4CXjjpZZl1KLGEuVywtj8jolgp9OxOJ5fiCux3JM+J6 JySw== X-Forwarded-Encrypted: i=1; AJvYcCUh9nzrRLx0gVlI9yDHYGLYcLjQdK3h0wA0G5+bxwP2eJPLqJTzSx1vLinAY2R2Qe/Mgk4fb2Wky6DdwdE=@vger.kernel.org X-Gm-Message-State: AOJu0YyfqtzImkxZO3Yg1c/RwSnYKZdmfworRPMuV3ZqBVKd3kpPc1sj OeQf1cPcFZzga4DRo04Usc3l+qfCeii5IUJxpR4NfDBpF4a0zxjAZyAjMHWrUmVogBhnkNkKD0H JwHZkdw== X-Google-Smtp-Source: AGHT+IHzudw4yuY6TVn3wkxP1TTkeRMZzkKGg3vBtDWeJ6Dx9OTkmU3CMNLrYRuGIpcBhRHcaPQxdK7MSPqw X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:61a6:b27c:a1cd:e6a0]) (user=irogers job=sendgmr) by 2002:a05:690c:2003:b0:64b:5cc7:bcb7 with SMTP id 00721157ae682-6dff270d4e8mr713347b3.1.1727193909918; Tue, 24 Sep 2024 09:05:09 -0700 (PDT) Date: Tue, 24 Sep 2024 09:04:18 -0700 In-Reply-To: <20240924160418.1391100-1-irogers@google.com> Message-Id: <20240924160418.1391100-12-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240924160418.1391100-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Subject: [PATCH v1 11/11] perf build: Rename PERF_HAVE_DWARF_REGS to PERF_HAVE_LIBDW_REGS From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , Guilherme Amadio , Changbin Du , "Steinar H. Gunderson" , "Masami Hiramatsu (Google)" , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Huacai Chen , Bibo Mao , Kajol Jain , Anup Patel , Shenlin Liang , Atish Patra , Oliver Upton , Chen Pei , Dima Kogan , Alexander Lobakin , "David S. Miller" , Przemek Kitszel , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Yang Jihong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The name dwarf can imply libunwind support, whereas PERF_HAVE_DWARF_REGS is only enabled with libdw support. Rename to make it clearer there is a libdw connection. Signed-off-by: Ian Rogers Tested-by: Leo Yan --- tools/perf/Makefile.config | 4 ++-- tools/perf/arch/arm/Makefile | 2 +- tools/perf/arch/arm64/Makefile | 2 +- tools/perf/arch/csky/Makefile | 2 +- tools/perf/arch/loongarch/Makefile | 2 +- tools/perf/arch/mips/Makefile | 2 +- tools/perf/arch/powerpc/Makefile | 2 +- tools/perf/arch/riscv/Makefile | 2 +- tools/perf/arch/s390/Makefile | 2 +- tools/perf/arch/sh/Makefile | 2 +- tools/perf/arch/sparc/Makefile | 2 +- tools/perf/arch/x86/Makefile | 2 +- tools/perf/arch/xtensa/Makefile | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index b14430ab2898..ea9b2b315064 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -552,7 +552,7 @@ ifndef NO_LIBELF endif =20 ifndef NO_LIBDW - ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) + ifeq ($(origin PERF_HAVE_LIBDW_REGS), undefined) $(warning DWARF register mappings have not been defined for architec= ture $(SRCARCH), DWARF support disabled) NO_LIBDW :=3D 1 else @@ -560,7 +560,7 @@ ifndef NO_LIBELF LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} $(call detected,CONFIG_LIBDW) - endif # PERF_HAVE_DWARF_REGS + endif # PERF_HAVE_LIBDW_REGS endif # NO_LIBDW =20 ifndef NO_LIBBPF diff --git a/tools/perf/arch/arm/Makefile b/tools/perf/arch/arm/Makefile index 9b164d379548..5c712fa2347b 100644 --- a/tools/perf/arch/arm/Makefile +++ b/tools/perf/arch/arm/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile index 8a5ffbfe809f..66456aef91bc 100644 --- a/tools/perf/arch/arm64/Makefile +++ b/tools/perf/arch/arm64/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/csky/Makefile b/tools/perf/arch/csky/Makefile index 119b06a64bed..f9e270940919 100644 --- a/tools/perf/arch/csky/Makefile +++ b/tools/perf/arch/csky/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif diff --git a/tools/perf/arch/loongarch/Makefile b/tools/perf/arch/loongarch= /Makefile index 1cc5eb01f32b..fb0c55bf59f8 100644 --- a/tools/perf/arch/loongarch/Makefile +++ b/tools/perf/arch/loongarch/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/mips/Makefile b/tools/perf/arch/mips/Makefile index 733f7b76f52d..5892bc310127 100644 --- a/tools/perf/arch/mips/Makefile +++ b/tools/perf/arch/mips/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif =20 # Syscall table generation for perf diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Mak= efile index 7672d555f6cd..86911b7505ca 100644 --- a/tools/perf/arch/powerpc/Makefile +++ b/tools/perf/arch/powerpc/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif =20 HAVE_KVM_STAT_SUPPORT :=3D 1 diff --git a/tools/perf/arch/riscv/Makefile b/tools/perf/arch/riscv/Makefile index 4664a78a1afd..d97fd00e43f2 100644 --- a/tools/perf/arch/riscv/Makefile +++ b/tools/perf/arch/riscv/Makefile @@ -1,5 +1,5 @@ ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile index 3f66e2ede3f7..4b83e66c2dfb 100644 --- a/tools/perf/arch/s390/Makefile +++ b/tools/perf/arch/s390/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/sh/Makefile b/tools/perf/arch/sh/Makefile index 119b06a64bed..f9e270940919 100644 --- a/tools/perf/arch/sh/Makefile +++ b/tools/perf/arch/sh/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif diff --git a/tools/perf/arch/sparc/Makefile b/tools/perf/arch/sparc/Makefile index 7741184894c8..39108adc18f1 100644 --- a/tools/perf/arch/sparc/Makefile +++ b/tools/perf/arch/sparc/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif =20 PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile index 9aa58acb5564..901d74e85470 100644 --- a/tools/perf/arch/x86/Makefile +++ b/tools/perf/arch/x86/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makef= ile index 119b06a64bed..f9e270940919 100644 --- a/tools/perf/arch/xtensa/Makefile +++ b/tools/perf/arch/xtensa/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS :=3D 1 +PERF_HAVE_LIBDW_REGS :=3D 1 endif --=20 2.46.0.792.g87dc391469-goog