From patchwork Thu Oct 17 00:13:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 326ADD2F7D8 for ; Thu, 17 Oct 2024 00:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Zgjnj0m5GCDK5RZDSEvmChYUUBqnb9Kjcf22Xw9GZo=; b=bvfVCXXTuXC8d/uOykCor9RMNT fmF4q6vDYElZJkD4qECtvztFMdSIHhvJXNqqBsbPK8gwPxNqsPylEq4Qkj2grZI2TWN/QgmNSId8E hsIbh5pQdigYpPYpOne8hbFeDEZ7z3S0s5AyPbTAuobwVntslZI2yzhX+obdGhgNyTgJ2axUExo6T n5YER9erlPOxdsodx98/XTuv6ENKKZWQuk1N9eTMO++AXSOcr1/vJTGcHd3EtvslJmEDF4yt+0OgL bx5bQiBJoAy8XFPxJGLb2q9a94LhixU3cBNGJpcEfygDCnGA4c6SlmdmCasVrEyJUUzIn4CjfR4bD tkyXJejg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EPx-0000000DLcr-3NSa; Thu, 17 Oct 2024 00:31:05 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9X-0000000DI9X-2Z7S for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:08 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e165fc5d94fso691654276.2 for ; Wed, 16 Oct 2024 17:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124046; x=1729728846; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=8Zgjnj0m5GCDK5RZDSEvmChYUUBqnb9Kjcf22Xw9GZo=; b=SfXbHPIvYlhduGvBT4GA6O+zbrW+jXyPUNUukPlgnyjlKFfYflPAHVxn350hIA81Ap SaO5NTXOb+IzbS39OoNXCbEMcTcvpDrXzXA5QMevFu8wl3jbLdiCDsOf14+jjXWXlbAH h0qjclwFsH7eMbwDV6pWn+pIOXZPIYV5t5JbuqDo0oeoffo/BwRkz2Exx8eXkZ0SOAEp INsV7wV4OGPXv6dfuhazdAQjZFZv+RrJ4vACPbPIYS0PmCnq9t/F3ldAjvKifB6zHUu9 b6DGj5YJe3Z+pIt6McSY/G0kwN8Y1ubtC2dvCfdilTOMEx/5nokgLXPTg58HfTAsBzdo A7/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124046; x=1729728846; 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=8Zgjnj0m5GCDK5RZDSEvmChYUUBqnb9Kjcf22Xw9GZo=; b=Qp7KAL+o0shaMdExUk21RvPz7Z2NCrztVwExlPcqHo0/PM5GcL8GGXRySlpeInsc/w esWydS9Qx2Q1Oioczmz4HvYeFepg4pUxFNU+Znoyv5+2dhl/ddPyHY7OaZ85jBCnsDaE fiNti8yx7Ml8m7okrsZ1gUm7e0sBUseEBlOy0I3Z8Jwt8iGx4LAwRQBqMAQH7IKgvKru kj2hdOGq/k+S4f/IOibJJV6JvS8SxcKljC9+eENYtbNu8U6rEb2aZw5xHqyJSQ5V/sUK /MtpuZbFyBj6eXbkKJ2ROyO477BC9FonioMqPmA+84TI92RtTNo0bqryokHU8xUdZKfU 32Yg== X-Forwarded-Encrypted: i=1; AJvYcCUNzERjd/pFOuX0kA1SrqsJ4jRZjRVVAr4PKFPCTSJR2MFZChuQ3Ll1A4kWKHk0lXDhOD8XAig2c8wdTyKYMHLU@lists.infradead.org X-Gm-Message-State: AOJu0YzjvK3xP9kLWsD8m4YO5gwnkXZ4RfXJQYkdLNTqiROozqgEslv0 TSR93eUBWReclW/aDKW1IIAEnCYMwtGyJtH4vxdGaEsBtvxmAyXF+DleGf+0FpdHZEEdKnux67O dVnwFxg== X-Google-Smtp-Source: AGHT+IG4yOEShi7bfA//zRBXm0HyxwcMrNGTLY2U0O7sKDY8krpaQf7LbxB/HvXewatFXm/5ipRsL7HiuJQ8 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a05:6902:2d08:b0:e1d:912e:9350 with SMTP id 3f1490d57ef6-e2978559a74mr9642276.6.1729124045785; Wed, 16 Oct 2024 17:14:05 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:44 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-2-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 01/11] perf build: Fix LIBDW_DIR 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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171407_682553_536B3AE7 X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Testing with a LIBDW_DIR showed that in Makefile.config the dwarf feature tests need the LIBDW_DIR setting in the CFLAGS/LDFLAGS. Signed-off-by: Ian Rogers --- tools/perf/Makefile.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 4ddb27a48eed..c1c7c25887a7 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -162,8 +162,14 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) # Must put -ldl after -lebl for dependency DWARFLIBS += -ldl endif +FEATURE_CHECK_CFLAGS-dwarf := $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf_getlocations := $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-dwarf_getcfi := $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf_getcfi := $(LIBDW_LDFLAGS) $(DWARFLIBS) # for linking with debug library, run like: # make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/ From patchwork Thu Oct 17 00:13:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40599D2F7D8 for ; Thu, 17 Oct 2024 00:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GHSqjk9ZRfPn8FVBcSh8Ry5Cr0JpG8eM+bHfnQinYnA=; b=33aqDvL1ijrf6LY9PnMOcWTNmk MdJXTZAn0A5khn4/aITcdCPb8c8ZLREk0lZZT9X0P1T3f27MY0yBSkmfshZBJor342ZVe45GiQIKq TUMHMoa3UTGmhg+cnyTbMTP0bFc2JVNYBHDCbv3SDDho+39jWtmv+LBwiYKAKwNWKR7vu+KD3CDA/ wZZ/XkfOL9+g8ho3tsO/8AO5diwCKrXbKoLbEwe/WjyuTpqCQtHkSibTTHi7VaUeZi4DJALPvcjQA aac+Gbyl+UEQb33bTFuQM1JzqIvh379jlwVL6iego/geZDtdo/2roWrH1zSJn8fMWjSgigY1KSh3B UArVD+uA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1ERO-0000000DM3O-1g6i; Thu, 17 Oct 2024 00:32:34 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9Z-0000000DIAk-22x1 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:10 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e2971589916so683469276.3 for ; Wed, 16 Oct 2024 17:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124048; x=1729728848; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=GHSqjk9ZRfPn8FVBcSh8Ry5Cr0JpG8eM+bHfnQinYnA=; b=tX9+KMoY4MEcD+pZBcfHV7833q/00Suwe1Wqd7+y1E3MBWckCn+rZJtMfOLDo2cFjl B6si34TfyHNc2mfv1wcavk0jY8m/7rB4kJ4hGSpLI8EspSY3w6OVzA/IVx9k7pnlovwX mtKCj1knX+bhie1T2X3CdWv6REadhge8q5Yv6TYPIvp1mqrqjmw2FQaULRXuw5JU5YPa To2Zc+CMpfMu/XlhA+xMhbQogaUTAps3lCh8KF+LT+UJh6SR6qfwtC/xigWQGWrkU6Sq QaaaEI0crxSuNKMOrLfm8boGz9z1tRV57efelj9UUYtFAVRy0KnbYhUwCVSBoXS1EZ1u VdAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124048; x=1729728848; 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=GHSqjk9ZRfPn8FVBcSh8Ry5Cr0JpG8eM+bHfnQinYnA=; b=tanKfXCl9AG64F4G0OGhq5JghHyf7N1nsluVC6X+bZfQR7nMCqipAzd01+N0X0P2oW oJF8bK6g+mg+ZxrFH+y+211DrdLXThWM9fZJ1DJJiLggPqHlQFxHEZat7o1MQs9GaPOg YjSpXkEbPWDnZrJ286ZpLR2nsA1D8c8d+HBsbhoxucAWSZzfkOMQSNULbPg5bZKMWtsk e8d7XoqPtnynSH4CsERcyOqnNub6qQUEbc7g9ijk9ZDKxQSyGBc/muh+wiwFWePSLl6T v6GWyiG8ABpMVcsdcy259iLcOh2RN1JqiqT8VxmKoBID0ATv+cjlzC56kbrdP4fEgCCt yRwQ== X-Forwarded-Encrypted: i=1; AJvYcCWskIEmc4PowbE8sNE88kRYDLWRnK5pHcElIFrPvJQM/9rYa60KCAf/JWbcQ8ADRTnhMp9Oz6EfRgPzKoHc+APS@lists.infradead.org X-Gm-Message-State: AOJu0YzqiA49gHi74phcx6LVC3GbDu0OaGX9HrXxlGlkoEgv7Ug/O8AP nU5ybEDnWfh+jejQ6V5/YRTNiaBwQW+1Xy04vhVANW/RMf1m/h6g1L1h+Y48zS1HGGt55FtyWGE vR61eug== X-Google-Smtp-Source: AGHT+IGqr9sQBXM3adIskS2P6qVNnIou3eo2nhdUZf1EX7Ra7XEm1CDhhAwb4OEVcH7WjrUyRdtR/4pRk5N1 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:dc41:0:b0:e20:298c:541 with SMTP id 3f1490d57ef6-e297857270cmr2711276.9.1729124048178; Wed, 16 Oct 2024 17:14:08 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:45 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-3-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 02/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171409_564516_2C8698A5 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 c1c7c25887a7..cc2cfc3aab40 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -432,7 +432,7 @@ ifeq ($(feature-file-handle), 1) endif ifdef NO_LIBELF - NO_DWARF := 1 + NO_LIBDW := 1 NO_LIBUNWIND := 1 NO_LIBDW_DWARF_UNWIND := 1 NO_LIBBPF := 1 @@ -474,9 +474,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 older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev) - NO_DWARF := 1 + NO_LIBDW := 1 endif else ifneq ($(feature-dwarf_getlocations), 1) @@ -499,7 +499,7 @@ ifeq ($(feature-libaio), 1) endif endif -ifdef NO_DWARF +ifdef NO_LIBDW NO_LIBDW_DWARF_UNWIND := 1 endif @@ -577,17 +577,17 @@ ifndef NO_LIBELF endif endif - ifndef NO_DWARF + ifndef NO_LIBDW ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled) - NO_DWARF := 1 + NO_LIBDW := 1 else CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) LDFLAGS += $(LIBDW_LDFLAGS) EXTLIBS += ${DWARFLIBS} $(call detected,CONFIG_DWARF) endif # PERF_HAVE_DWARF_REGS - endif # NO_DWARF + endif # NO_LIBDW ifndef NO_LIBBPF ifeq ($(feature-bpf), 1) @@ -636,7 +636,7 @@ ifdef PERF_HAVE_JITDUMP endif ifeq ($(SRCARCH),powerpc) - ifndef NO_DWARF + ifndef NO_LIBDW CFLAGS += -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=0 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 := 1 endif PERF_HAVE_JITDUMP := 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 := 1 endif PERF_HAVE_JITDUMP := 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 := 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 := 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 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 := 1 endif diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile 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 := 1 endif 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 := 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 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 := 1 endif HAVE_KVM_STAT_SUPPORT := 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 := 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 := 1 endif 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 := 1 endif HAVE_KVM_STAT_SUPPORT := 1 diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makefile 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 := 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=1", c) +# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_LIBDW=1", c) set_nobuild('L', "line", false); set_nobuild('V', "vars", false); set_nobuild('\0', "externs", false); From patchwork Thu Oct 17 00:13:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A5ACD2F7D8 for ; Thu, 17 Oct 2024 00:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Vpg7UjVbvMTf2T5M8RY79W0YJsjIkpvO45Q8v0jMOdQ=; b=fBDDjcIDQhdyx/cKcY5Z4Hg69p U9UnQvOVnOoqKhiJ7VFQ6XF2osKh2HwTfaQH1GtNi0OT/SAjUSYaK38l2ND4qfKaegJJkSN67yGuF cfRNRJdAGpKO7/WTwd/xgLxvCzSLXJOb7d0FvHgqU+X8NeIxliW0aNeTm/VBu0N7n6bdHoTtPPNJD ZDw5DxcQbd/i0/wWr7Ho9/2vN18Rf9fC7E5szVw6amn7oiRSuwz9LW2RrozK9qVW/NW/HnpTcX7ML eLQBeX8JDXRkyJzyI9aySl0m/JBWOxFEv+4TNfroAF4p8zyNwTvwYJlNAW02EVoCfR9CM1G+70jqs 0vnNVBqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1ESp-0000000DMOY-1zch; Thu, 17 Oct 2024 00:34:03 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9c-0000000DIBn-1v0D for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:13 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e28fc60660dso575206276.0 for ; Wed, 16 Oct 2024 17:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124051; x=1729728851; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Vpg7UjVbvMTf2T5M8RY79W0YJsjIkpvO45Q8v0jMOdQ=; b=CdyWv9r4WQc3Gke+W5N8s9uMhqYCAR6xoew3U8BsFh7ZmHeMS58NsDJwtQ918eoUQs du4WXEp3ZcYSQvouermN0Yn1v6o3vte3ZTKwraCsc0oqkfYfSi4UfGCxMHr7Eewccg5j fxmj5QFG+G0xEGOBF9hTV9i6KMusfKS/fqzpDeNVOsyOPRX4FbRfkuz9U+JPeBW8EFnl 9XPZJz7nSeZie81DlU4xcSbVntoVRu+FF6fcqcDoIX3qJoCxLSEhevm9W5t+TtY7Pmr/ 1jDlbDi29kNMur2aWX9885y/fCNHc7n6YBqvH05hUGPWSyms2rSZE0gkk3sdGKfSThAc 6Vyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124051; x=1729728851; 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=Vpg7UjVbvMTf2T5M8RY79W0YJsjIkpvO45Q8v0jMOdQ=; b=H+S3s3zG/uP3AKl0QD7IA82Ey+wkUxIhuT2alhT8NkQvKCeFa+hw+ZP0QdKAN1wu+H gTpDY+h0RSkCwdOvCRhfZoFO+AHSovU2ZFeRJsCUPupa10fOHNEtAkmcE+hMq6xleqKB MomX3odFcfSr3WHoaJDZKxaaMS62NNlfC/g3rzdQMr7ZbnnhMFxV4pxBk00ANFPewYPT hBntMD2yHdr3rP3N83HE5kdB9+l5eImSPRJVb4KxgCT0XUHPwY3Fikk+ySSTV0xqxWUr vg1n7UF3FT6ovoDC6rS7KL8rVUQq/dwKirMW498w+TIiKmLIWmxS/7U5edmzT3Y2zc8S mQLg== X-Forwarded-Encrypted: i=1; AJvYcCWfLGT3aq0WR+XfOHzdjV3TjS69XO8wBKvMfMuS+2Uo2eAT9Lqm2KAH9trJlAJrNT7yL39wX+wx+v1wB2sS2QLp@lists.infradead.org X-Gm-Message-State: AOJu0YyYqCFBS8ZYO5ffkxp87OzXOu873aA+MB0kqIpMdDNIjYlIffQJ 10FXtQum45r+GmFgC1TpyxT4F1WXc4G4L9jEudLTkgK6/6kqZ2z6vgorgHzMczPmOU1b2UZ8Snh N9/wwbw== X-Google-Smtp-Source: AGHT+IE02udqyL0ksFlRpgHYEs+RBRyhfL+nQeujKZ+O/NiCK6Bw9qW9/lbqOGgoYUwDeDIjpi9bLcuBC4kZ X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:9e0a:0:b0:e29:7454:a4dd with SMTP id 3f1490d57ef6-e29782db2aemr7708276.4.1729124050459; Wed, 16 Oct 2024 17:14:10 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:46 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-4-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 03/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171412_515464_80336040 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Previously NO_DWARF_UNWIND was part of conditional compilation but it is now unused so remove. Signed-off-by: Ian Rogers --- tools/perf/Makefile.config | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index cc2cfc3aab40..dd5468b8b5de 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -756,8 +756,6 @@ endif ifeq ($(dwarf-post-unwind),1) CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT $(call detected,CONFIG_DWARF_UNWIND) -else - NO_DWARF_UNWIND := 1 endif ifndef NO_LOCAL_LIBUNWIND From patchwork Thu Oct 17 00:13:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33205D2F7D8 for ; Thu, 17 Oct 2024 00:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gv4rC21EH5vKyMLFGXp6RuMwHEpZG+2xqNlyQiSYUJM=; b=ZEWt6CFK7Z4g0EZQkqhikW4y4M zy78pFYrNie7bwdzFaKPLTPVTRDYaDAre06N+Gf5itjD8Vh8+EczyARroCGJ8Of08rV3wCfdvMh6c S/h5zXdlDVLI35tI4ZDOrgmXX7+pCiRDKCXJ3l/SkGPkWT7LGuus7UalKSg+9AS7h6xQQ8ymsPC5O pxfvZZvQK0F8JZNzsO0C5C193Y42psAqjy7V+3RGsN+gQYiVVVRx/SVot7YRTTGWxByBYGVPCUYYH W0+4SEKuaVWbTXoTcG8WWX3Eq7D5rDa2L+KdTi8KzmEc1hPQ0MyCoIoSbMDEFzO2zpg2vLNYOw5NV mXWFEEvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EXB-0000000DN1J-1fDc; Thu, 17 Oct 2024 00:38:33 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9m-0000000DIH6-3tDv for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Oct 2024 00:14:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=gv4rC21EH5vKyMLFGXp6RuMwHEpZG+2xqNlyQiSYUJM=; b=lZFKjC4+Zs4B6Vuc/cRZi6K3jQ SK2U2MYfVPEe/emx3cbwDkbD4zYmyBbIZeEaYCH2yDFLrBo7oXtudG97pDj+xi7h9mHu7ifcLAi1B hDmShxvvX2twsdiQ2dgI7ntu/3AKHwIEERVDVvQ9GSmJ5w58LidIiDFbjs90YwXxpZ56IF/YZIJoS b3a7HBP5JvsixngS2ZS4rELaYtgcQKlX2q0G+vzfwqd6NGsUAlxVezvKDMQ2fQXTzORl4in49cIjF ykNLh1SKvulOtjZ2xxhO0OMljCN7rN+22JnH4LHCUnbJoOOj8n7vl65hVv5rhupEyMHGpG3swaXxn 97Pq0YMw==; Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9g-00000006y98-0xk6 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:20 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e293b3e014aso592624276.3 for ; Wed, 16 Oct 2024 17:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124053; x=1729728853; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=gv4rC21EH5vKyMLFGXp6RuMwHEpZG+2xqNlyQiSYUJM=; b=nPfnXvlsRJJWQxpTuNphbbOcT7YJuN6fhK6pm4zPjM8k6ArBUPkmycrUXbPgWPC3TC nnO/4VpsQEfAIERopmGpDpoFFWxt40Ue04HtwMvzhvWakanEuXUXzeXTxfAONireDdGz CVoDSIfseGq44Cuhn/BAHJGVE33RMK7kKXMSCDiiMf+lCYjy78cW/jSiNhX58TbOuJc0 PRQr0QVsJTOhfKaVTFvsaLs40jyt5Y81zHlTzgnm5BmtEjjR9eoxGhoDtuAKNRJ2xsa4 f5RvH2XLg5iEeBPBRJo65Bv4hOcNlI2GLjGH48jK6bw5Y/NEJmTAPqM18hi3krqZH06f Ct/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124053; x=1729728853; 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=gv4rC21EH5vKyMLFGXp6RuMwHEpZG+2xqNlyQiSYUJM=; b=dGp7BsLGCaCAUmSxrCVrBw0w1CwUC+UVAx3jwr3MkUqGM/8b7r7b8v4A1kLnZKmSia mjQ0LjNjYMiNLsMdsnKjpE/IZ+foK6Z0aVPKOUxA0046xK57HAXZrftaJx/LeCeChYhS ralFBZMicuHMJ3RzDGVi3yH6FmG5M7PdEwynHrnl0pis+bPQwRP9gAKP75g2VkMHj2ed kDMgf4uipMDDwdlo+x8CBZibulpxSwgxUVN6xn5EOXjYYAu/1N8dMW9BTb7ZVSnU7Pc1 QBPY6z5w4nRIU61JwM/4R8BWS20QhbY7Tt8YogThrYQ6aWTl/i9vXosMfrREviI4QVkO cFLg== X-Forwarded-Encrypted: i=1; AJvYcCWdWy+RP779wg4+Dfc8uJRKEvRBUb4bmyYRv/eoQ/xxfUwzR+lWECvRU3VeWcGAUgaBp8YRkdG5Ke2TRUWHrCHI@lists.infradead.org X-Gm-Message-State: AOJu0YzgdoTtXY0ddQ3Au/zZKinVB6TYLac+uEcp52gf/BcGPkSDfBM/ Pzi9cgqlyXLQqCEAtb/SQpmx2IHVkpW+zPYkI9WcddB6CZYpEw/2wEypYQLB+2qhyaiLM50JnE2 yQEDaqQ== X-Google-Smtp-Source: AGHT+IGzsdwJDBoPyKd/XtgGR0BEXokuFHhXrbu1xDLmXdK+oi96DfZVdRcJHcGkPuy4Owl251BGxQBLx/5T X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:ad64:0:b0:e16:68fb:f261 with SMTP id 3f1490d57ef6-e297830baadmr2824276.5.1729124052807; Wed, 16 Oct 2024 17:14:12 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:47 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-5-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 04/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_011418_762992_EA7DA87F X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Be more intention revealing that the dwarf test is actually testing for libdw support. Signed-off-by: Ian Rogers --- tools/build/Makefile.feature | 6 +++--- tools/build/feature/Makefile | 16 ++++++++-------- tools/build/feature/test-all.c | 6 +++--- .../build/feature/{test-dwarf.c => test-libdw.c} | 0 tools/perf/Makefile.config | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) rename tools/build/feature/{test-dwarf.c => 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 := \ backtrace \ - dwarf \ + libdw \ dwarf_getlocations \ dwarf_getcfi \ eventfd \ @@ -120,7 +120,7 @@ ifeq ($(FEATURE_TESTS),all) endif FEATURE_DISPLAY ?= \ - dwarf \ + libdw \ dwarf_getlocations \ glibc \ libbfd \ @@ -233,7 +233,7 @@ endef # # generates feature value assignment for name, like: -# $(call feature_assign,dwarf) == feature-dwarf=1 +# $(call feature_assign,libdw) == feature-libdw=1 # feature_assign = feature-$(1)=$(feature-$(1)) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 1658596188bf..7a1c028ce40b 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -5,7 +5,7 @@ FILES= \ 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) -DWARFLIBS := -ldw +DWLIBS := -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd + DWLIBS += -lelf -lz -llzma -lbz2 -lzstd LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0 LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION))) @@ -179,21 +179,21 @@ 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 += -lebl + DWLIBS += -lebl endif # Must put -ldl after -lebl for dependency DWARFLIBS += -ldl endif -$(OUTPUT)test-dwarf.bin: - $(BUILD) $(DWARFLIBS) +$(OUTPUT)test-libdw.bin: + $(BUILD) $(DWLIBS) $(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) $(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) $(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 -#define main main_test_dwarf -# include "test-dwarf.c" +#define main main_test_libdw +# include "test-libdw.c" #undef main #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-libdw.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 dd5468b8b5de..f1e24c4ae123 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -162,8 +162,8 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) # Must put -ldl after -lebl for dependency DWARFLIBS += -ldl endif -FEATURE_CHECK_CFLAGS-dwarf := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf := $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS) @@ -473,7 +473,7 @@ else $(warning No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 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 older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev) NO_LIBDW := 1 From patchwork Thu Oct 17 00:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839140 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66A8DD2F7D7 for ; Thu, 17 Oct 2024 00:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XruooYYEp4qZm36/rBHba0zUOpJtUJVrKsk9Et8lqQs=; b=mmcwIh8g9stTIaPL1oKPd6z+yq akV96ThVOe3N7YBAwrclMK9oTxKqVEzgXx6lzLJN/EXmRY0GVJyboTuYF17KKsTdf03iCwHuI321Y SISXlD8ZppMUDYy6pAsdMTSVyH9Ezq2Jt0TbbC2okyDLSjBxAO+JSs/GadSoSdRlswjRI87wx3Dmg t1RdhXnbqP8dPvJY/Vor+KLhmovYQUgqwoipyoGAjxZ7fljxUShw69RBPIsQWCXOx+IEplC6T6GnK E6mnH71i1CESbS3FY0q7WwONtpwK88fTkS5ZLQthxgdKPV+D5rPrHEYxdCOLi9tIfZv2MJsRkXV/D ANC1osgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EYZ-0000000DN74-0mzx; Thu, 17 Oct 2024 00:39:59 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9n-0000000DIHA-0CEP for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Oct 2024 00:14:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XruooYYEp4qZm36/rBHba0zUOpJtUJVrKsk9Et8lqQs=; b=HMtvF5LWFc8EMcEf20okEuV28I BUCt6s2Uvm4CGTA7NfRbSIjKIp+FY2hiTC77BDTi32jYaisUwvar0TD2Len/5R+ngo2AX3AL6wQcx 9u1WEeiEov/QLhJ6RI3FUVeFs4+x/Vpwg5vCU8sOb/aUkdRNVbA6Is6gI9f4Unhilh8H+PrPGWoT7 Hp4JRSY94hQHsw2PS+JVuy7yaFZAW99ceIe0WOnufLZd6ZF6zlcRwPl98jueDgGypNEpMIVQVhtV0 j/7aWsyoQBordscCvcsETtN3s3RqifeWxc4O89GCpSyFQu/8skVYjqfJAJdLI8AmnazWwIK9C0E9U TnR+/Q8A==; Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9i-00000006y9D-0jru for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:21 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e2928d9e615so633940276.0 for ; Wed, 16 Oct 2024 17:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124055; x=1729728855; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=XruooYYEp4qZm36/rBHba0zUOpJtUJVrKsk9Et8lqQs=; b=jvC5JGZKv5ZYpDweBhPW+SIF1eipmYHgWA0dIAZmWT2kQ9bt9dpnZ1bnEaJKLnNMoo 7vgJfqbV0f//lqmoEiKfpsg+P1NYrBqwF3NUFnoQI5tKT2B0rnqV/Lu9eJEDXgfTkj06 rIX4kBA/G4f68AsnUovVSY5y43t+FWl2bb1eKkH95fUBLV+vGauewohc9HT8dEtXh3VJ /avavaopIVzg9bwGP2pZd95xAXU4Meciviu3ewu6u+TJjlRDlmWNi4lO3z2nRzqevERU 5R48pR2Ztnk5unaFjGCDMxfx6x0U8j0KBJtXw1bfbT/D3WbqmuvAGw/FXyLVj1nDus7c VvLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124055; x=1729728855; 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=XruooYYEp4qZm36/rBHba0zUOpJtUJVrKsk9Et8lqQs=; b=uJ7Br0obgvKo1dWU6/4V4b6Q6wQb+kNy/GFMO0+Pu6JujAEuQPxPlbbQPVrFtILeAw WqcBoTQmMKYpsh8M8FfzTIP4BG98VmnIwZRz5ahYBf1PDU7PhDgfOSn0t6t9OGptwfuu JmEHpPnNxCueQaAM5TzNWoAT1LEOn07gaclDD8q+AYlRScbnm9cRxI9A2zIbLwoAx/Oy +yaQeY+x61GUyr6mWIVT+P1TQ4v/M1NTfJejtT4OiG2ypzD/WnqbUXGtzI35PrY8Ghto S1ULm8ss/KEKlJoZrcVgbSusx46hNLRbhM0oIzKqpwjkF7wyD0sV79BPoqzdPrOObf94 Vd4w== X-Forwarded-Encrypted: i=1; AJvYcCVpvwrQf2OJ5GTLYG3vrxideJesJIVH6g3R0Jw/oQL1UKoCJYByKpiYocY3zym003kGpbBvcWuTfAEJqgLy+66c@lists.infradead.org X-Gm-Message-State: AOJu0YxQAzTcYawkyFMte5va3Elmr7gSqlA0EtyPzNKecUvAW0AzQmfs FvJSNtfotlaHkZknf5DvQt+mB26lCGaa4fpxso2MMfVKS78xl0kNVVxLQwh/D3WIORYcl/g9jRA kR0Vg7A== X-Google-Smtp-Source: AGHT+IEWSf9KTS25YKU/OuIukGw6sWQXoPw62GyskrXeRoMByAlrcshBkd7RuFz+z1QPDU6BnqyVlH2IKX9F X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:2e0b:0:b0:e0b:f69b:da30 with SMTP id 3f1490d57ef6-e2978571005mr6949276.9.1729124055304; Wed, 16 Oct 2024 17:14:15 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:48 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-6-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 05/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_011418_783106_D0CBE895 X-CRM114-Status: GOOD ( 17.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 := \ reallocarray \ stackprotector-all \ timerfd \ - libdw-dwarf-unwind \ zlib \ lzma \ get_cpuid \ @@ -133,7 +132,6 @@ FEATURE_DISPLAY ?= \ libpython \ libcrypto \ libunwind \ - libdw-dwarf-unwind \ libcapstone \ llvm-perf \ zlib \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 7a1c028ce40b..18f8fef5e843 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -52,7 +52,6 @@ FILES= \ 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 \ @@ -317,9 +316,6 @@ $(OUTPUT)test-backtrace.bin: $(OUTPUT)test-timerfd.bin: $(BUILD) -$(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) 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 -#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/feature/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-libdw.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 -int main(void) +int test_libdw(void) { Dwarf *dbg = dwarf_begin(0, DWARF_C_READ); 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 f1e24c4ae123..fa59ecce4470 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -164,8 +164,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getlocations := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi := $(LIBDW_CFLAGS) @@ -467,12 +465,6 @@ else endif endif else - ifndef NO_LIBDW_DWARF_UNWIND - ifneq ($(feature-libdw-dwarf-unwind),1) - NO_LIBDW_DWARF_UNWIND := 1 - $(warning No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 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 older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev) From patchwork Thu Oct 17 00:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4433CD2F7D8 for ; Thu, 17 Oct 2024 00:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G7WUOc/nN0htnP5Qn5PJQ6QB/5aNVItHGUNec9g68b8=; b=AirY6AUkNOkhUs/wgw1fyTkh0w Ts2QLifjPdCESG21vbxlVIx/VGtmA59dBFM+elH5KgYgfC3DimLI8iJrUnNTHVXKwxn0esyEig4TR n09X+mqZ8VCuXMkl/7G/SzgR2jxAGwa7OqBRWfQ9xw2XvlpvyhzFU3bYYs0ws/cgXjJc1b8twMtOo j4BP3kc6qXWvAYCSHLx8zlZqcu+7Ke35dA7g1TChkYZFPXPdp9fqzQtKiVjPl0eH4Q2tiUX83EPqR 8XM5tEkcByskXHFlEBrLNSDttLN26NDrpYutREqNXYRGjT7UbumOr65WLU6sE8FoPpjbd6mfgxCNj tfeaq4bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EUH-0000000DMji-0UYB; Thu, 17 Oct 2024 00:35:33 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9j-0000000DIEw-24T2 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:20 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-6e355f1ff4bso8954517b3.2 for ; Wed, 16 Oct 2024 17:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124058; x=1729728858; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=G7WUOc/nN0htnP5Qn5PJQ6QB/5aNVItHGUNec9g68b8=; b=IYXRCcU9wbfey0f/r5Oj6UJ4Y22aoL7adFFrbu4HIzsOVwS+v7I2XBSwABV01J0Tfs YQpmQV3PXM6PxpkJfWhvOR3YD9g6nN4D7EV/nL/ubJyyjyDXPHBiJ7fOEYYP1ge/zUlV ITvOm2Z4BrqvzdANO7jmMPD5r98zYCODDsQwTg2I796fLDGyrc9/7MTwp5eZW2LYHxlE WjvtvyJQdiV24ex5Cbv/40ixNqASekEy6TS5BbeIG3LWoUIeJXjB1oFbe68XPyw5N/rl THyNjjRHHhlducCBiEP+2t7tjmconP53E8v4+a6jwByfber0jUaksgmLv8fwy4NM073t ZMdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124058; x=1729728858; 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=G7WUOc/nN0htnP5Qn5PJQ6QB/5aNVItHGUNec9g68b8=; b=Amn6yZUjafmkvK2DL82mF18W5ikc2rCp6P9ztlB3C0Eb4G0SuS0D24Pk98i4wwUwBD 21mlQd0/d6IoIN5KPfi6InRm5ik/QXfauVBSAz8AOu/eKjfify8LE2aCF6FtNs2emoqa +/0MjUk/21GTYrNfsZj47rEORo+y/oCdG58F2DNsEmALTf04OpzDwJGGgY32vxdr0bCP eRsawM1abPe3ichErTC/kCrbKStWE76qa8OYzSYlP+AIfoOChOQwf9NxgAnpNOWmZGZM ejzz0UDMMT1d4kBmO7xu7uRfqWsgOUvT6XhmYu6tDZlHYBnUMsd/TCPvSVaWkxJzdhtv 06Yw== X-Forwarded-Encrypted: i=1; AJvYcCVsZUsI/HSqcfbmrvdgDg1cGRY16BIe9FaLbQpGDJX0c/shufBYBOB+QpTw6G75cPGyaGl/VpSc4obg+2jEaDkL@lists.infradead.org X-Gm-Message-State: AOJu0Yx85ekUKhm18AOLoyYS4iirhCxTgshwQG+kqoz/81G1D9etxLUK AxUATKjxtW2O+R0gtJz2NteBVEsoSYR9AbAPuAGPkvBkq838JABLt/AvzUHD4v48eyL4B668Ypl peo213w== X-Google-Smtp-Source: AGHT+IEsN3civIpKI+BCSs9jbzR3oJOWunf56Opf1iE62vNrYt8ntggM/1ixugg8sijBq6dmPI8iBQCDTStP X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a05:690c:6f11:b0:6c1:298e:5a7 with SMTP id 00721157ae682-6e3d41f5921mr1446847b3.5.1729124057807; Wed, 16 Oct 2024 17:14:17 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:49 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-7-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 06/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171419_653104_154D61AC X-CRM114-Status: GOOD ( 16.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 := \ backtrace \ libdw \ - dwarf_getlocations \ dwarf_getcfi \ eventfd \ fortify-source \ @@ -120,7 +119,6 @@ endif FEATURE_DISPLAY ?= \ libdw \ - dwarf_getlocations \ glibc \ libbfd \ libbfd-buildid \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 18f8fef5e843..0af3e0255fed 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES= \ test-backtrace.bin \ test-bionic.bin \ test-libdw.bin \ - test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ test-fortify-source.bin \ @@ -188,9 +187,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) -$(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-dwarf_getcfi.bin: $(BUILD) $(DWLIBS) 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 -#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/feature/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 = 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-libdw.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; } +int test_libdw_getlocations(void) +{ + Dwarf_Addr base, start, end; + Dwarf_Attribute attr; + Dwarf_Op *op; + size_t nops; + ptrdiff_t offset = 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 fa59ecce4470..fefa779041a0 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -164,8 +164,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getlocations := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getcfi := $(LIBDW_LDFLAGS) $(DWARFLIBS) @@ -467,15 +465,11 @@ else else ifneq ($(feature-libdw), 1) ifndef NO_LIBDW - $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev) + $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.157, disables dwarf support. Please install new elfutils-devel/libdw-dev) NO_LIBDW := 1 endif else - ifneq ($(feature-dwarf_getlocations), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.157) - else - CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT - endif # dwarf_getlocations + CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT ifneq ($(feature-dwarf_getcfi), 1) $(warning Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.142) else From patchwork Thu Oct 17 00:13:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839134 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DA34D2F7D8 for ; Thu, 17 Oct 2024 00:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Tad0E7gcGFVieZCra5vDET9AmRJVsC8ZllrVS3JLUH0=; b=XcQJ6G3yf4NZC8r1R9AEV3TeWu y/s4Wd8vSVKDmMxId6Fbru5/sCxJxviamuTkt6/nvedjpr64UyA1Rsa4fN48HXhklSCXQ41YPqleT 4bBw9u0fF6/mUS++3H8fjxaM13IxFLDu+6lXYFF8Xn8OLX9B80GwcWLvCmN7xSWOLZHcp3Ya5Q/Y6 MjatXatH5wOiawTcr9UmAFKbabEev1gaoicPahvxsAFXOQB3ioETLJufEUnmGeCsH3OCxuVXdK3xO O6cJeYytYfcwUoDozG9FvdbhRz1Nf7xvWM5BM1Wz1HlBsVap4eYWrVZpD7LQnvEbLWvRnV3DzFAAx iOgPHU6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EVm-0000000DMuu-2oxC; Thu, 17 Oct 2024 00:37:06 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9l-0000000DIGL-1Frj for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:22 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e290222fde4so519681276.1 for ; Wed, 16 Oct 2024 17:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124060; x=1729728860; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Tad0E7gcGFVieZCra5vDET9AmRJVsC8ZllrVS3JLUH0=; b=QtW2CkpQv3IBf0FmlCtJYLVB34c6lrKtCogQLdiP/zfu8Y7eSVnSSYPxmphBoCQ3Aa NFAPRioefSW5sQLJnhhPlXIArXOvio4uiZ2VMzzuO/siqT2gUiXWa0R8JNkwj5AObhbX U2Fq1hCjyg6258MKHDLs5eCb4zJIjXHStoTABLgbAbmZxECC9KjRGkCNbXVhPwcBlwsX vrNLGWa2HaV9T7GY6ZirrZiASjfFJ25ejbkbNHkplSMp3NwC61CiukBSocIoj/PzEDFm 4uNYMDKhz2G7jNUqfBK2fRxTojOvaVxc5widIKCfudyft51bIDNebcMvYVZqMJiymBJX v+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124060; x=1729728860; 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=Tad0E7gcGFVieZCra5vDET9AmRJVsC8ZllrVS3JLUH0=; b=uQfPOFfkZScgHd7zIFIQRDCtYhi3wcG9DXTN/8xx+lzVavbzWaSQ8keeYpenG+11RQ KNMXUsLYb1BggM3UO3FcY2RaFOSw0kXmqtnLyEkHyHY8VysIT4TaOJ53Lya7wEnwa7UM BtSQpAAOUumODBKOjFYCcw3MFKrbD3pP3voY2FR9WfOGA4+O6En/HrmvoSam57iX/slk Ut3AMg1BoO+ba86psB6GyIK4RiXafsSF3afTIdVPk5/BTmZGZ4KSI4O3eG6P0lUp2jvK giNTavdxtIQB5yYBUSd4YvZzHolYwpVnID0qO5Fjxabtonc3QNOLmOdxU4HfgXN4FR3W H/Ig== X-Forwarded-Encrypted: i=1; AJvYcCXQp2hSXR3dNvoFiD9wC2sWzgUMSVjccVBha4Hx0M8ZMVpOrgqsQkYhvyZDfW852lacpsyQPy8f4ZjrEZD/bPV7@lists.infradead.org X-Gm-Message-State: AOJu0YyadFcVWj4p3JVRgGa2gW8ukTPXKiG61zvuii5FoKOPJJ2iD33N iie69jin/EJUUbkWBauWspf/mZ30n3iwbdX3/+2v4EAQwJgUtHlEL5kkTFXQQRjRrkayvk4dlQh nBic1fQ== X-Google-Smtp-Source: AGHT+IGePwSgVpWBgHdlZAEHvgtdZU4v9XTpwRgCq9JMZeuOMFSyMOIR6zQOqhOB1mh8mXpAaT7pdZ4G4iD7 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:dc4e:0:b0:e28:f231:1aa8 with SMTP id 3f1490d57ef6-e29782bbb03mr7701276.2.1729124060026; Wed, 16 Oct 2024 17:14:20 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:50 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-8-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 07/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171421_368823_EBAAA844 X-CRM114-Status: GOOD ( 15.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org dwarf_getcfi support in libdw is 15 years old. Make libdw imply dwarf_getcfi support and simplify build logic. Signed-off-by: Ian Rogers --- 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 := \ backtrace \ libdw \ - dwarf_getcfi \ eventfd \ fortify-source \ get_current_dir_name \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 0af3e0255fed..d28ad7672a27 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES= \ 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 \ @@ -187,9 +186,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) -$(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf 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 = NULL; - return dwarf_getcfi(dwarf) == NULL; -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-libdw.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); } +int test_libdw_getcfi(void) +{ + Dwarf *dwarf = NULL; + + return dwarf_getcfi(dwarf) == 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 fefa779041a0..6378811f2568 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -164,8 +164,6 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) endif FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getcfi := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getcfi := $(LIBDW_LDFLAGS) $(DWARFLIBS) # for linking with debug library, run like: # make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/ @@ -470,11 +468,7 @@ else endif else CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT - ifneq ($(feature-dwarf_getcfi), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.142) - else - CFLAGS += -DHAVE_DWARF_CFI_SUPPORT - endif # dwarf_getcfi + CFLAGS += -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF From patchwork Thu Oct 17 00:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1884DD2F7D8 for ; Thu, 17 Oct 2024 00:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VU9D23fFMOa9LXkPnFVSmMuH/zksDMncppJ/JVZzd4k=; b=o+WSZIGUxyiIMW/RQJeLWu8ClL oSSEJh7FlyzFf0w7X7QDwHgMotYw59dXf3hXP+6He75Y4MVK3qOZJTJWxAj1Iu0dnKjN8LCfZRbW5 cdswnrAya8+Do6INzZo2CMxNEulyZxfxqe7aicQaq+2E1Fb3wWTg0Zh5lHgTcyziJrpNTnjd0MH1s CijCFRO/eB2xv9vpvB+PaFifezEn1rkTL9mloc7+dRP3I9lXRyYYiCF2Es/JVl+o1X8uDt8zXPi/Y Kd/K3ZlocfkTIhEM3bH8e6E9P58WEmRGfJ9K7/BlCODGJIs+tEC8Jb2LJFrGVtiL6kxpQAaL0qJT7 H8yVd39A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EZy-0000000DNIB-1oSZ; Thu, 17 Oct 2024 00:41:26 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9n-0000000DIHG-2FO5 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:24 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e2b9f71917bso188052276.0 for ; Wed, 16 Oct 2024 17:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124062; x=1729728862; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=VU9D23fFMOa9LXkPnFVSmMuH/zksDMncppJ/JVZzd4k=; b=PPzEaX/GWzmKByzueoTIx8xNgVB8ueYhTL5Xn+0UBKqXvs6DTV3AK0df49xKDI6H9J 7VWbZrE/4vARXytmF2OBjJES5UWEyf/zKsrsn9np+/dBj0+ZOWQ64tZkx7CTLmOU96pF UqQUlwCHByFqyfOe5acdj+YaV6P/9q7a6sO9CWhHSlCYVzB8sEw+eCjQGz4MDqSUGI/4 y+6a2cHKsfx2qgMQsj72JykcZiMCX248ZpUISE56oizuSQajM+BWYyadJ0PchybNTxW/ 7QX2K75cgHTn1cJTRuB/OggS9ZekGrf+jl4k3rSd1EC6LLoY6Rl3vcv3UbcccZT4cDk0 cVZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124062; x=1729728862; 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=VU9D23fFMOa9LXkPnFVSmMuH/zksDMncppJ/JVZzd4k=; b=tORN4InY7q2UUdPPrd3P9nl6Z4zxU8eN4oFRVooIkH6tmrNtOqCnwjyr9g2L75iejS HSHzgk5qm5DxbvlFQPQacZWr8Zk0OOrmkbTdXYNLHytMwVZOkQtgOVXF5Iad9SQKenhg 0Qw8xqpRl4a7cm7gIa6TkNOm0vv4620CpQ4H5C2s5KdRmaCKXqcSDdEF79igtV0CLA9a kObmtxqpBvLmciZCbJ3sPd1MSbkEqDPxP73TK3HWWbURW7vxUJvLzxwBUDLB7/3e5qPb 6xtTwRMIsVB38ZWMYU6RRTbRFW5rGl2KhsxV0hdyogihrHGW4lnYgLb54XF1YJyqzEuw TaeQ== X-Forwarded-Encrypted: i=1; AJvYcCVaZHTZJz46ze5FMYkJ++X0DKwv7bmKbPz8EjNpr5MyfMIwl7SxaktA6oFU5PW5qrPVlYAOm0kl6JrdkgUT/6CS@lists.infradead.org X-Gm-Message-State: AOJu0Yy181IUveHknW8hD6WudY5lutXlqqcRd/qYVdF/IUqqbu+7uHQP 8ZCAt2HWQXF2kUwWN83jrBWF2TVj2JGRZemhzWkGQFw6KuK4qu+yTkeXxb1NoI8tG7VzDmQfOt5 edvVMOQ== X-Google-Smtp-Source: AGHT+IFAHdFpfyYHAxh33deC15C0o4iPWMQpiNWeQk6y+OhOBawQMGHjEN4HBQ/OuO3SGFQn1AE+qnHXoGYY X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a05:6902:d47:b0:e29:7587:66d6 with SMTP id 3f1490d57ef6-e2b9ce7583cmr2127276.4.1729124062376; Wed, 16 Oct 2024 17:14:22 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:51 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-9-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 08/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171423_603647_4F3DB29A X-CRM114-Status: GOOD ( 18.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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-libdw.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) == NULL; } +int test_elfutils(void) +{ + Dwarf_CFI *cfi = 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 d6b902899940..b6775d3bdeac 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -1379,9 +1379,7 @@ int debuginfo__find_trace_events(struct debuginfo *dbg, if (ret >= 0 && tf.pf.skip_empty_arg) ret = fill_empty_trace_arg(pev, tf.tevs, tf.ntevs); -#if _ELFUTILS_PREREQ(0, 142) dwarf_cfi_end(tf.pf.cfi_eh); -#endif if (ret < 0 || tf.ntevs == 0) { for (i = 0; i < tf.ntevs; i++) diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 724db829b49e..5ced3b058fd8 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 */ /* For variable searching */ -#if _ELFUTILS_PREREQ(0, 142) /* Call Frame Information from .eh_frame. Owned by this struct. */ Dwarf_CFI *cfi_eh; /* Call Frame Information from .debug_frame. Not owned. */ 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 */ From patchwork Thu Oct 17 00:13:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5C83D2F7D7 for ; Thu, 17 Oct 2024 00:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GcB5GtP5PER7P0fAo7i/I4FfsUt0WnKPhI2an5P5bXU=; b=tCH3g1icL7i3+uh1q3ac4T9VeM 8Khk9Xc3I4jMfnHKSHBIfWTGzspZN55iYxoKyeiVJd0hpDt4fjW/gCFSn+R1Z+K52ZOPr+u+3fYlX 7J6oyfukWslNS1B5XuPvqU5ZZHe4r7CsJ37PVhW7rmrF/WcZoMfpb3wTh+f5lYLMM1BbXBF9UFLlB sYMc5NSw+mC6ySInLCiJhhc6ftAL2Clo9/LWVTt2q2hjT4bcwjNWnziutyIwttQkXbxEW1ZpM9XHo fn+M8smNAtmure+Os0HTsG9wJ5sKCQrwmuu2Eu4dTHjvjKBK2nRC+onshIs7BWaThusKD360naVIQ 2iJ2Gvqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EbN-0000000DNWa-0WOi; Thu, 17 Oct 2024 00:42:53 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9q-0000000DIIK-0r5l for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:27 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e035949cc4eso546584276.1 for ; Wed, 16 Oct 2024 17:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124065; x=1729728865; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=GcB5GtP5PER7P0fAo7i/I4FfsUt0WnKPhI2an5P5bXU=; b=dDSVhjbv4smt8OXeyKMI/4C9EM6mHoKP/LYzl1IpkzZ9lL1HE1mjczSeFZDjz1wb/D 362w2zz9OpvNohd8Srs9SvvujNWdi9wXhyG1Wq/7Ci7E0RAWkHpKG061PDMchz/drchu iANmE8fextlPoCou0sE3gXsxMsaQPtl+d+WZzwWnUUJAq+fc8iXtM4UZp4v2WcDhWseV XcOCyng1vZi5xz/6sdqxUoTS3kYQXT3SyUc9tkERN8xKOne4Kog7LqzL3Q5rt+ehIJB9 UlIg2mA1RdsFxZ9kIYuCsavC0z9VWssEOvLl5XRZekeKYTw7ESUxpUO5MkPsJ86xPJ3m PK2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124065; x=1729728865; 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=GcB5GtP5PER7P0fAo7i/I4FfsUt0WnKPhI2an5P5bXU=; b=BpFUMm7QL9N3BMnig0z/4gDels7Tc1TnXclD4jpe+uPBf1aeaelPmKJymh+sYRN/UI wYIeNhYBoOSvC9YeB6a14T92ZxwWacuFhJFeZ8AM9i4WGKKl9WIDc8xLF05T2GrJlf8l LPo3vLRgXgAVqfcPOBq0NBxey/HYlszS5OisgTbqIsJBBJXwjE1231pwDpNOYoxhkX// sThHTGeHHxj86K/hvs2GPNqdjQonyjiYL881MPKgpJegLXf8R+BG5XlsS49ObKEPGYrq UbYOvfizkx6b8I+3hCKfkAy79kiSE1SAPqhRDmuWFn5KXdW9HwSM28SP2OR4CKRHz/2K TYig== X-Forwarded-Encrypted: i=1; AJvYcCVqQXkv+VTM/pyMF6x57zWMSNmtjmJaSwjgY/2K1/vlnedRHXK+NhzZSZ6eLHtOKUjZFjAK34UWyP2/x+JgOoKG@lists.infradead.org X-Gm-Message-State: AOJu0Yy9eIrgBFlnI2Zc5N8yoXUZ26ZqGZMF6M759lgkiXCRYJZFJh3M TFpGiMGFJV2uQqWRrXOa0ywjHU4NCrS9SgRtnliihO3LiY9+52NSVvcmJTwhKczVt+9EivYGRwq WBmFu+A== X-Google-Smtp-Source: AGHT+IF84de8wETp+H+TNwpiCe/Wmym3lkGW+5hnYBUFbVDRkLRMCr2aUEvU33rn4tBcd8ME/lSYibr0Ec+J X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:b10e:0:b0:e0e:4841:3a7e with SMTP id 3f1490d57ef6-e2978555793mr6672276.7.1729124064807; Wed, 16 Oct 2024 17:14:24 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:52 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-10-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 09/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171426_295974_19BBE852 X-CRM114-Status: GOOD ( 19.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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/Documentation/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 6378811f2568..7dbcf8394f3d 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -466,9 +466,6 @@ else $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.157, disables dwarf support. Please install new elfutils-devel/libdw-dev) NO_LIBDW := 1 endif - else - CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT - CFLAGS += -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF 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 -#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT +#ifndef HAVE_DWARF_SUPPORT if (annotate.data_type) { pr_err("Error: Data type profiling is disabled due to missing DWARF support\n"); return -ENOTSUP; 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[] = { 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 36b344e39dd6..2251aa61ea53 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -1705,7 +1705,7 @@ int cmd_report(int argc, const char **argv) report.data_type = true; annotate_opts.annotate_src = false; -#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT +#ifndef HAVE_DWARF_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF support\n"); goto error; #endif 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)); } -#if defined(HAVE_DWARF_GETLOCATIONS_SUPPORT) || defined(HAVE_DWARF_CFI_SUPPORT) 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 nops) } return true; } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT || HAVE_DWARF_CFI_SUPPORT */ -#ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT /** * die_get_var_innermost_scope - Get innermost scope range of given variable DIE * @sp_die: a subprogram DIE @@ -1697,9 +1694,7 @@ void die_collect_global_vars(Dwarf_Die *cu_die, struct die_var_type **var_types) die_find_child(cu_die, __die_collect_global_vars_cb, (void *)var_types, &die_mem); } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ -#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 */ /* * 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 bd7505812569..892c8c5c23fc 100644 --- a/tools/perf/util/dwarf-aux.h +++ b/tools/perf/util/dwarf-aux.h @@ -9,7 +9,6 @@ #include #include #include -#include struct strbuf; @@ -157,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 *die_mem); -#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); @@ -177,58 +174,7 @@ void die_collect_vars(Dwarf_Die *sc_die, struct die_var_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); -#else /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ - -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 __maybe_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 __maybe_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_unused, - 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); -#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 b6775d3bdeac..8ea15a2a4397 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 = dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1); if (ret <= 0 || nops == 0) { pf->fb_ops = NULL; -#ifdef HAVE_DWARF_CFI_SUPPORT } else if (nops == 1 && pf->fb_ops[0].atom == DW_OP_call_frame_cfa && (pf->cfi_eh != NULL || pf->cfi_dbg != NULL)) { if ((dwarf_cfi_addrframe(pf->cfi_eh, pf->addr, &frame) != 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 */ } /* Call finder's callback handler */ @@ -1138,7 +1136,6 @@ static int debuginfo__find_probes(struct debuginfo *dbg, pf->machine = ehdr.e_machine; -#ifdef HAVE_DWARF_CFI_SUPPORT do { GElf_Shdr shdr; @@ -1148,7 +1145,6 @@ static int debuginfo__find_probes(struct debuginfo *dbg, pf->cfi_dbg = dwarf_getcfi(dbg->dbg); } while (0); -#endif /* HAVE_DWARF_CFI_SUPPORT */ ret = debuginfo__find_probe_location(dbg, pf); return ret; From patchwork Thu Oct 17 00:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04600D2F7DD for ; Thu, 17 Oct 2024 01:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1qh2zjK+x7XBUWzGHdV6OoNs12UKt+cT6XlR5rxtiUA=; b=vYWXG0Tc6bveOC5y2T5OWiMhXx 9CQa3xT9vAVdNN9cZEoQ70NkJCqbKa53qnPd4sI7+srXec52up5Sp4bQDJK3jxWSWOt6OpwUaEES7 JbLD7SxQ4uA76DM0Amp2i6YV+HAIRoZKuFdW9JSIEaWMRb1kl2S0C44QBb/yeMyCrP2sK0cUUyKFt qaVP5G+qEh4TTZCEG3eL55H6jEcE3CGVlmHAG4jjs08rkdM7435glQNTrdRc35lQCMyrL9yFsqyft Ru8IKrCwki92vqyjjWcfoWEyDa8RYMynGPD9ZMqlinS+hfSqCwxdy3Zcl5TxRJ+3JAYH3P5croYCE 1HBk6kUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1FaM-0000000DTGG-1kW4; Thu, 17 Oct 2024 01:45:54 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9t-0000000DIJa-0Pu5 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:31 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e290222fde4so519735276.1 for ; Wed, 16 Oct 2024 17:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124068; x=1729728868; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=1qh2zjK+x7XBUWzGHdV6OoNs12UKt+cT6XlR5rxtiUA=; b=SMS36TFtPfnQTTmcPihiaD+CkePksGHXeXSoc79Fvl06hwBjXX01J/YTZ45Ej129o6 2uK5T9hF1O/V+eHSV39eEXDZrCsCBCcM5BgDSAHE6fk4Fyfymv/sGe/Z41Vi1GP7/dCb LeY0LxkutD62cfgaTBRGR9jnriLSGC95XdmPaiVkHtnjACkv92oZt/Hs7AYod2uKSjcU gEPZDel8m9xo6NdOxoNI3sS03iyoffa1Ma9mvDVcViT0wuc57E1IziGqf5KT12/6Z5Y3 GoP6uITa+WwaJalQJ6HTXDofecPuIkJ/pX8781izHPbmByxlRRrgwg+0F25Av6Kt06RW 8ADw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124068; x=1729728868; 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=1qh2zjK+x7XBUWzGHdV6OoNs12UKt+cT6XlR5rxtiUA=; b=d033gJcLGGioB0d1MZLcQpnL0IWZ0ISwKmrPeTxceoqPO5mFiQ79cI0pMjWdM1f2v1 k2keW1m532+GBv2F1QqoOA7Rt/cNjiNYXg75GsUDhHAaqT72u9a8y4PHE7cEOJGY2CcE inykaJYSNcykaJQ0GKTIBHd6bneKJFGfgYT34lVybIylZ1hljdZhzKXB+1ycTJf445TZ nAZO2NZrHHHf5gi7Qze/vN9XFx8DkkkzQ323wxN1D9X/lX4R1jh37rBIwhc9pZrURLgv VuMLrm4UPMwtdES1T1X2DPe/Ip48Lhu1kXd7A0qDElGj9VzBVSr5morPw2T2sY5t7LV0 A6ig== X-Forwarded-Encrypted: i=1; AJvYcCVApEVFQZi/eAPpMRqFi2GxTiulqBY6Z+tfR494KcpK5J0m9nENHrTUkHoPUvvofTWVeXBT2JnUJGqHiPHwuP+l@lists.infradead.org X-Gm-Message-State: AOJu0YwCvLP62omE2RqxKmyPiEs/dZAu6+90GEQ2eGrdpRt4KInTXqt4 TYGi0BfIQPL2vmV8MccBDE7+A1iRQREL1oulg4DEnP0KmJ8e1ysoS1uZc7hhKdHDR0LFunz2Z7e uJEmRWQ== X-Google-Smtp-Source: AGHT+IHtAAWEjwLOSRrE8Z0h7hca1srTS54pxI+wryyHRm20lJxdMRhTmhsocAjNM1mA5T35yVe/pOVDJqw6 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:824f:0:b0:e29:b6d7:20e2 with SMTP id 3f1490d57ef6-e29b704e8e4mr4569276.0.1729124067417; Wed, 16 Oct 2024 17:14:27 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:53 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-11-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 10/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_171429_177924_B530CB62 X-CRM114-Status: GOOD ( 19.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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/Documentation/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 7dbcf8394f3d..d0ad2919983c 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -559,7 +559,7 @@ ifndef NO_LIBELF $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled) NO_LIBDW := 1 else - CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) + CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS += $(LIBDW_LDFLAGS) EXTLIBS += ${DWARFLIBS} $(call detected,CONFIG_DWARF) diff --git a/tools/perf/arch/powerpc/annotate/instructions.c b/tools/perf/arch/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_line *dl) * is moved to r31. update_insn_state_powerpc tracks these state * changes */ -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT static void update_insn_state_powerpc(struct type_state *state, struct data_loc_info *dloc, Dwarf_Die * cu_die __maybe_unused, struct disasm_line *dl) @@ -300,7 +300,7 @@ static void update_insn_state_powerpc(struct type_state *state, insn_offset, src->reg1, dst->reg1); pr_debug_type_name(&tsr->type, tsr->kind); } -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_unused) { 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; } -#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 -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT if (annotate.data_type) { pr_err("Error: Data type profiling is disabled due to missing DWARF support\n"); return -ENOTSUP; 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[] = { 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, /* Command option callbacks */ -#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 *filter) return ret; } -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #define PROBEDEF_STR \ "[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT [[NAME=]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 = 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 2251aa61ea53..45304ee5537c 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 = true; -#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"); @@ -1705,7 +1705,7 @@ int cmd_report(int argc, const char **argv) report.data_type = true; annotate_opts.annotate_src = false; -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF support\n"); goto error; #endif diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-data.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" -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "debuginfo.h" #endif @@ -165,7 +165,7 @@ struct annotated_data_stat { }; extern struct annotated_data_stat ann_data_stat; -#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, u64 addr, const char **var_name, int *var_offset); void pr_debug_type_name(Dwarf_Die *die, enum type_state_kind kind); -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ 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; } -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ #ifdef HAVE_SLANG_SUPPORT int hist_entry__annotate_data_tui(struct hist_entry *he, struct evsel *evsel, 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 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "dwarf-aux.h" @@ -25,7 +25,7 @@ void debuginfo__delete(struct debuginfo *dbg); int debuginfo__get_text_offset(struct debuginfo *dbg, Dwarf_Addr *offs, bool adjust_offset); -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ /* dummy debug information structure */ struct debuginfo { @@ -49,7 +49,7 @@ static inline int debuginfo__get_text_offset(struct debuginfo *dbg __maybe_unuse return -EINVAL; } -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ #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[] = { .memory_ref_char = '(', .imm_char = '$', }, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state = update_insn_state_x86, #endif }, { .name = "powerpc", .init = powerpc__annotate_init, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state = 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 @@ #include "map_symbol.h" -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "dwarf-aux.h" #endif @@ -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 @@ -499,7 +499,7 @@ jit_write_elf(int fd, uint64_t load_addr, const char *sym, shdr->sh_size = sizeof(bnote); shdr->sh_entsize = 0; -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT if (debug && nr_debug_entries) { retval = 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_size); -#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_debug_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 */ -#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); -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ 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 __maybe_unused, } #endif -#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_source __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 698a92875374..1e6628ebd25b 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; } -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT 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; } -#else /* !HAVE_DWARF_SUPPORT */ +#else /* !HAVE_LIBDW_SUPPORT */ static void debuginfo_cache__exit(void) { diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 5ced3b058fd8..dfcf8cdd9e8d 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] == '_'; } -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "dwarf-aux.h" #include "debuginfo.h" @@ -102,6 +102,6 @@ struct line_finder { int found; }; -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ #endif /*_PROBE_FINDER_H */ From patchwork Thu Oct 17 00:13:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839148 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09344D2F7D8 for ; Thu, 17 Oct 2024 00:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZdCPmUKkGrBwCDxgLym0jfSR0ZKu6+x5u848gg4O+mI=; b=VUcyUoQvnNBjGR2c3wT+xYJo8F tr9iODOW8Sf+vHfv38nrIvXTKurRa9tkv2fA6cL17PL+UhoF43Em4k5wrG7WR0XDeD/5IxVkzWY0S KmieQHO2DLI+BceGppFZVMsAkOII4+XkDz4tv8Vi06O6mE8jpBmL2Uwpos7WuiHP/i8nW6MlJQyio rkSebFRnkPH5e99HBmHbnUTa9v0hbge+iTivH28xRqqY3hwZPFaRo8ejOH2rh/cs7lLXhzuPGHDGs xhdi2awZOyn7+loMAruntGqEZVkh437CuIO2MgIb1oS8LzgqYwvcPqCv00FVPwAk3MUsBZeGihUGs axtNCT2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1EeF-0000000DO3Z-0OhU; Thu, 17 Oct 2024 00:45:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1EA0-0000000DIMT-1LHI for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Oct 2024 00:14:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZdCPmUKkGrBwCDxgLym0jfSR0ZKu6+x5u848gg4O+mI=; b=bRtkMTrnzLpHc7cKevnomB+qRp CDQvxVf/8l21qdfL/rWnIWSS5ZFch7YTt68NH2jXXuuGGpHUgyrmHKGWWD6Hkc2YKPlY5QaIwxXRm xBWoGMwqAGUJWp0/tT/XXysdRwU3d2xbXZ5AmhW7ewpXeFF7OPjyrmpVEohFBPFrQBGBpUHtJrcfD eKmq0N9pGOjC+tXCr0bVgGFzTTvbeeNlAjG3/kpdjknSBOeoxIGw/lX4jzFrCE4CgZxFGadc18JnO gzlLO1dYEi6ymekFHNGJVFbjbEiz1H+YKZzEIF3y32aAIFQM4H+uCWS7ekOcEtnaoAYrBuq7ANNuF GV85LTaA==; Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1E9x-00000006yCB-0S4l for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:14:35 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-6e2e4874925so8843927b3.1 for ; Wed, 16 Oct 2024 17:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124070; x=1729728870; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=ZdCPmUKkGrBwCDxgLym0jfSR0ZKu6+x5u848gg4O+mI=; b=OCERfXZUufKC4/2DfheTnECMrr3kCPBMy7uVTJeIIfCXx0g3uDyrdAvlvuk8fHUsdS aLC+8xrtaxvzzTQrnyVgGpCffx7TDpLHIa9JMXXWpPAaDmrFeSg/CSVgVdyAglinyXfZ CjkFC3QHIvDi8LMXj7em+06aOe1AkTRPWTQQ8FPCkqaciww6+AtfBBjhzz4bz8q5pAyY fkmS5hTHDN2raBooB+IXMDxIeNos4R1IIASiV/Hxvq+li3GvyntoT4PSYupRaOv76mP8 nVcO0Q3muQfBRSBf8jZbHnH6spdo4akKqTq13L10C6OHhsWMQlIKOWE+qsyxo68ruMbf bwag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124070; x=1729728870; 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=ZdCPmUKkGrBwCDxgLym0jfSR0ZKu6+x5u848gg4O+mI=; b=hZxmHpUcc1wG+n/BPgugxIxmBMQgmitFVAph+ggcGINudEqpMvSHZWLgCgYxqCG1Wv BAxYGYFm89SuvegcdRA0tAUKvyDN10nyDZLJADDO9hwuBN8gLLRZPc/1N5Wk81XI0xUb ubbEhO2yAr8Ln0OiWc97yMYJOruNJH7ty35JtmwXyJkVAoyVlOx37Em+LO18rvFHBz9j ltM3FoIowk4UDvuPBwMVcwRdEUo9riW9kP5Bil2zJVB5bcZnNnUskIYKK6D3iS0/UxlW A5bkrFaC/bdLlOGIQDn8yaFzb95JdOYph31A0CUnNAbsAyvQ/atmMtVpPZyfn881bWCS vQSw== X-Forwarded-Encrypted: i=1; AJvYcCWjhodmVWjcLk1fdj0Io8x/nIDrNl7loHWbXzCYw4/HfkRSMSnc5d8zFyvxj64pNk2cFDShEInAZwRhBJh9PETR@lists.infradead.org X-Gm-Message-State: AOJu0YzFEy4NMLQZ3iU7i4oQP+A+xK+2zZ0YIH04PFKG8xJjG7xk+Ob7 MlfC6u0ryV8zUGpCEjug3UPj/V+L03uGWZiXp4Adknsnji66GNrhvbZ0Bqx3T65bdmfN1npp+CA 5zAxSMw== X-Google-Smtp-Source: AGHT+IGmCqxqV/cR4e1mDBCmPDGgT/SSooHjQkQC219R9juE6phrOXnwsqdvmP6ECvOzFqzwnY8OkCCPIcef X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a05:690c:2502:b0:6e2:70e:e82e with SMTP id 00721157ae682-6e3d41cb4aamr1150577b3.6.1729124069686; Wed, 16 Oct 2024 17:14:29 -0700 (PDT) Date: Wed, 16 Oct 2024 17:13:54 -0700 In-Reply-To: <20241017001354.56973-1-irogers@google.com> Message-Id: <20241017001354.56973-12-irogers@google.com> Mime-Version: 1.0 References: <20241017001354.56973-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 11/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 , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_011433_458554_D7B2F901 X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 d0ad2919983c..b93ed2b7623f 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -562,7 +562,7 @@ ifndef NO_LIBELF CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS += $(LIBDW_LDFLAGS) EXTLIBS += ${DWARFLIBS} - $(call detected,CONFIG_DWARF) + $(call detected,CONFIG_LIBDW) endif # PERF_HAVE_DWARF_REGS endif # NO_LIBDW 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 += perf_regs.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += 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 += perf_regs.o perf-util-y += tsc.o perf-util-y += pmu.o perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o diff --git a/tools/perf/arch/csky/util/Build b/tools/perf/arch/csky/util/Build 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 += perf_regs.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o diff --git a/tools/perf/arch/loongarch/util/Build b/tools/perf/arch/loongarch/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 += header.o perf-util-y += perf_regs.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o diff --git a/tools/perf/arch/mips/util/Build b/tools/perf/arch/mips/util/Build 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 += perf_regs.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/util/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 += sym-handling.o perf-util-y += evsel.o perf-util-y += event.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o -perf-util-$(CONFIG_DWARF) += skip-callchain-idx.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += skip-callchain-idx.o perf-util-$(CONFIG_LIBUNWIND) += unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += 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 += perf_regs.o perf-util-y += header.o perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Build 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 += header.o perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o perf-util-y += perf_regs.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o perf-util-y += 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) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += 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) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += 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 += evsel.o perf-util-y += iostat.o perf-util-y += env.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o perf-util-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o diff --git a/tools/perf/arch/xtensa/util/Build b/tools/perf/arch/xtensa/util/Build index e813e618954b..2d1a48696ad9 100644 --- a/tools/perf/arch/xtensa/util/Build +++ b/tools/perf/arch/xtensa/util/Build @@ -1 +1 @@ -perf-$(CONFIG_DWARF) += dwarf-regs.o +perf-$(CONFIG_LIBDW) += dwarf-regs.o diff --git a/tools/perf/util/Build b/tools/perf/util/Build index fa508e113dd0..1eedead5f2f2 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -200,11 +200,11 @@ ifndef CONFIG_SETNS perf-util-y += setns.o endif -perf-util-$(CONFIG_DWARF) += probe-finder.o -perf-util-$(CONFIG_DWARF) += dwarf-aux.o -perf-util-$(CONFIG_DWARF) += dwarf-regs.o -perf-util-$(CONFIG_DWARF) += debuginfo.o -perf-util-$(CONFIG_DWARF) += annotate-data.o +perf-util-$(CONFIG_LIBDW) += probe-finder.o +perf-util-$(CONFIG_LIBDW) += dwarf-aux.o +perf-util-$(CONFIG_LIBDW) += dwarf-regs.o +perf-util-$(CONFIG_LIBDW) += debuginfo.o +perf-util-$(CONFIG_LIBDW) += annotate-data.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o @@ -235,7 +235,7 @@ perf-util-$(CONFIG_LIBLLVM) += llvm-c-helpers.o ifdef CONFIG_JITDUMP perf-util-$(CONFIG_LIBELF) += jitdump.o perf-util-$(CONFIG_LIBELF) += genelf.o -perf-util-$(CONFIG_DWARF) += genelf_debug.o +perf-util-$(CONFIG_LIBDW) += genelf_debug.o endif perf-util-y += perf-hooks.o