From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13C9E2905 for ; Thu, 17 Oct 2024 00:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124048; cv=none; b=UATdGwJ5+hPPNJxPsR2XMvMI0I8sd31nVi5e1AYI7EGV0BDHCYaddLYKcL/OzeITXopsLyi0HKTqyuDp1DwK5hMpLEljYev+rsrM0qPHTe1SmPlg/FyXSOeASgyF7U5aV+2C1EhXOOzX8XJkoPob/SI7EDY6G66vwoqQUHTtupI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124048; c=relaxed/simple; bh=EOP5l6y1kUpRzEu33igUG4tAL/TMJqk/jq6xRto8d7g=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=NAp31SWVpnoT/axBBNR8sOnrrkNeIE6Bd2tZOhOAVJ5otTXw+0+gNRheS/lXcTQoYQRi2LTXmZiGpFOJOXei1q22CZzN8SbCeNe2PdbdMmpXrr5iSM0Bk6D0Acd5N+kpu+bt2oXZkoBXbpuKlS7mcn2SqCRWUCrpo/lD4LIgcPw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YTuZwr5l; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YTuZwr5l" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e29716957d9so651968276.1 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=8Zgjnj0m5GCDK5RZDSEvmChYUUBqnb9Kjcf22Xw9GZo=; b=YTuZwr5ln2aetB1xztLNVhC6vLuiQXJ9CzX7ZpiUXM2LFAJzXsY+p9WRNIxV+HJLMt 4nEhLFJXtmH8WXW66NuvdUBemQ1xlsM3NioMgLlW5ODeev6SFSm24+1+cBZtJrnDiUcp yfbJUC5pOhPBPP6Gb0/KVdlyxdnRAq5ey7A7S9Oqy58ffvHXli4PHhkSm5Kvbgbyv601 kYtq1TzYWLLQJb8hTBG2Tw6qcNZqS0YtI4ua0xlH9jZz7FdCZmRjANBuiywLHGWrRrv0 HcJ3VJN9Y3YWoNcVr+0YbYk8iwWClr4RMTeQ8nsovQeyCr1kD+DWIxjn/N8LuyPqekXw ZA5g== 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=qAUS++gDGVeN6d9hDT6HEW9qP9trvT5adVlfZey93UcPBGOUe/FEC8BsQF+sV/Cl/L Sr3SqHmuQZrt/HM1L7aSJVKPTZeUYx0enNqk4NFvVLGaYooao33/UYJISNYOCjPRHYff R2egodGZ8ShDSI1hAjrcagnPn+D5lw1xL5ITbQDnjJ4ksEOHudsy0u5w7NKTVOZS7Esh 0yxEAJYokZPs1obs8MszcbXnrd836xcfp1SCrxTSrvBoEUpjrLg+ADLkMYl44odetRHI zDZw+PrPFWTkENlcBA7kGfDmPrv44umx9TsxBlJEXR0x74/6K9+37sNve3NtBSfAyOYw tOTA== X-Forwarded-Encrypted: i=1; AJvYcCVJ9yIJXfhchu96rsl3R8qOjvXEQTqgBbqu87qkkaIOVdV6IdFaY7R7wUjgiAPM6DFTWkpbeLhxDVL3ufY=@vger.kernel.org X-Gm-Message-State: AOJu0YxK7rHBKv3WD/4K3FKZH/uu1ROT/SpSKRBV0Du0sSf3Jncmz57b PO9ZTeul1jDNh751r4pZ5HIKVNeT311609WAItQ0Y8vVv5R5h9KOueoQa5mrquQ47VQOeXQkfok WAYJmwQ== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Acked-by: Namhyung Kim --- 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 +=3D -ldl endif +FEATURE_CHECK_CFLAGS-dwarf :=3D $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf_getlocations :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-dwarf_getcfi :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 # for linking with debug library, run like: # make DEBUG=3D1 LIBBABELTRACE_DIR=3D/opt/libbabeltrace/ --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 644A58C1E for ; Thu, 17 Oct 2024 00:14:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124051; cv=none; b=UYmcCls38D1xQ9lRr3a4pK+kzx2k2acV/tqyCzTDW2uf8po3/TcnRWmOqRK2ffu4CkLABBWguo1rAPi7fSvgIIbW28kzMnoXfQZnGbdO37uGvQJ4J1KUUGxnOqgcmT2baukGwyJ3WzcJXzeUGxUzdQvWRjcWmS8eLZ2n3eL8qKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124051; c=relaxed/simple; bh=lOqGJCnM71+Gsyi0UUhXOj+xkCdf5CDpasmBbB1O2po=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=PLqaKQP/sb9pVKQjH1p19/w1k6WLJzjUW7YZS6qCwpGdS8tJFuEWyAIlV4FADHR731cN2Q/evmHZxepiH1axNPaPA3vCIyfcJ12UB2wcrG8Ayb/7tiRYRc+V0/KzKJL9Rha+nHTRZfaubzqrYl8h7yx9xYomp4moAgv2gbVYMuE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NnTiJ43x; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NnTiJ43x" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e2a8355786dso648953276.2 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=GHSqjk9ZRfPn8FVBcSh8Ry5Cr0JpG8eM+bHfnQinYnA=; b=NnTiJ43xMr4J29/O6ahx2zQsCjeBAVGfx7Tk6djlUqMhc80qct7pvxrYixnQlHsTWT zNMBHQ6CHsbcWIeXJvTzGr78z8NX0pro/8DFCFDJQUUi/yxqMEByAdUK2A3i5vFV+QGa ITsaHlPp7/jldfRANoDksUuBX9wgBakTz8zile8aqb7dzCvhbDm09qD9XIlcbEE1c3Mr jPYx2iKyxdu2b6BI5ZBTLESHYOe0ZqbVl7O4/RGmtZnWbZGYQ4Wbj+vPbURZVo2y2Jc6 N+j0pwSxv+Wpv0bxISuhk82E2AjPQsFxY3XDh38fWXFnQeVAR/9zK3/DdYDOs0lMCeWI S7lA== 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=ivSx035qH8HzJR6dBx91JTqMM0cKt+Um5SgkQYsgysqVRFI21BZ/wDh8eGg1Wz4TRs Bv1BzokOT7klZwzb7YOVsXUjsBONiF6iksEg9K/Kqdr36Cog+TqA7Z8DUApaOJM9hhwi HRCUiKZ95moFCpUXFeC2kHix1Yy8/uzXNpKmkkmoTY4Gd2y6GM6duv2VNwa3lDLEW04U V7EOEYHv21Ip/fPT9rSek7x7HlNKcmzdH1iXeXcU3+bXYFjdkiqdgYgoSX2J9Vzl9/Gc j76S3SSUdyz9ihJttvSIzBB6+jriVVGlwF1zaN5OOiOve/lKQml7XW9cUzdY3uBWPJWf 8qEg== X-Forwarded-Encrypted: i=1; AJvYcCXSF/kShA/VwFij8lqkv+47O2M23sbHlmzwrywwljVkxqROaaaqfROpuhKx6Pd7pYKWuV1lMDbtuMMRXCg=@vger.kernel.org X-Gm-Message-State: AOJu0YySfur3G/wKjBnII4Bo1no2pFDR0EXbfe2RQljjREnoWXZmV7Ok AimcDRQn6QtPu2kJpJQiQhWQg5VcJbR7OlaxkDCD2AEnmsLkXnpvbDFFm0FmxdiuF9wjgrdSjME LIB/IIQ== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" NO_DWARF could mean more than NO_LIBDW support, in particular no libunwind support. Rename to be more intention revealing. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- 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 =20 ifdef NO_LIBELF - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 NO_LIBUNWIND :=3D 1 NO_LIBDW_DWARF_UNWIND :=3D 1 NO_LIBBPF :=3D 1 @@ -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 old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 endif else ifneq ($(feature-dwarf_getlocations), 1) @@ -499,7 +499,7 @@ ifeq ($(feature-libaio), 1) endif endif =20 -ifdef NO_DWARF +ifdef NO_LIBDW NO_LIBDW_DWARF_UNWIND :=3D 1 endif =20 @@ -577,17 +577,17 @@ ifndef NO_LIBELF endif endif =20 - ifndef NO_DWARF + ifndef NO_LIBDW ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) $(warning DWARF register mappings have not been defined for architec= ture $(SRCARCH), DWARF support disabled) - NO_DWARF :=3D 1 + NO_LIBDW :=3D 1 else CFLAGS +=3D -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} $(call detected,CONFIG_DWARF) endif # PERF_HAVE_DWARF_REGS - endif # NO_DWARF + endif # NO_LIBDW =20 ifndef NO_LIBBPF ifeq ($(feature-bpf), 1) @@ -636,7 +636,7 @@ ifdef PERF_HAVE_JITDUMP endif =20 ifeq ($(SRCARCH),powerpc) - ifndef NO_DWARF + ifndef NO_LIBDW CFLAGS +=3D -DHAVE_SKIP_CALLCHAIN_IDX endif endif diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 9dd2e8d3f3c9..a144bfaf8aeb 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -40,7 +40,7 @@ include ../scripts/utilities.mak # # Define EXTRA_PERFLIBS to pass extra libraries to PERFLIBS. # -# Define NO_DWARF if you do not want debug-info analysis feature at all. +# Define NO_LIBDW if you do not want debug-info analysis feature at all. # # Define WERROR=3D0 to disable treating any warnings as errors. # diff --git a/tools/perf/arch/arm/Makefile b/tools/perf/arch/arm/Makefile index 1d88fdab13bf..9b164d379548 100644 --- a/tools/perf/arch/arm/Makefile +++ b/tools/perf/arch/arm/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile index 5735ed4479bb..8a5ffbfe809f 100644 --- a/tools/perf/arch/arm64/Makefile +++ b/tools/perf/arch/arm64/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_JITDUMP :=3D 1 diff --git a/tools/perf/arch/csky/Makefile b/tools/perf/arch/csky/Makefile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/csky/Makefile +++ b/tools/perf/arch/csky/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/arch/loongarch/Makefile b/tools/perf/arch/loongarch= /Makefile index c89d6bb6b184..1cc5eb01f32b 100644 --- a/tools/perf/arch/loongarch/Makefile +++ b/tools/perf/arch/loongarch/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/mips/Makefile b/tools/perf/arch/mips/Makefile index cd0b011b3be5..733f7b76f52d 100644 --- a/tools/perf/arch/mips/Makefile +++ b/tools/perf/arch/mips/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Mak= efile index bf6d323574f6..7672d555f6cd 100644 --- a/tools/perf/arch/powerpc/Makefile +++ b/tools/perf/arch/powerpc/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/riscv/Makefile b/tools/perf/arch/riscv/Makefile index 90c3c476a242..4664a78a1afd 100644 --- a/tools/perf/arch/riscv/Makefile +++ b/tools/perf/arch/riscv/Makefile @@ -1,4 +1,4 @@ -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET :=3D 1 diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile index 56994e63b43a..3f66e2ede3f7 100644 --- a/tools/perf/arch/s390/Makefile +++ b/tools/perf/arch/s390/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 diff --git a/tools/perf/arch/sh/Makefile b/tools/perf/arch/sh/Makefile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/sh/Makefile +++ b/tools/perf/arch/sh/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/arch/sparc/Makefile b/tools/perf/arch/sparc/Makefile index 4031db72ba71..7741184894c8 100644 --- a/tools/perf/arch/sparc/Makefile +++ b/tools/perf/arch/sparc/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif =20 diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile index 67b4969a6738..9aa58acb5564 100644 --- a/tools/perf/arch/x86/Makefile +++ b/tools/perf/arch/x86/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif HAVE_KVM_STAT_SUPPORT :=3D 1 diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makef= ile index 88c08eed9c7b..119b06a64bed 100644 --- a/tools/perf/arch/xtensa/Makefile +++ b/tools/perf/arch/xtensa/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_DWARF +ifndef NO_LIBDW PERF_HAVE_DWARF_REGS :=3D 1 endif diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 003a3bcebfdf..91672bb3047c 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -616,7 +616,7 @@ __cmd_probe(int argc, const char **argv) set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); #else -# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_DWARF= =3D1", c) +# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_LIBDW= =3D1", c) set_nobuild('L', "line", false); set_nobuild('V', "vars", false); set_nobuild('\0', "externs", false); --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E33B6F9E8 for ; Thu, 17 Oct 2024 00:14:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124054; cv=none; b=RS1GN1s0c7hLS81icszxZ56A1nkpOLewEGnazxV5QJvzL0X64o9udGZ/KoB0rks3ReVFCJgeW6Y6OdHavjsP76ONefyN+3yFHjPKNQbKXWwrh/PJVm6KHJw4r/4w+aCNEM+j0rLHnyx2s3ux7iyS3hEQXUIonkonhX9XpcUjnGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124054; c=relaxed/simple; bh=N/FNDdzSnGn6rfbPuY7fZE8oRTOSouL1X1kHuL97eWg=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=rqOMF4rqL+EJ85uK9m0wyS/GZ/z9fMno2XWW5cTb2wuj0n4/OCN7lEVKpJ0tVY5Q6sHv0yDUOBYgifOoFBwiQlZnpnJpytTK6fTNRrDElOe3yDWPZKoMMWos4wIM+Sj4IrXUd7xpCkYWvWVBnbtbxmLSEUD4CafpxY2PVqnAWPg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Zp6MW2rx; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Zp6MW2rx" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e035949cc4eso546419276.1 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Vpg7UjVbvMTf2T5M8RY79W0YJsjIkpvO45Q8v0jMOdQ=; b=Zp6MW2rxNPZM1Y41dj1VoDB4MvuHTrhRSjQDsALG5unIbRmG3sqVM7mpfuT0D28UT8 SYrPC02sH49eGX7sJ5GHmjbbkNi4WWzTe470fi4YounBPlcBKUMzNOg5UgNL7ZPCn5Ur 4mUmzIg8I/3Thi25a83RfwtTcV8w7ErVkKhAxGmc3YrEMcEzHdX5saAMnHEk4VxUu39p dG+hQGgFMoBKQveYgj4w9vvJsRm2eifkS6ABpZaAijOPOeN9FXJYyp36WnHY4NDdlGyB glGqD8Kxse4GuDSaWuqj49QEVEHVep0nKs5wIeMs4sdOvIFxsV8D2ECkM5JNtuZjPNLQ SydQ== 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=CMOZ2QNp52VytzFHKPvn0Zb+QvBYKd8opRr/X4bcilOzXzZBxj3hwKVi6m1S8EjKcG cd2o+Ux+fkPdXFEvzgiQhF4FZTNEHbXkuLAMAmSyn7U2jh+MepnFxYToxuO1UPOg05t6 2tCqSrtsoM9jaEq+9PAdyCrqxPB5olc5hF7lemz4wTB1Oi0dnivuwgOyEdTCuGnhQTS6 TprrKp/MAe/f/b3LQxKgqJGZeraZbYEuiw/CL4taJQw75PmycRUCcprTZEE58a1Bzokg a+/FYyfOsYOCQuztF+imm5ArdeniUewEOXsxPGC8Ac6xSkRX3pqJtcCv6mVi5DKdNMJv xeVw== X-Forwarded-Encrypted: i=1; AJvYcCVeE1IpvF8qDot6aMLIYe6NpebCxzx64N79LS+YExrMEBaKleZ4H3DJG9YdxnStO+2GeOMdOThmhXof+tk=@vger.kernel.org X-Gm-Message-State: AOJu0YwTNhrvWtE0hivqzB80c++P4VbMvZuLPVgOsZt88ADTd1bYmwGT 7Hi3e+w7iTJltbL1wb6UeTago/urOsaamfIFTh35H4ZivojPZxcCRUQxNRON2sE6QC2uG75pElD M/wfPMQ== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Previously NO_DWARF_UNWIND was part of conditional compilation but it is now unused so remove. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- 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 +=3D -DHAVE_DWARF_UNWIND_SUPPORT $(call detected,CONFIG_DWARF_UNWIND) -else - NO_DWARF_UNWIND :=3D 1 endif =20 ifndef NO_LOCAL_LIBUNWIND --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23B3B8488 for ; Thu, 17 Oct 2024 00:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124056; cv=none; b=ZocDjayOQw67Yzmf9XGoEtLR1VCXFZHYVlNhh2bAoZt4WtIBiywJ9U93XIJ9j+KxLO0QsEJssaM/uX2oTnmWz5weDGezOntV8WQxPl/MPCM8UoMM8H5+PaT2qqCtvezyypc1aPvVNV/CEVehw7lzgEWK+/njpdG+0BHEdJdTmdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124056; c=relaxed/simple; bh=O0SufrLYyv6P+q8PwNmwPDGHg2Zc8tfEsXP2c513YrI=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=WmM6ei1QfYRIh/U67M8JrADS8z3ZA0dDVvDA8YG4hYPwLxMjQXi052djDYjzXXWEoCKZMH6LGPxTfkaoWAt7u1/Rqy4H73k2QY61+e8kx22kmRgH09ZYFCdy+uDf/YhBXZ+kJYbdvZDkl3SA+3nQ3ik9X6pj7lAApAYLZ/AbpM8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=N92MC3Pm; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="N92MC3Pm" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e290947f6f8so680791276.2 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=gv4rC21EH5vKyMLFGXp6RuMwHEpZG+2xqNlyQiSYUJM=; b=N92MC3Pmm1V9C3LHf0IP0V32oyX8yX+V62NsFCfbhGx/y/MCk+edPaUF3VdeY+kror uN+GrldLsOrbLzOiJGhHl6UX4iVLDU/WjgqgIin1wUO0q5CW78PRzNLwtDUlS1rj2Vkf BvO7v2kO1rP3blPUpZ7cF2j0UOZ5AvX2OHxb0kxkCTHG3CRhQBZKznxgiqy31bvPLCHe T3WDyNfoqpRSPBBBnM366UxVJhDN8TJeUKxF6QqfoaoHbvIWMkEqcDYdZ2dDKc3bHGU6 R1JP9RrW44/27pQI/sIJkCUegskC6xhFZp1LfS3XDhw5fAODT2djtS8muTJLqeUmm9rp AFbg== 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=afLgOHK+vWXvfc02ll3n/FnhPxqFtwz0VNHXmAxXUBRhuO0ALG67mJhUGxypKskg2Z FVSPridmt/NKvhPzJ4/r3R4t4i3QHWHXuS53mpMwjwcS1JknmGw3r0XmVHY9ODq0tIxS NZO9zjZFZUGxasU206qgMCwXVwgWRU5P95lD1/pzky2oN4UMaNBOtTIUZ8MpjE497257 VEG1Af6Aci6Z4LNp02r+EmdQj+8arCby3W5t7iVpkAAtlCC6uS0Fz/hBpkmiRgOjir40 +QZZUjtiivc/Hox8112xEtICvlTvUgRCODxb7FqhxCrXh7QLNNTe7G4sBMpYDiv/Yp67 r7dQ== X-Forwarded-Encrypted: i=1; AJvYcCX0L1saBO5nEOfrMwR7TVKtaUtPGOA8JAMKrms79QeQZPwChrI7u0TJOgI/YMDZcP+x22ybCHkJN6h48wY=@vger.kernel.org X-Gm-Message-State: AOJu0YziNJwU9WeLwiMOiWEzo7av1EdbJOY1evgRxPbtGJY8ZC5VPzLU um/xzB7C4uvBSvGNeXseKpKL/gNa6SVqUAGjATxvadXnq4slDmcK2IQEfsPxBFrJrvfaowhZ9C/ RJBi3kQ== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Be more intention revealing that the dwarf test is actually testing for libdw support. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/build/Makefile.feature | 6 +++--- tools/build/feature/Makefile | 16 ++++++++-------- tools/build/feature/test-all.c | 6 +++--- .../build/feature/{test-dwarf.c =3D> test-libdw.c} | 0 tools/perf/Makefile.config | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) rename tools/build/feature/{test-dwarf.c =3D> test-libdw.c} (100%) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index ffd117135094..6025810cc346 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -30,7 +30,7 @@ endef # FEATURE_TESTS_BASIC :=3D \ backtrace \ - dwarf \ + libdw \ dwarf_getlocations \ dwarf_getcfi \ eventfd \ @@ -120,7 +120,7 @@ ifeq ($(FEATURE_TESTS),all) endif =20 FEATURE_DISPLAY ?=3D \ - dwarf \ + libdw \ dwarf_getlocations \ glibc \ libbfd \ @@ -233,7 +233,7 @@ endef =20 # # generates feature value assignment for name, like: -# $(call feature_assign,dwarf) =3D=3D feature-dwarf=3D1 +# $(call feature_assign,libdw) =3D=3D feature-libdw=3D1 # feature_assign =3D feature-$(1)=3D$(feature-$(1)) =20 diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 1658596188bf..7a1c028ce40b 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -5,7 +5,7 @@ FILES=3D \ test-all.bin \ test-backtrace.bin \ test-bionic.bin \ - test-dwarf.bin \ + test-libdw.bin \ test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ @@ -168,9 +168,9 @@ $(OUTPUT)test-libopencsd.bin: $(BUILD) # -lopencsd_c_api -lopencsd provided by # $(FEATURE_CHECK_LDFLAGS-libopencsd) =20 -DWARFLIBS :=3D -ldw +DWLIBS :=3D -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS +=3D -lelf -lz -llzma -lbz2 -lzstd + DWLIBS +=3D -lelf -lz -llzma -lbz2 -lzstd =20 LIBDW_VERSION :=3D $(shell $(PKG_CONFIG) --modversion libdw).0.0 LIBDW_VERSION_1 :=3D $(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 +=3D -lebl + DWLIBS +=3D -lebl endif =20 # Must put -ldl after -lebl for dependency DWARFLIBS +=3D -ldl endif =20 -$(OUTPUT)test-dwarf.bin: - $(BUILD) $(DWARFLIBS) +$(OUTPUT)test-libdw.bin: + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) =20 $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 6f4bf386a3b5..d60e072b6eca 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -38,8 +38,8 @@ # include "test-glibc.c" #undef main =20 -#define main main_test_dwarf -# include "test-dwarf.c" +#define main main_test_libdw +# include "test-libdw.c" #undef main =20 #define main main_test_dwarf_getlocations @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) main_test_get_current_dir_name(); main_test_gettid(); main_test_glibc(); - main_test_dwarf(); + main_test_libdw(); main_test_dwarf_getlocations(); main_test_eventfd(); main_test_libelf_getphdrnum(); diff --git a/tools/build/feature/test-dwarf.c b/tools/build/feature/test-li= bdw.c similarity index 100% rename from tools/build/feature/test-dwarf.c rename to tools/build/feature/test-libdw.c diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 +=3D -ldl endif -FEATURE_CHECK_CFLAGS-dwarf :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) @@ -473,7 +473,7 @@ else $(warning No libdw DWARF unwind found, Please install elfutils-dev= el/libdw-dev >=3D 0.158 and/or set LIBDW_DIR) endif endif - ifneq ($(feature-dwarf), 1) + ifneq ($(feature-libdw), 1) ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D836184D for ; Thu, 17 Oct 2024 00:14:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124057; cv=none; b=MkXGbvJtfTS1dKg2gw5cZ59w+s0P5aAjCoAYRzYj970yaP4h8zn9GikMVrDnxPEfdBHhTltrj+R0S4dIsO5WQ9laTZIdPdRjH7ba2jmsthLk2PHLt5MJ9Us23OgfjPL4X+XlrOY236JL7wnBt75VGQe8BaLgnDa68P4d2vecQ54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124057; c=relaxed/simple; bh=zMh1r3eChZPJViKMzZCqXcyAQ/CCQmSa02OcG8ZRigk=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=JlIoukiv2NHX/Jzv3V+DzYky0d1qdiI51WbBP7fF7lolJNBCdR+ZHQSbyUd+2OSEVvg6byPW8IYezgiZwGjGDAvYvEKULz1SpZ6Az+/wTzBcpkdhMbAwg+sqEV2vjuUdt5mUqeOhD9dWFiJz4ynCJQGd1FP1GtD6Gz9LewqIt+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=zBTDDswo; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zBTDDswo" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e28edea9af6so595728276.3 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=XruooYYEp4qZm36/rBHba0zUOpJtUJVrKsk9Et8lqQs=; b=zBTDDswoVJXHnLKlSnDx7/jvuebLgDH/IoBkxNlZ5GkXK9ndEGy6zJjVfWVdWcjI6X NuCu/Hsrr1R+fIiIAdVhLPT22t+cPbdmbsWU4X35Zhk5wLVzb5L95o96dgkKLw3NQhDm MlLl8oL92J0/kgXBoXJVWduUvRXTqKjMhM32viPflN3LCbDjYdAwxiG5YL0gGosaOIeO d3idkkBhj/qBrDnEbDuQJDlTg1WkRetsRu/rWN6MBn2goySefyaDZITsk1ryPXnDWzEA 6hpgfeKn7WghHxoJ11hF59n3WbDj1Aa8Y0W/oH8LwOSAzDNjRd7xwH2D4QvYoQ5vOVr/ ZsRQ== 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=hwz0+i+3wYkjsMyaVdpamFW6sW5BeLki+R5duY0ZjqgIk4EwEjROPxgazzRQP0yxhI NjfsfzEPO5YDbXbi58HWgdASyKshK5CPEJbhJBXY7VghKPq3wYQRErlwe5NpALbdBcR5 BgBUT2rj/sYy1zO1zvJNI6wfhcqVHiQXZL4VDX3CKnep9rM3Ca44ljk0mESWBEtdlIT2 gFt0kAJYABZyPkHOnQeFyMXvsx/G0B7fXVJaHHuasJJrpx2xV5+WX7pPjJJgY6ay7Z5w 35JKgndt520kaCDtXhfX12e3GtPVA+diyouTOWasrjL48/ELJpnNVvFKwKayge0aUhq+ zjLQ== X-Forwarded-Encrypted: i=1; AJvYcCUBsCZoNSmFbB/YjHhrPx95iW7b7V9kuzxwO42xbC3QvM0oZJjTgkTtrSZNt6QdQ9+SqqoyHb3fsrzjKgY=@vger.kernel.org X-Gm-Message-State: AOJu0YwJ0Jiw3ut5WUD3EzCW549MQ5XlN69PwmZVOOmgNC9a73ef1Kt7 iXdM4afar2CVD3e7NjnzQVpBMLSjmIH3FzMw7WZVIE3zyssO/I+RW4iQC1P9aQUrP5ZsZV++rMT uaCl8NA== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Support in libdw has been present for 10 years so let's simplify the build logic with a single feature test. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 4 ---- tools/build/feature/test-all.c | 5 ----- tools/build/feature/test-libdw-dwarf-unwind.c | 14 -------------- tools/build/feature/test-libdw.c | 19 ++++++++++++++++++- tools/perf/Makefile.config | 8 -------- 6 files changed, 18 insertions(+), 34 deletions(-) delete mode 100644 tools/build/feature/test-libdw-dwarf-unwind.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 6025810cc346..db3695ec5f83 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -60,7 +60,6 @@ FEATURE_TESTS_BASIC :=3D \ reallocarray \ stackprotector-all \ timerfd \ - libdw-dwarf-unwind \ zlib \ lzma \ get_cpuid \ @@ -133,7 +132,6 @@ FEATURE_DISPLAY ?=3D \ libpython \ libcrypto \ libunwind \ - libdw-dwarf-unwind \ libcapstone \ llvm-perf \ zlib \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 7a1c028ce40b..18f8fef5e843 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -52,7 +52,6 @@ FILES=3D \ test-pthread-barrier.bin \ test-stackprotector-all.bin \ test-timerfd.bin \ - test-libdw-dwarf-unwind.bin \ test-libbabeltrace.bin \ test-libcapstone.bin \ test-compile-32.bin \ @@ -317,9 +316,6 @@ $(OUTPUT)test-backtrace.bin: $(OUTPUT)test-timerfd.bin: $(BUILD) =20 -$(OUTPUT)test-libdw-dwarf-unwind.bin: - $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind) - $(OUTPUT)test-libbabeltrace.bin: $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) =20 diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index d60e072b6eca..863c82516433 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -98,10 +98,6 @@ # include "test-stackprotector-all.c" #undef main =20 -#define main main_test_libdw_dwarf_unwind -# include "test-libdw-dwarf-unwind.c" -#undef main - #define main main_test_zlib # include "test-zlib.c" #undef main @@ -202,7 +198,6 @@ int main(int argc, char *argv[]) main_test_numa_num_possible_cpus(); main_test_timerfd(); main_test_stackprotector_all(); - main_test_libdw_dwarf_unwind(); main_test_zlib(); main_test_pthread_attr_setaffinity_np(); main_test_pthread_barrier(); diff --git a/tools/build/feature/test-libdw-dwarf-unwind.c b/tools/build/fe= ature/test-libdw-dwarf-unwind.c deleted file mode 100644 index ed03d9505609..000000000000 --- a/tools/build/feature/test-libdw-dwarf-unwind.c +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 - -#include - -int main(void) -{ - /* - * This function is guarded via: __nonnull_attribute__ (1, 2). - * Passing '1' as arguments value. This code is never executed, - * only compiled. - */ - dwfl_thread_getframes((void *) 1, (void *) 1, NULL); - return 0; -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 8d474bd7371b..793f4ac49514 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -1,11 +1,28 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include =20 -int main(void) +int test_libdw(void) { Dwarf *dbg =3D dwarf_begin(0, DWARF_C_READ); =20 return (long)dbg; } + +int test_libdw_unwind(void) +{ + /* + * This function is guarded via: __nonnull_attribute__ (1, 2). + * Passing '1' as arguments value. This code is never executed, + * only compiled. + */ + dwfl_thread_getframes((void *) 1, (void *) 1, NULL); + return 0; +} + +int main(void) +{ + return test_libdw() + test_libdw_unwind(); +} diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getlocations :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) @@ -467,12 +465,6 @@ else endif endif else - ifndef NO_LIBDW_DWARF_UNWIND - ifneq ($(feature-libdw-dwarf-unwind),1) - NO_LIBDW_DWARF_UNWIND :=3D 1 - $(warning No libdw DWARF unwind found, Please install elfutils-dev= el/libdw-dev >=3D 0.158 and/or set LIBDW_DIR) - endif - endif ifneq ($(feature-libdw), 1) ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9B2C1E535 for ; Thu, 17 Oct 2024 00:14:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124060; cv=none; b=TSyXRMQqgvxd/fo2zuJOnfM7Nmo+KE1fcfo5rTIIYbUhiNL87uT+dyIgTvXApJhOfKH2Ygiv7qhAFGYKzlGHP4G0k7/fc90nN24DLPiz+AvlkADsZb+o06Ln3T7pGBUk9dP1XM1quTab6V7iunPXUFNQKa0o54dUlfqN8lrNfM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124060; c=relaxed/simple; bh=c+RNSVrajXZbL2PxHVupjZCGKA40ZynQd8s2vT+EMco=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=IcxZFpMI66jYyD/q0twm6Ie8NQtn2xsRiv48FZRUcN+kInFAA8GX8OynCUtlyaAnv+C+xcmCGkE6jQO/5j8oa6W6UOptNjReiOuy6VYjR3wcyrBxSLvUj5a8f5d2Xhyer0PAyBIvCBRwOm7Pqr2UaqKCKRgVwpjhs9lxkVjPXiA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=0hF1Sun9; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="0hF1Sun9" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e35199eb2bso8878227b3.3 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=G7WUOc/nN0htnP5Qn5PJQ6QB/5aNVItHGUNec9g68b8=; b=0hF1Sun9l3gutvWRri0ZfUF9yuO235VGcvITOCKE9KdGU+cv3XxYp0++etJq8PsnSI FcBLJbB86steAHNgaLOMG9QlD/Z/79rRspRln5M9DzjAhThxLR5c6Srix5S4xs3JrZMO DE4sHKAGSBKWKZEPeVPdqnjdi600PIHIeTau1ADf0to0442jTLiIIpCVrFtxS2qj+Oz0 95X6T6pbfdospzRHwLd+uzD54GoQge6rUsLAzXwhyCsDJA0Rhvx0pPwULqBtlbiVJ1aY 3t3yvCu/fS/19+Aa/Fdz5GUTtEia3B+Afz0ht9FC2CFNx445/+/x0cRBAi1I/wEkzbzf MpnQ== 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=Xh41u4yHzVMTcVhbbg3oEGdt+23KfKo/jrqRsqyhcWF7V4Hr0GKm57+4N8sShZ7CJC CV7gGubL1XyuzDjW8yJ6e4Z0CHeX8as6sJWxZc50udHeY5M9pnNyShQWs6HnxyuOY/BR OFz4p/YZVgpSDyTx48G0/JoPr4S2l1JgqPs5/+Tyt8bDlr5EGaQy1GUfT62mYG1IhrJC WPK6y40AdiSER6Q7Sntuqx0MYjx/LojYCRqVwNBGPbgjxKkJzbYnyhgOIAODai1eK3ub xKp3O6jBJt7WE+AYXvBvBxhlXhAMktFpOjeVjs6nDusoPvfn6oQaIwZkquK+/bLHdJPX 5E0w== X-Forwarded-Encrypted: i=1; AJvYcCXsFLAywx355nubEe/8hx+CfnkEeWRIRjE4d14REOCsI/OfabiISeQUhx6XcR2llqOQDb6+G1n3HUaMDh8=@vger.kernel.org X-Gm-Message-State: AOJu0YxJkzXJRu1QjgGev7f9cj5Ncbw1xUE1k/TN1oJ9kYQJWBt7nECA Dy79ImWNEOo1VCbz6MtLqM9rx8XnKNF0MuLy8TtYKWgRfwktxRSTEXx8vAWFnq44cf19MbZrtEb pc7mEEA== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dwarf_getlocations support in libdw is more than 10 years old. Make libdw imply dwarf_getlocations support and simplify build logic. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 4 ---- tools/build/feature/test-all.c | 5 ----- tools/build/feature/test-dwarf_getlocations.c | 13 ------------- tools/build/feature/test-libdw.c | 14 +++++++++++++- tools/perf/Makefile.config | 10 ++-------- 6 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 tools/build/feature/test-dwarf_getlocations.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index db3695ec5f83..cf6a967575ea 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -31,7 +31,6 @@ endef FEATURE_TESTS_BASIC :=3D \ backtrace \ libdw \ - dwarf_getlocations \ dwarf_getcfi \ eventfd \ fortify-source \ @@ -120,7 +119,6 @@ endif =20 FEATURE_DISPLAY ?=3D \ libdw \ - dwarf_getlocations \ glibc \ libbfd \ libbfd-buildid \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 18f8fef5e843..0af3e0255fed 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES=3D \ test-backtrace.bin \ test-bionic.bin \ test-libdw.bin \ - test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ test-fortify-source.bin \ @@ -188,9 +187,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) =20 -$(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-dwarf_getcfi.bin: $(BUILD) $(DWLIBS) =20 diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 863c82516433..59ef3d7fe6a4 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -42,10 +42,6 @@ # include "test-libdw.c" #undef main =20 -#define main main_test_dwarf_getlocations -# include "test-dwarf_getlocations.c" -#undef main - #define main main_test_eventfd # include "test-eventfd.c" #undef main @@ -184,7 +180,6 @@ int main(int argc, char *argv[]) main_test_gettid(); main_test_glibc(); main_test_libdw(); - main_test_dwarf_getlocations(); main_test_eventfd(); main_test_libelf_getphdrnum(); main_test_libelf_gelf_getnote(); diff --git a/tools/build/feature/test-dwarf_getlocations.c b/tools/build/fe= ature/test-dwarf_getlocations.c deleted file mode 100644 index 78fb4a1fa68c..000000000000 --- a/tools/build/feature/test-dwarf_getlocations.c +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include - -int main(void) -{ - Dwarf_Addr base, start, end; - Dwarf_Attribute attr; - Dwarf_Op *op; - size_t nops; - ptrdiff_t offset =3D 0; - return (int)dwarf_getlocations(&attr, offset, &base, &start, &end,= &op, &nops); -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 793f4ac49514..83ea5d5f235d 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include @@ -22,7 +23,18 @@ int test_libdw_unwind(void) return 0; } =20 +int test_libdw_getlocations(void) +{ + Dwarf_Addr base, start, end; + Dwarf_Attribute attr; + Dwarf_Op *op; + size_t nops; + ptrdiff_t offset =3D 0; + + return (int)dwarf_getlocations(&attr, offset, &base, &start, &end, &op, &= nops); +} + int main(void) { - return test_libdw() + test_libdw_unwind(); + return test_libdw() + test_libdw_unwind() + test_libdw_getlocations(); } diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getlocations :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getlocations :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-dwarf_getcfi :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 @@ -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 old= er than 0.138, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) + $(warning No libdw.h found or old libdw.h found or elfutils is old= er than 0.157, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 endif else - ifneq ($(feature-dwarf_getlocations), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.157) - else - CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - endif # dwarf_getlocations + CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT ifneq ($(feature-dwarf_getcfi), 1) $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.142) else --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BB6F538A for ; Thu, 17 Oct 2024 00:14:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124062; cv=none; b=ZBZQJSekv14P8aesK+V+3rFs1zB3bapfzcja2IKODB3j4rhMi5xtSjADzjcWDMAg+KSbQj0YcbzfNRNOjAfB/KhnCtGyZ9r+yH1Xv2BNTS0ty3QzMbswHvxfl/sKWCRdP+wCzmaOyF6tHlJhnHkKBm4W/pf1wSLepXA+fPML7ew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124062; c=relaxed/simple; bh=P0Gp28BkMYlC/A7gXQDsJFdIHzwBEhHd5H8cstYec9E=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=d5fUce7n6p/fgO9O7fzW4cXa+UODTTLri7rtnwS2xglWtKkx3aBTgTONVo9/rJbsOGXsJl76A+wGMgq5TTKQ0Oh0wtvRbgAZ+90eHQYX5IDCwv39APbrMlnd7ERLCmySMlSdoLN8pFaH65HEC9AUImAvAjypQ5xxty7sfdV9M+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RcCveLKS; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RcCveLKS" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e28edea9af6so595811276.3 for ; Wed, 16 Oct 2024 17:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124060; x=1729728860; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Tad0E7gcGFVieZCra5vDET9AmRJVsC8ZllrVS3JLUH0=; b=RcCveLKS+p5TDdzfYCp6NC8DtwV2A2S4w1uvXboxEy9HshglDB7YuGXGYBPlZoSutM 5gc/Q+D4XikKNRfVo1IYs+eL5V3PEq8aw0upxB03GNAL9reA5//uDusJUCvAbeUWeT4L n/4JXoDchwHFL5F+UVW4uoqA54I8vB7WqcD+CJZXNDRDf4tjaMmRY7q7iQ+/GVPmKVPI IrlFeSvlF5ptfr+8XUUW7zttx+w+0/6Ncn3EIGoZQUvcZ4WNz/mrbXfS+cXwJkfFYzMp HNUfKOV7rDpA2PEeqmCY32vDkGQ2UAqEVwj6fthjojSr1kb2YnOZ7HB51WdsGrkv09Ku QFEA== 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=FzP7V/91DwtPesdCuJCRXZFSYfSo7kMZForEbkTJRzVu2O6K1wKBzLP8r5JZXbQxmC IucHI/cvYRysXXauX9f8VvTC+2Io/xwnXE8ftPhVuTJRBl0CnVjpctwLup1QBLHVwK0/ tSRSGtTQF9Is1aTkt8lT8AEPrnBv8DnqdAJTrW3uufaq7pBu9gavSxDC3seYyH7VwR5K FoOEFGhx0Z9ULBUg0ZRAyiH4OERleaiM6dOVg0jvgzU5rQTm4FsxqzWUqHqPdby0LfSm mIlhYqy1/HdTD/2rwyI2BT+6R21Q6+nGTYPzRsKkVp06tljkPBo+gl0D3kZPkZ51etuF 9EiQ== X-Forwarded-Encrypted: i=1; AJvYcCULt5Ccm1Wt3tr5NOj2HbEkpESAtPpWGtq0Z9xP3jr5060GFf5LDeYfyzrFDdCPhDIAnhQgkl8QJugWRrs=@vger.kernel.org X-Gm-Message-State: AOJu0YxlhFpvr7tYzCzRYM6W9qUa8tBHKRu/6NnrRmPHAk1sJQPQ9q9I HtrVru8WNowG1N5xBybtm03NMcy3jNNoaz+LL/Je6guSB2bu+smid72yPvtDfDG39ay6FqGcc/z XmNopXg== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dwarf_getcfi support in libdw is 15 years old. Make libdw imply dwarf_getcfi support and simplify build logic. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/build/Makefile.feature | 1 - tools/build/feature/Makefile | 4 ---- tools/build/feature/test-dwarf_getcfi.c | 9 --------- tools/build/feature/test-libdw.c | 10 +++++++++- tools/perf/Makefile.config | 8 +------- 5 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 tools/build/feature/test-dwarf_getcfi.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index cf6a967575ea..ef72aae3dd49 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -31,7 +31,6 @@ endef FEATURE_TESTS_BASIC :=3D \ backtrace \ libdw \ - dwarf_getcfi \ eventfd \ fortify-source \ get_current_dir_name \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 0af3e0255fed..d28ad7672a27 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -6,7 +6,6 @@ FILES=3D \ test-backtrace.bin \ test-bionic.bin \ test-libdw.bin \ - test-dwarf_getcfi.bin \ test-eventfd.bin \ test-fortify-source.bin \ test-get_current_dir_name.bin \ @@ -187,9 +186,6 @@ endif $(OUTPUT)test-libdw.bin: $(BUILD) $(DWLIBS) =20 -$(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWLIBS) - $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf =20 diff --git a/tools/build/feature/test-dwarf_getcfi.c b/tools/build/feature/= test-dwarf_getcfi.c deleted file mode 100644 index 50e7d7cb7bdf..000000000000 --- a/tools/build/feature/test-dwarf_getcfi.c +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include - -int main(void) -{ - Dwarf *dwarf =3D NULL; - return dwarf_getcfi(dwarf) =3D=3D NULL; -} diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 83ea5d5f235d..71c6f8e3b0ee 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -34,7 +34,15 @@ int test_libdw_getlocations(void) return (int)dwarf_getlocations(&attr, offset, &base, &start, &end, &op, &= nops); } =20 +int test_libdw_getcfi(void) +{ + Dwarf *dwarf =3D NULL; + + return dwarf_getcfi(dwarf) =3D=3D NULL; +} + int main(void) { - return test_libdw() + test_libdw_unwind() + test_libdw_getlocations(); + return test_libdw() + test_libdw_unwind() + test_libdw_getlocations() + + test_libdw_getcfi(); } diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) -FEATURE_CHECK_CFLAGS-dwarf_getcfi :=3D $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf_getcfi :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 # for linking with debug library, run like: # make DEBUG=3D1 LIBBABELTRACE_DIR=3D/opt/libbabeltrace/ @@ -470,11 +468,7 @@ else endif else CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - ifneq ($(feature-dwarf_getcfi), 1) - $(warning Old libdw.h, finding variables at given 'perf probe' poi= nt will not work, install elfutils-devel/libdw-dev >=3D 0.142) - else - CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT - endif # dwarf_getcfi + CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 730E36FB9 for ; Thu, 17 Oct 2024 00:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124065; cv=none; b=Zf7ZR4kx05PKX98ZyjFQMY5FzWfoN2G/7ltPDwP5xeMxu2gk2QunMl30d3Uw/ZzQyx0CPh5N2+cm77dBO7HhF0a27cqIK+WSpeyROqUMw4l3eijwsclygiKBJGdF5bqQrvnK8FZ9/AuHgCDniD77egkzHHyo+x7sb5VgVCO7DVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124065; c=relaxed/simple; bh=KskvT3pCaHipMk1dH7NqUoJymZdrkHzaAu51i8pSk7k=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=kR6vCvOp8dr/Hi5gyEBnmNUewSKI9jn/1mAgmanI7x0YO8Ns5fhftKqkvES5XEUr8S/reptltYt/NKYUKeJFfQ4t5Px2xpdIn4qlizazj89e3D92V+7xlVJkAi/Y/AmeKU4iS1y29QW3nO5FTWvgh9mpbHE8o6G1nNeVr2fn1H0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mv3jf5ah; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mv3jf5ah" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e2946a143efso575968276.1 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=VU9D23fFMOa9LXkPnFVSmMuH/zksDMncppJ/JVZzd4k=; b=mv3jf5ah8b3/J5Pbu+z0coMxbs7x2epIluTKZxp4EmWx+99Ca9/S79g21xd6arLTNL pzzXjSjMlbmD/QgXfy1rrbE+IDML2Z2AF44z6hIr4A9hA75s3CjseFhSPq+4EUIzSMBu 2egf3ViQemL+4XiUeImr+zvrtJ9Ef1MAr+Feko6SA6Ue5ozaluLaGFclX4uxjHW571Ov NTPQJf/PCst5PlYfMCOP7/RtOap5HXYt1vNL5ivvqFb92Yh6WSuuQgQmSYWRB5Fu8Xqf DH5pv9kTeDSLoIsrMyHNS5x05QEUUpUSR5dplvzja0OZ+1FkYS2cilbvjyAnh1G8c1St /8jA== 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=H7oaR5UfzX/ZcmYIdSfe0kpBvN2HkTtJqfW3oznABz/y7q0R5go6dmEJtmi1e3RR+E KHnGdYnTGjUx+XT9/PZ/WqveYhQUqqgI6t6thjRhi1Fc3zVsD4b+NSvijTjoW/oVsHJr FhaFFzKGeuRBVWKhAZBG1P+uXzPoMtWK60gnx0dpTTUxy7s581e140ipdo5Q5MfhKI3s Y4+ody8onPuPmU8rLPpnEM3AQdqRKVmxxSI6RUJr47vUaNNFEvJSZw9NzZW2QSnqUByq LnQio+u6kSLaOw/nBotGJwZzYbwQNo0DRYHnKsadIwAqZdA56P9Fl72WO+sL2wit4lBx XLjg== X-Forwarded-Encrypted: i=1; AJvYcCUga9e6Ctt7mGZU7Qut1VCiKmHisaRTlodjlMQvQ8exGO7kfNwEaugZHcbAJj6WmRY8DZH18VcuuCrdp14=@vger.kernel.org X-Gm-Message-State: AOJu0YxoUg2Lgb7P+Kgd6+dhFPFc38u6lPaAUGLMpgp74IRmI/bh6day ptA1GLvCLY17MCJTLTt+kUgMmb2fLTYwEtlRTjBtUk1Pbm7G8EbwlK0OonYaXWyOzTG3qUm13wy /t+XnVg== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The test _ELFUTILS_PREREQ(0, 142) is false for elfutils before 2009-06-13, but that is 15 years ago and very unlikely. Add a test to test-libdw.c and assume the libdw version is at least 0.142 to simplify the build logic. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/build/feature/test-libdw.c | 10 +++++++++- tools/perf/util/probe-finder.c | 2 -- tools/perf/util/probe-finder.h | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/build/feature/test-libdw.c b/tools/build/feature/test-li= bdw.c index 71c6f8e3b0ee..2fb59479ab77 100644 --- a/tools/build/feature/test-libdw.c +++ b/tools/build/feature/test-libdw.c @@ -41,8 +41,16 @@ int test_libdw_getcfi(void) return dwarf_getcfi(dwarf) =3D=3D NULL; } =20 +int test_elfutils(void) +{ + Dwarf_CFI *cfi =3D NULL; + + dwarf_cfi_end(cfi); + return 0; +} + int main(void) { return test_libdw() + test_libdw_unwind() + test_libdw_getlocations() + - test_libdw_getcfi(); + test_libdw_getcfi() + test_elfutils(); } diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 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 *db= g, if (ret >=3D 0 && tf.pf.skip_empty_arg) ret =3D fill_empty_trace_arg(pev, tf.tevs, tf.ntevs); =20 -#if _ELFUTILS_PREREQ(0, 142) dwarf_cfi_end(tf.pf.cfi_eh); -#endif =20 if (ret < 0 || tf.ntevs =3D=3D 0) { for (i =3D 0; i < tf.ntevs; i++) diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 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 */ =20 /* 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 */ --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C4FE339A1 for ; Thu, 17 Oct 2024 00:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124067; cv=none; b=NH34EOLkF5IQYxw5PQTVy6kvtctRY/zneEBWXaqBMH12Lf4IjBDS23Ayn7OoSfu+BTkumuDgOawdZjSvM1hs5DOlylMVwfo0wY/BVY5gRkcNE7dV7Ojs2PmjLjLuuudvFqRP7oms25AKHf5360E6J8L6uW1/0ZFDlVL7fDm3nmc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124067; c=relaxed/simple; bh=6NzXFDtzmeldWPPLZ8swl7rrafIpOa+W1tRbpJ9UR9Y=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=fuvSEFODoqIBqRUR5vYbmwY5IU0WSrRhnnDdji+rjKiHQbH2UnhFncSLHioxYrIEUmmDR1nJnlsgxrOLv33TSQyIqGipqgo6KuZ6wJPctoQ9uQPgB6klvh7HIFNYUqy0B6an4T+YutyUfuGh6BklSE/EH1eZ3UGrEog0sJRsdr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Id6lORTv; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Id6lORTv" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e2954ada861so623977276.3 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=GcB5GtP5PER7P0fAo7i/I4FfsUt0WnKPhI2an5P5bXU=; b=Id6lORTvOhM5R7Kg17NT7IzhrvEtFBJqySKX5vt/QF8OlPm+VAZ/T+ampcqU4xh4Qf 4iI/5ibqhAG8kEeAI/KspPzdJb2tCiDqz+T0Yy6Z1m9QemkGV8C17ZGDNZlYNEhEpkj5 L7nR6n1vN81kqZH2EPXoXMiLSYUPN9p4XYK49i8hzOkF26K6FTvWz9vleLvA6COBnTJW YEbOqX192+Lfq9a25C3ar+3rQj/GTZzOMQG7oyCOtDjkTNV0ANxVbb2eySDvSKzfM5vy 90TdEO9oUTFVbk5Gadvneqxl5kJT1hjzk7xw+Qs+qS25UVQDZ+Hqew4PSF8ZS2P1S7IZ cOqw== 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=Xu8rfdonjgNpLvnAPmiD6UtO13/aunQFljVU1qetTTeOK/rXSuUNk1HUomPlrhnoFJ 8eawng8/ySeVdmr6mxoEJvlRNxsl4P8QEus6HQ2BiLWe33AkdDBAsBvqyHIlQcjaKdiw MirpDrHS6ZfEhPPlhglxKFDUDfjm1rQj71Ho73RgmD+V8Wv/uC2XyEuFg6Im9nU7Kwf7 MNJqv6ESoK+ieXYmrw0xnk3ekjXnZAk2Q22Y/r1KnKdhz8zVTe0uMhE0W68th2JuqD/r 2cmZHUYlJOfjeI3F379iCmtzJ3k9LYGT+4qGjqdkId+np9+r3EvJW8Hnw2oIe1eO8kcp 8tAQ== X-Forwarded-Encrypted: i=1; AJvYcCVsGmtaFou+UsKAJ2CJi7k4Ager/COWPjont5n/D2EvabcFBiteF2aHY3reTbtmrTIPOMBpmNZsG83tKHY=@vger.kernel.org X-Gm-Message-State: AOJu0YyWGBUdgLPsIuKZgJIfnrEyIbJ+IDzG1Hp04djMnDo7BsLFlhEn wGSsqmUxew/j3Fp2x6w8ocTJ0Zzjxc6/Opzq5kpl+hg1usST9BUza+dHB0ya5/Ts013smnD7XxB Le8UWsA== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" As HAVE_DWARF_GETLOCATIONS_SUPPORT and HAVE_DWARF_CFI_SUPPORT always match HAVE_DWARF_SUPPORT remove the macros and use HAVE_DWARF_SUPPORT. If building the file is guarded by CONFIG_DWARF then remove all ifs. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/perf/Documentation/perf-check.txt | 2 +- tools/perf/Makefile.config | 3 -- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-check.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/util/dwarf-aux.c | 6 --- tools/perf/util/dwarf-aux.h | 54 ------------------------- tools/perf/util/probe-finder.c | 4 -- 8 files changed, 4 insertions(+), 71 deletions(-) diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documenta= tion/perf-check.txt index 10f69fb6850b..45101a8e4154 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -48,7 +48,7 @@ feature:: bpf_skeletons / HAVE_BPF_SKEL debuginfod / HAVE_DEBUGINFOD_SUPPORT dwarf / HAVE_DWARF_SUPPORT - dwarf_getlocations / HAVE_DWARF_GETLOCATIONS_SUPPORT + dwarf_getlocations / HAVE_DWARF_SUPPORT dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT auxtrace / HAVE_AUXTRACE_SUPPORT libaudit / HAVE_LIBAUDIT_SUPPORT diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 old= er than 0.157, disables dwarf support. Please install new elfutils-devel/li= bdw-dev) NO_LIBDW :=3D 1 endif - else - CFLAGS +=3D -DHAVE_DWARF_GETLOCATIONS_SUPPORT - CFLAGS +=3D -DHAVE_DWARF_CFI_SUPPORT endif # Dwarf support endif # libelf support endif # NO_LIBELF diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 3dc6197ef3fa..04af13eb4a4c 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -840,7 +840,7 @@ int cmd_annotate(int argc, const char **argv) } #endif =20 -#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT +#ifndef HAVE_DWARF_SUPPORT if (annotate.data_type) { pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); return -ENOTSUP; diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 0b76b6e42b78..18c0a815243b 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -28,7 +28,7 @@ struct feature_status supported_features[] =3D { FEATURE_STATUS("bpf_skeletons", HAVE_BPF_SKEL), FEATURE_STATUS("debuginfod", HAVE_DEBUGINFOD_SUPPORT), FEATURE_STATUS("dwarf", HAVE_DWARF_SUPPORT), - FEATURE_STATUS("dwarf_getlocations", HAVE_DWARF_GETLOCATIONS_SUPPORT), + FEATURE_STATUS("dwarf_getlocations", HAVE_DWARF_SUPPORT), FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT), FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT), FEATURE_STATUS("libaudit", HAVE_LIBAUDIT_SUPPORT), diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 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 =3D true; annotate_opts.annotate_src =3D false; =20 -#ifndef HAVE_DWARF_GETLOCATIONS_SUPPORT +#ifndef HAVE_DWARF_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); goto error; #endif diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index 92eb9c8dc3e5..559c953ca172 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c @@ -1182,7 +1182,6 @@ int die_get_varname(Dwarf_Die *vr_die, struct strbuf = *buf) return ret < 0 ? ret : strbuf_addf(buf, "\t%s", dwarf_diename(vr_die)); } =20 -#if defined(HAVE_DWARF_GETLOCATIONS_SUPPORT) || defined(HAVE_DWARF_CFI_SUP= PORT) static int reg_from_dwarf_op(Dwarf_Op *op) { switch (op->atom) { @@ -1245,9 +1244,7 @@ static bool check_allowed_ops(Dwarf_Op *ops, size_t n= ops) } return true; } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT || HAVE_DWARF_CFI_SUPPORT */ =20 -#ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT /** * die_get_var_innermost_scope - Get innermost scope range of given variab= le DIE * @sp_die: a subprogram DIE @@ -1697,9 +1694,7 @@ void die_collect_global_vars(Dwarf_Die *cu_die, struc= t die_var_type **var_types) =20 die_find_child(cu_die, __die_collect_global_vars_cb, (void *)var_types, &= die_mem); } -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ =20 -#ifdef HAVE_DWARF_CFI_SUPPORT /** * die_get_cfa - Get frame base information * @dwarf: a Dwarf info @@ -1732,7 +1727,6 @@ int die_get_cfa(Dwarf *dwarf, u64 pc, int *preg, int = *poffset) } return -1; } -#endif /* HAVE_DWARF_CFI_SUPPORT */ =20 /* * die_has_loclist - Check if DW_AT_location of @vr_die is a location list diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h index 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 =20 struct strbuf; =20 @@ -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 *d= ie_mem); =20 -#ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT - /* Get byte offset range of given variable DIE */ int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf = *buf); =20 @@ -177,58 +174,7 @@ void die_collect_vars(Dwarf_Die *sc_die, struct die_va= r_type **var_types); /* Save all global variables in this CU */ void die_collect_global_vars(Dwarf_Die *cu_die, struct die_var_type **var_= types); =20 -#else /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ - -static inline int die_get_var_range(Dwarf_Die *sp_die __maybe_unused, - Dwarf_Die *vr_die __maybe_unused, - struct strbuf *buf __maybe_unused) -{ - return -ENOTSUP; -} - -static inline Dwarf_Die *die_find_variable_by_reg(Dwarf_Die *sc_die __mayb= e_unused, - Dwarf_Addr pc __maybe_unused, - int reg __maybe_unused, - int *poffset __maybe_unused, - bool is_fbreg __maybe_unused, - Dwarf_Die *die_mem __maybe_unused) -{ - return NULL; -} - -static inline Dwarf_Die *die_find_variable_by_addr(Dwarf_Die *sc_die __may= be_unused, - Dwarf_Addr addr __maybe_unused, - Dwarf_Die *die_mem __maybe_unused, - int *offset __maybe_unused) -{ - return NULL; -} - -static inline void die_collect_vars(Dwarf_Die *sc_die __maybe_unused, - struct die_var_type **var_types __maybe_unused) -{ -} - -static inline void die_collect_global_vars(Dwarf_Die *cu_die __maybe_unuse= d, - struct die_var_type **var_types __maybe_unused) -{ -} - -#endif /* HAVE_DWARF_GETLOCATIONS_SUPPORT */ - -#ifdef HAVE_DWARF_CFI_SUPPORT - /* Get the frame base information from CFA */ int die_get_cfa(Dwarf *dwarf, u64 pc, int *preg, int *poffset); =20 -#else /* HAVE_DWARF_CFI_SUPPORT */ - -static inline int die_get_cfa(Dwarf *dwarf __maybe_unused, u64 pc __maybe_= unused, - int *preg __maybe_unused, int *poffset __maybe_unused) -{ - return -1; -} - -#endif /* HAVE_DWARF_CFI_SUPPORT */ - #endif /* _DWARF_AUX_H */ diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 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 =3D dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1); if (ret <=3D 0 || nops =3D=3D 0) { pf->fb_ops =3D NULL; -#ifdef HAVE_DWARF_CFI_SUPPORT } else if (nops =3D=3D 1 && pf->fb_ops[0].atom =3D=3D DW_OP_call_frame_cf= a && (pf->cfi_eh !=3D NULL || pf->cfi_dbg !=3D NULL)) { if ((dwarf_cfi_addrframe(pf->cfi_eh, pf->addr, &frame) !=3D 0 && @@ -613,7 +612,6 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct = probe_finder *pf) free(frame); return -ENOENT; } -#endif /* HAVE_DWARF_CFI_SUPPORT */ } =20 /* Call finder's callback handler */ @@ -1138,7 +1136,6 @@ static int debuginfo__find_probes(struct debuginfo *d= bg, =20 pf->machine =3D ehdr.e_machine; =20 -#ifdef HAVE_DWARF_CFI_SUPPORT do { GElf_Shdr shdr; =20 @@ -1148,7 +1145,6 @@ static int debuginfo__find_probes(struct debuginfo *d= bg, =20 pf->cfi_dbg =3D dwarf_getcfi(dbg->dbg); } while (0); -#endif /* HAVE_DWARF_CFI_SUPPORT */ =20 ret =3D debuginfo__find_probe_location(dbg, pf); return ret; --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7A6940858 for ; Thu, 17 Oct 2024 00:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124071; cv=none; b=NeUqRPasJCy0JagIoo35VB+Y9rQMzuXy6SeGrXyg7ahFBSrAFE4B6AcUjSj1YOzHk7FudSnBSGB4Q1FWrFC8vdFHsx3AzWlBBinNpoNhnLLpfMjPLFBZWvO7XaXcm/4IiBga+3/GQ9r5/iqw9BbFEq8UpZnA0bF2+EZe+K+3Phk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124071; c=relaxed/simple; bh=6lnA1afczAn/Hrm3ssm5ac2ILt01CYNiuH2KQKGGpNw=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=GM6tgd3UWWQQB/BWb0/npYypBwfPZjVgCFM0WS0bOM7t0fDAYEgAt/KO1uXO7QK5SF4FHutp3xUx7lTtJ2Y/BqOpun8TlOjM+VmEAb/CpEg+1wEutwDQ38xWJh8h+618K3yCGLAn+VWm3G4HPirmYSJa7xd1qEGZPRKTLpLSWlQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=DxP0zrqW; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DxP0zrqW" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e02b5792baaso571353276.2 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=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=1qh2zjK+x7XBUWzGHdV6OoNs12UKt+cT6XlR5rxtiUA=; b=DxP0zrqWmMNIBPAlLHKUkzAX4IdH3wxwfk0j5p6Ti8JGQNoPmKAdXIlcvqpAmPnQSy 7dtPLiXBXVc+6m/tZYSHVf4BoZlOa3L/CfOQo+qR+pPlO04UmD16Tyl3afZ10KL7UDCg uDK6RuEdkQrUFezq/Tejgw/mGv9U8QyNBKmF/FMU2MJe4TlLC6lyy43wkRoRLKxZN5BS 1VTlHMf/bkMBcS7B7luU/aGAsV7VkeyIutENxsD35je1Id0OoHtQ4PWbMfqYyGHPPqO8 BzKajczzheKV/uhtR7B9Udmj+TNOhqSuXdRjXk9fcqtfSxX0c/clJ0qoH0ZQcDWuudla bRzQ== 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=oa7OggRk+iGiDpTol/8Ig3Maa+BvRNkZRX59BZY26WqsTKUIXpNbl5uehgU1BIMX+t tyygW9tpNy1wJQZoMmLjDTsJbTtLYHCwKpInHxz6BOHjVlGbuOv9FmugcvP9rx64ZCgw PBXxg0h+A6F9Xhr/TWjcuzLeS8Cjsew8ToPmZem8UhMCvmd1HXgLXj8sgwIt5vlwsvX6 gFCw6a4wMI/I5k8hkrfkxOANQRsPmTtc64jbhmg8a/rTZ6IwTcrB+1b+oDACkxco7ILZ sWw8HxqtXpHA2gVyBirvzgrA5FlAO4uNutRaAW59gYY4i/fziudBg1fwTsE6mGuhJhJ+ 4C6A== X-Forwarded-Encrypted: i=1; AJvYcCVEtXJYjoc2ZA94MP3++OKhMgvuNWdKndnXHsp1kI7VQ+BmzxvGMN5uwMWRhJplfvc0/PY1CV4K2uaNuJ4=@vger.kernel.org X-Gm-Message-State: AOJu0Yzl6H7/d4QMnoeuA8pLX/opMafTmQy1qsOGHGsBbj9BQCgawuaS VZkWh9RhV2deEIluhRect+rLlzvE11I/2Fq2kNuVBenqTm8sUuvt6EWjwDdgIezAyrupdbcNJDE 1Wvowbw== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In Makefile.config for unwinding the name dwarf implies either libunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is really just defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- tools/perf/Documentation/perf-check.txt | 6 +++--- tools/perf/Makefile.config | 2 +- tools/perf/arch/powerpc/annotate/instructions.c | 4 ++-- tools/perf/arch/x86/annotate/instructions.c | 2 +- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-check.c | 6 +++--- tools/perf/builtin-probe.c | 12 ++++++------ tools/perf/builtin-report.c | 4 ++-- tools/perf/util/annotate-data.h | 8 ++++---- tools/perf/util/debuginfo.h | 6 +++--- tools/perf/util/disasm.c | 4 ++-- tools/perf/util/disasm.h | 4 ++-- tools/perf/util/genelf.c | 4 ++-- tools/perf/util/genelf.h | 2 +- tools/perf/util/include/dwarf-regs.h | 6 +++--- tools/perf/util/probe-event.c | 4 ++-- tools/perf/util/probe-finder.h | 4 ++-- 17 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documenta= tion/perf-check.txt index 45101a8e4154..31741499e786 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -47,15 +47,15 @@ feature:: bpf / HAVE_LIBBPF_SUPPORT bpf_skeletons / HAVE_BPF_SKEL debuginfod / HAVE_DEBUGINFOD_SUPPORT - dwarf / HAVE_DWARF_SUPPORT - dwarf_getlocations / HAVE_DWARF_SUPPORT + dwarf / HAVE_LIBDW_SUPPORT + dwarf_getlocations / HAVE_LIBDW_SUPPORT dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT auxtrace / HAVE_AUXTRACE_SUPPORT libaudit / HAVE_LIBAUDIT_SUPPORT libbfd / HAVE_LIBBFD_SUPPORT libcapstone / HAVE_LIBCAPSTONE_SUPPORT libcrypto / HAVE_LIBCRYPTO_SUPPORT - libdw-dwarf-unwind / HAVE_DWARF_SUPPORT + libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT libelf / HAVE_LIBELF_SUPPORT libnuma / HAVE_LIBNUMA_SUPPORT libopencsd / HAVE_CSTRACE_SUPPORT diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 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 architec= ture $(SRCARCH), DWARF support disabled) NO_LIBDW :=3D 1 else - CFLAGS +=3D -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) + CFLAGS +=3D -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} $(call detected,CONFIG_DWARF) diff --git a/tools/perf/arch/powerpc/annotate/instructions.c b/tools/perf/a= rch/powerpc/annotate/instructions.c index ede9eeade0ab..54478cf5cccc 100644 --- a/tools/perf/arch/powerpc/annotate/instructions.c +++ b/tools/perf/arch/powerpc/annotate/instructions.c @@ -255,7 +255,7 @@ static struct ins_ops *check_ppc_insn(struct disasm_lin= e *dl) * is moved to r31. update_insn_state_powerpc tracks these state * changes */ -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT static void update_insn_state_powerpc(struct type_state *state, struct data_loc_info *dloc, Dwarf_Die * cu_die __maybe_unused, struct disasm_line *dl) @@ -300,7 +300,7 @@ static void update_insn_state_powerpc(struct type_state= *state, insn_offset, src->reg1, dst->reg1); pr_debug_type_name(&tsr->type, tsr->kind); } -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_u= nused) { diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/= x86/annotate/instructions.c index 5caf5a17f03d..c869abe3c31d 100644 --- a/tools/perf/arch/x86/annotate/instructions.c +++ b/tools/perf/arch/x86/annotate/instructions.c @@ -207,7 +207,7 @@ static int x86__annotate_init(struct arch *arch, char *= cpuid) return err; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT static void update_insn_state_x86(struct type_state *state, struct data_loc_info *dloc, Dwarf_Die *cu_die, struct disasm_line *dl) diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 04af13eb4a4c..bb87e6e7687d 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -840,7 +840,7 @@ int cmd_annotate(int argc, const char **argv) } #endif =20 -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT if (annotate.data_type) { pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); return -ENOTSUP; diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 18c0a815243b..2346536a5ee1 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -27,15 +27,15 @@ struct feature_status supported_features[] =3D { FEATURE_STATUS("bpf", HAVE_LIBBPF_SUPPORT), FEATURE_STATUS("bpf_skeletons", HAVE_BPF_SKEL), FEATURE_STATUS("debuginfod", HAVE_DEBUGINFOD_SUPPORT), - FEATURE_STATUS("dwarf", HAVE_DWARF_SUPPORT), - FEATURE_STATUS("dwarf_getlocations", HAVE_DWARF_SUPPORT), + FEATURE_STATUS("dwarf", HAVE_LIBDW_SUPPORT), + FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT), FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT), FEATURE_STATUS("libaudit", HAVE_LIBAUDIT_SUPPORT), FEATURE_STATUS("libbfd", HAVE_LIBBFD_SUPPORT), FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), FEATURE_STATUS("libcrypto", HAVE_LIBCRYPTO_SUPPORT), - FEATURE_STATUS("libdw-dwarf-unwind", HAVE_DWARF_SUPPORT), + FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT), FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT), FEATURE_STATUS("libopencsd", HAVE_CSTRACE_SUPPORT), diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 91672bb3047c..69800e4d9530 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -229,7 +229,7 @@ static int opt_set_target_ns(const struct option *opt _= _maybe_unused, =20 /* Command option callbacks */ =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT static int opt_show_lines(const struct option *opt, const char *str, int unset __maybe_unused) { @@ -505,7 +505,7 @@ static int perf_del_probe_events(struct strfilter *filt= er) return ret; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #define PROBEDEF_STR \ "[EVENT=3D]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT [[NAME=3D]ARG .= ..]" #else @@ -521,7 +521,7 @@ __cmd_probe(int argc, const char **argv) "perf probe [] --add 'PROBEDEF' [--add 'PROBEDEF' ...]", "perf probe [] --del '[GROUP:]EVENT' ...", "perf probe --list [GROUP:]EVENT ...", -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT "perf probe [] --line 'LINEDESC'", "perf probe [] --vars 'PROBEPOINT'", #endif @@ -545,7 +545,7 @@ __cmd_probe(int argc, const char **argv) "\t\tFUNC:\tFunction name\n" "\t\tOFF:\tOffset from function entry (in byte)\n" "\t\t%return:\tPut the probe at function return\n" -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT "\t\tSRC:\tSource code path\n" "\t\tRL:\tRelative line number from function entry.\n" "\t\tAL:\tAbsolute line number in file.\n" @@ -612,7 +612,7 @@ __cmd_probe(int argc, const char **argv) set_option_flag(options, 'd', "del", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'D', "definition", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'l', "list", PARSE_OPT_EXCLUSIVE); -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); #else @@ -694,7 +694,7 @@ __cmd_probe(int argc, const char **argv) if (ret < 0) pr_err_with_code(" Error: Failed to show functions.", ret); return ret; -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT case 'L': ret =3D show_line_range(¶ms->line_range, params->target, params->nsi, params->uprobes); diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 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 =3D true; =20 -#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_DWARF_SUPPORT) +#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_LIBDW_SUPPORT) if (dwarf_callchain_users) { ui__warning("Please install libunwind or libdw " "development packages during the perf build.\n"); @@ -1705,7 +1705,7 @@ int cmd_report(int argc, const char **argv) report.data_type =3D true; annotate_opts.annotate_src =3D false; =20 -#ifndef HAVE_DWARF_SUPPORT +#ifndef HAVE_LIBDW_SUPPORT pr_err("Error: Data type profiling is disabled due to missing DWARF supp= ort\n"); goto error; #endif diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-dat= a.h index 8ac0fd94a0ba..98c80b2268dd 100644 --- a/tools/perf/util/annotate-data.h +++ b/tools/perf/util/annotate-data.h @@ -9,7 +9,7 @@ #include "dwarf-regs.h" #include "annotate.h" =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "debuginfo.h" #endif =20 @@ -165,7 +165,7 @@ struct annotated_data_stat { }; extern struct annotated_data_stat ann_data_stat; =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT /* * Type information in a register, valid when @ok is true. * The @caller_saved registers are invalidated after a function call. @@ -244,7 +244,7 @@ bool get_global_var_info(struct data_loc_info *dloc, u6= 4 addr, const char **var_name, int *var_offset); void pr_debug_type_name(Dwarf_Die *die, enum type_state_kind kind); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 static inline struct annotated_data_type * find_data_type(struct data_loc_info *dloc __maybe_unused) @@ -276,7 +276,7 @@ static inline int hist_entry__annotate_data_tty(struct = hist_entry *he __maybe_un return -1; } =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #ifdef HAVE_SLANG_SUPPORT int hist_entry__annotate_data_tui(struct hist_entry *he, struct evsel *evs= el, diff --git a/tools/perf/util/debuginfo.h b/tools/perf/util/debuginfo.h index ad6422c3f8ca..a52d69932815 100644 --- a/tools/perf/util/debuginfo.h +++ b/tools/perf/util/debuginfo.h @@ -5,7 +5,7 @@ #include #include =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 #include "dwarf-aux.h" =20 @@ -25,7 +25,7 @@ void debuginfo__delete(struct debuginfo *dbg); int debuginfo__get_text_offset(struct debuginfo *dbg, Dwarf_Addr *offs, bool adjust_offset); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 /* dummy debug information structure */ struct debuginfo { @@ -49,7 +49,7 @@ static inline int debuginfo__get_text_offset(struct debug= info *dbg __maybe_unuse return -EINVAL; } =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #ifdef HAVE_DEBUGINFOD_SUPPORT int get_source_from_debuginfod(const char *raw_path, const char *sbuild_id, diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 2c8063660f2e..aef06a36bf40 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -151,14 +151,14 @@ static struct arch architectures[] =3D { .memory_ref_char =3D '(', .imm_char =3D '$', }, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state =3D update_insn_state_x86, #endif }, { .name =3D "powerpc", .init =3D powerpc__annotate_init, -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT .update_insn_state =3D update_insn_state_powerpc, #endif }, diff --git a/tools/perf/util/disasm.h b/tools/perf/util/disasm.h index f56beedeb9da..486c269b29ba 100644 --- a/tools/perf/util/disasm.h +++ b/tools/perf/util/disasm.h @@ -4,7 +4,7 @@ =20 #include "map_symbol.h" =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include "dwarf-aux.h" #endif =20 @@ -39,7 +39,7 @@ struct arch { char memory_ref_char; char imm_char; } objdump; -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT void (*update_insn_state)(struct type_state *state, struct data_loc_info *dloc, Dwarf_Die *cu_die, struct disasm_line *dl); diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c index c8f6bee1fa61..cdce7f173d00 100644 --- a/tools/perf/util/genelf.c +++ b/tools/perf/util/genelf.c @@ -16,7 +16,7 @@ #include #include #include -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT #include #endif =20 @@ -499,7 +499,7 @@ jit_write_elf(int fd, uint64_t load_addr, const char *s= ym, shdr->sh_size =3D sizeof(bnote); shdr->sh_entsize =3D 0; =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT if (debug && nr_debug_entries) { retval =3D jit_add_debug_info(e, load_addr, debug, nr_debug_entries); if (retval) diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h index 4e2e4f40e134..9f0b875d6548 100644 --- a/tools/perf/util/genelf.h +++ b/tools/perf/util/genelf.h @@ -8,7 +8,7 @@ int jit_write_elf(int fd, uint64_t code_addr, const char *sym, const void *code, int csize, void *debug, int nr_debug_entries, void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_si= ze); -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT /* genelf_debug.c */ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_deb= ug_entries); #endif diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include= /dwarf-regs.h index 75b28dcc8317..29a7d0546b82 100644 --- a/tools/perf/util/include/dwarf-regs.h +++ b/tools/perf/util/include/dwarf-regs.h @@ -6,7 +6,7 @@ #define DWARF_REG_PC 0xd3af9c /* random number */ #define DWARF_REG_FB 0xd3affb /* random number */ =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT const char *get_arch_regstr(unsigned int n); /* * get_dwarf_regstr - Returns ftrace register string from DWARF regnum @@ -23,7 +23,7 @@ int get_arch_regnum(const char *name); */ int get_dwarf_regnum(const char *name, unsigned int machine); =20 -#else /* HAVE_DWARF_SUPPORT */ +#else /* HAVE_LIBDW_SUPPORT */ =20 static inline int get_dwarf_regnum(const char *name __maybe_unused, unsigned int machine __maybe_unused) @@ -32,7 +32,7 @@ static inline int get_dwarf_regnum(const char *name __may= be_unused, } #endif =20 -#if !defined(__powerpc__) || !defined(HAVE_DWARF_SUPPORT) +#if !defined(__powerpc__) || !defined(HAVE_LIBDW_SUPPORT) static inline void get_powerpc_regs(u32 raw_insn __maybe_unused, int is_so= urce __maybe_unused, struct annotated_op_loc *op_loc __maybe_unused) { diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 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; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 static int kernel_get_module_dso(const char *module, struct dso **pdso) { @@ -1250,7 +1250,7 @@ int show_available_vars(struct perf_probe_event *pevs= , int npevs, return ret; } =20 -#else /* !HAVE_DWARF_SUPPORT */ +#else /* !HAVE_LIBDW_SUPPORT */ =20 static void debuginfo_cache__exit(void) { diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 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] =3D=3D '_'; } =20 -#ifdef HAVE_DWARF_SUPPORT +#ifdef HAVE_LIBDW_SUPPORT =20 #include "dwarf-aux.h" #include "debuginfo.h" @@ -102,6 +102,6 @@ struct line_finder { int found; }; =20 -#endif /* HAVE_DWARF_SUPPORT */ +#endif /* HAVE_LIBDW_SUPPORT */ =20 #endif /*_PROBE_FINDER_H */ --=20 2.47.0.105.g07ac214952-goog From nobody Tue Nov 26 15:46:16 2024 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E04B7AD5A for ; Thu, 17 Oct 2024 00:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124072; cv=none; b=F422jTPLn/pFoy0pP6hHx3bga4HhTh1AGJeY84FTfFEVzoG1I5VZdEqj6SOIS1zCKidKb4+fY7lDPtPkEa5zgJD+MWQlyiJ4Ry4Y6pbv3gu+F+yn9WlHXBx6DCnrHpuUjpAkNS9ntLMmnsy2cAKMMbhFa/2u3q+o4O/rq3E9xIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729124072; c=relaxed/simple; bh=uTZGzDP2K1Gr+UdxyFj4+kEYNFidcL7ChzEuLmDixB8=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=lkRx55GvGpjLzAsptYj/XI1V3fGGVXQSBuIlOpEi9VDpXXdihjaoKY67ljX/BmwHYjF27NgSzkS57HLjGskDAlh664kwfAiVm78eIQOMefe2Lzgha5gRzIxanT9kZQ5SrZFO26qk4SLgu1SA/7ifY4iMgVXFy9dxgrTrKW/XNZ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=N05sPLCx; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="N05sPLCx" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e3c638cc27so10014227b3.0 for ; Wed, 16 Oct 2024 17:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124070; x=1729728870; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=ZdCPmUKkGrBwCDxgLym0jfSR0ZKu6+x5u848gg4O+mI=; b=N05sPLCxImTKU5r4MDbFCUV0eRbeAr6P0ths/CfwORyHoXqxBnewwue5lNvoyFwXLq 84y6T6K/5vBkwSEnQSzMRazXwdPjp3ZoiqAzbd47eyOySEKN8AkBl3gZ7ZkPe+ruokH5 ZMqp3v98PxAYpw4Rq86f04chNuj2qxCmdX7TfaS7AW4WrtFXNO2Cj0laTmXnRZdMw47z JEFsbAMnyY4rpkJqapsguHl6Ko1bkLTWwefKxE0GoXgPKv0P/Y5aFrCMwGn2XO77ZA31 ipZ6qDkA6QDYU2aEQP10eYsl3xXXLehuZWeCHkhAPjEadKs1tOjd7s1SFiSqle6bdk7H mB7w== 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=cGTHzvUWAEV4rkGXw0K8zPXSs43TGvUokTUamz5wQ6SFkUksyMAgYtrHwGBhdEnDKz cP5oGEfEIliNiaaOgt/MHd2MCcdevVB1N+DL7mKG+LOhCTlJDaToS8puK3doSirw5Pxx eDbb8TkxjzxisohAo1BYLhrXwWsF8+agKaVAlj0VjnthTuuajAag9qQTVthQ24oeET4W mWmrRNdw/9F367G8/upfvMNpnq7ehbpr1YKYICwjWEweXFaUjpT/pfNhc2GpWwAnDx5S YQGF4E2ze8ICIS9ZZH05K1vWvXTIKd+8wPWl2zm20aPK5S5y0yD6fIqOUQjru9KT3vF8 cW7Q== X-Forwarded-Encrypted: i=1; AJvYcCVy3n/3MwTdI2wQi1h5XsB21LTwhhAi5wc20QkrRFx52QhvLNukBdC/OuXJ+3Jz+G/1h4JpwY55K8UiOE4=@vger.kernel.org X-Gm-Message-State: AOJu0YyDxj1p42LHiBt2J3sHptLYBSDoUw/QVNovhdpgCwJDw18Dz1xP DHF4M00uXG84BbS55FUU8H8aU0qzFVHD3X7myNKYNalV0xJ5WFt4ymGFf8hOh7AUzELuu7Y8sFy W6zaTug== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In Makefile.config for unwinding the name dwarf implies either libunwind or libdw. Make it clearer that CONFIG_DWARF is really just defined when libdw is present by renaming to CONFIG_LIBDW. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim --- 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 +=3D -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) LDFLAGS +=3D $(LIBDW_LDFLAGS) EXTLIBS +=3D ${DWARFLIBS} - $(call detected,CONFIG_DWARF) + $(call detected,CONFIG_LIBDW) endif # PERF_HAVE_DWARF_REGS endif # NO_LIBDW =20 diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build index e6dd7cd79ebd..e06fea1ea8ff 100644 --- a/tools/perf/arch/arm/util/Build +++ b/tools/perf/arch/arm/util/Build @@ -1,6 +1,6 @@ perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o =20 perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/= Build index 343ef7589a77..4387a6d6a6c3 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build @@ -4,7 +4,7 @@ perf-util-y +=3D perf_regs.o perf-util-y +=3D tsc.o perf-util-y +=3D pmu.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 diff --git a/tools/perf/arch/csky/util/Build b/tools/perf/arch/csky/util/Bu= ild index 99d83f41bf43..1325310cab6a 100644 --- a/tools/perf/arch/csky/util/Build +++ b/tools/perf/arch/csky/util/Build @@ -1,4 +1,4 @@ perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/loongarch/util/Build b/tools/perf/arch/loongar= ch/util/Build index b6b97de48233..06ff95394921 100644 --- a/tools/perf/arch/loongarch/util/Build +++ b/tools/perf/arch/loongarch/util/Build @@ -1,7 +1,7 @@ perf-util-y +=3D header.o perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o diff --git a/tools/perf/arch/mips/util/Build b/tools/perf/arch/mips/util/Bu= ild index e4644f1e68a0..b328109fc16c 100644 --- a/tools/perf/arch/mips/util/Build +++ b/tools/perf/arch/mips/util/Build @@ -1,3 +1,3 @@ perf-util-y +=3D perf_regs.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/u= til/Build index 6c588ecdf3bd..3d979480a188 100644 --- a/tools/perf/arch/powerpc/util/Build +++ b/tools/perf/arch/powerpc/util/Build @@ -7,8 +7,8 @@ perf-util-y +=3D sym-handling.o perf-util-y +=3D evsel.o perf-util-y +=3D event.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o -perf-util-$(CONFIG_DWARF) +=3D skip-callchain-idx.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D skip-callchain-idx.o =20 perf-util-$(CONFIG_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/riscv/util/Build b/tools/perf/arch/riscv/util/= Build index f865cb0489ec..8f93091b8345 100644 --- a/tools/perf/arch/riscv/util/Build +++ b/tools/perf/arch/riscv/util/Build @@ -2,5 +2,5 @@ perf-util-y +=3D perf_regs.o perf-util-y +=3D header.o =20 perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Bu= ild index 1ac830030ff3..787410f99bb3 100644 --- a/tools/perf/arch/s390/util/Build +++ b/tools/perf/arch/s390/util/Build @@ -2,7 +2,7 @@ perf-util-y +=3D header.o perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o perf-util-y +=3D perf_regs.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 perf-util-y +=3D machine.o diff --git a/tools/perf/arch/sh/util/Build b/tools/perf/arch/sh/util/Build index 32f44fc4ab98..2337a0b710a2 100644 --- a/tools/perf/arch/sh/util/Build +++ b/tools/perf/arch/sh/util/Build @@ -1 +1 @@ -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/arch/sparc/util/Build b/tools/perf/arch/sparc/util/= Build index 32f44fc4ab98..2337a0b710a2 100644 --- a/tools/perf/arch/sparc/util/Build +++ b/tools/perf/arch/sparc/util/Build @@ -1 +1 @@ -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 2607ed5c4296..9705cda4f240 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build @@ -12,7 +12,7 @@ perf-util-y +=3D evsel.o perf-util-y +=3D iostat.o perf-util-y +=3D env.o =20 -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o perf-util-$(CONFIG_BPF_PROLOGUE) +=3D dwarf-regs.o =20 perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o diff --git a/tools/perf/arch/xtensa/util/Build b/tools/perf/arch/xtensa/uti= l/Build index e813e618954b..2d1a48696ad9 100644 --- a/tools/perf/arch/xtensa/util/Build +++ b/tools/perf/arch/xtensa/util/Build @@ -1 +1 @@ -perf-$(CONFIG_DWARF) +=3D dwarf-regs.o +perf-$(CONFIG_LIBDW) +=3D dwarf-regs.o diff --git a/tools/perf/util/Build b/tools/perf/util/Build index fa508e113dd0..1eedead5f2f2 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -200,11 +200,11 @@ ifndef CONFIG_SETNS perf-util-y +=3D setns.o endif =20 -perf-util-$(CONFIG_DWARF) +=3D probe-finder.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-aux.o -perf-util-$(CONFIG_DWARF) +=3D dwarf-regs.o -perf-util-$(CONFIG_DWARF) +=3D debuginfo.o -perf-util-$(CONFIG_DWARF) +=3D annotate-data.o +perf-util-$(CONFIG_LIBDW) +=3D probe-finder.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-aux.o +perf-util-$(CONFIG_LIBDW) +=3D dwarf-regs.o +perf-util-$(CONFIG_LIBDW) +=3D debuginfo.o +perf-util-$(CONFIG_LIBDW) +=3D annotate-data.o =20 perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind-local.o @@ -235,7 +235,7 @@ perf-util-$(CONFIG_LIBLLVM) +=3D llvm-c-helpers.o ifdef CONFIG_JITDUMP perf-util-$(CONFIG_LIBELF) +=3D jitdump.o perf-util-$(CONFIG_LIBELF) +=3D genelf.o -perf-util-$(CONFIG_DWARF) +=3D genelf_debug.o +perf-util-$(CONFIG_LIBDW) +=3D genelf_debug.o endif =20 perf-util-y +=3D perf-hooks.o --=20 2.47.0.105.g07ac214952-goog