From nobody Wed Dec 24 21:32:54 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17A2480034; Tue, 23 Jan 2024 16:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706027958; cv=none; b=IMuMA8+saxCvCdKq624fWtVJE8nBPqjP+pipFTxGondv+ZmjUJMDCGUmOnss7CW6IqzbDBz9TOq1fK0Qxcc7njTjUhVhiftFUwzwtM2sK/6pQCT9Oae5vdgTdyXTt1F7ry2uyO42LRZ7HfT+8FPu3dZZAmHWoXLylyZb5Q1AHr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706027958; c=relaxed/simple; bh=Y0y9EQrax0annxGXKzptQ0MkdIKONr0Czi0BUW7Zw2U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XMEYP9Se0lwIVSZlZbKjdkRt2k+NVxptMUxb5OEiIEzpspDncoyIRezG0C5wYYOKRMh/cP+J5PVYeWj9gOF7rN+iV5PzHilT0KuVHPr6fGO/BQxP7LxNukif4/VtXlI8vS+zVvQDtrhpCUBN1qki6rhBQPeUMgNCmA1mTf1jY3I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC624FEC; Tue, 23 Jan 2024 08:40:00 -0800 (PST) Received: from e127643.broadband (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 559663F5A1; Tue, 23 Jan 2024 08:39:13 -0800 (PST) From: James Clark To: linux-perf-users@vger.kernel.org, irogers@google.com Cc: James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Spoorthy S , Athira Rajeev , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] perf version: Display availability of HAVE_DWARF_UNWIND_SUPPORT Date: Tue, 23 Jan 2024 16:39:01 +0000 Message-Id: <20240123163903.350306-2-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123163903.350306-1-james.clark@arm.com> References: <20240123163903.350306-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Even though unwinding depends on either HAVE_DWARF_SUPPORT or HAVE_LIBUNWIND, scripts testing unwinding can't just look for the existence of either of those flags. This is because NO_LIBDW_DWARF_UNWIND=3D1 can disable unwinding with libdw, but libdw will still be linked leaving HAVE_DWARF_SUPPORT turned on. Presumably because it is used for things other than unwinding, so I don't think this needs to be fixed. HAVE_DWARF_UNWIND_SUPPORT already takes the combination of all those things into account, and is used to gate the built in tests like "Test dwarf unwind", so add it to the feature list output so that it can be used by the script tests too. Signed-off-by: James Clark --- tools/perf/builtin-version.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c index ac20c2b9bbc2..529e9ce8c46c 100644 --- a/tools/perf/builtin-version.c +++ b/tools/perf/builtin-version.c @@ -82,6 +82,7 @@ static void library_status(void) STATUS(HAVE_LIBPFM, libpfm4); STATUS(HAVE_LIBTRACEEVENT, libtraceevent); STATUS(HAVE_BPF_SKEL, bpf_skeletons); + STATUS(HAVE_DWARF_UNWIND_SUPPORT, dwarf-unwind-support); } =20 int cmd_version(int argc, const char **argv) --=20 2.34.1 From nobody Wed Dec 24 21:32:54 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35F32811E2; Tue, 23 Jan 2024 16:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706027961; cv=none; b=JZOIdzk5i12qERiZG5ymHKFb4XexuJrQq9NcFCAmQ1etRo6IpyD6jWaS0G795gBjfl1oYlBp/nUpLmfWZPV0ApsNpcVThoeWFFuuDefeL9g2kHhUTWlmHgCxhAd3sDBUTZZ8Q5FF9Afky0Yg1JmcEJNAdvqfJgJPpxLVh0uCTiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706027961; c=relaxed/simple; bh=gXfhJCgLJhn8evK5zGZ/NOEXFQLLLjnuSt5Xs2hv2sg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=giX+dM011lhimwojUhF2jq5mKdLdlDaDvwn5n0DJ6mc/j7tXgFHDhAXPEIV0kniVQXlnefpe0ku6pQqFBLHzo4MZA1cn/72c1KgXEiCoOqw1n2KjV8ChRMiafVryUi1QcRrgKv8v/DJxheX4wv/yR7EBNWqZk75ybYfn1FwLNb8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9641106F; Tue, 23 Jan 2024 08:40:03 -0800 (PST) Received: from e127643.broadband (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 70BEF3F5A1; Tue, 23 Jan 2024 08:39:16 -0800 (PST) From: James Clark To: linux-perf-users@vger.kernel.org, irogers@google.com Cc: James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kajol Jain , Spoorthy S , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] perf test: Skip test_arm_callgraph_fp.sh if unwinding isn't built in Date: Tue, 23 Jan 2024 16:39:02 +0000 Message-Id: <20240123163903.350306-3-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123163903.350306-1-james.clark@arm.com> References: <20240123163903.350306-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Even though this is a frame pointer unwind test, it's testing that a frame pointer stack can be augmented correctly with a partial Dwarf unwind. So add a feature check so that this test skips instead of fails if Dwarf unwinding isn't present. Signed-off-by: James Clark Reviewed-by: Ian Rogers --- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/t= ests/shell/test_arm_callgraph_fp.sh index e342e6c8aa50..83b53591b1ea 100755 --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh @@ -8,6 +8,12 @@ shelldir=3D$(dirname "$0") =20 lscpu | grep -q "aarch64" || exit 2 =20 +if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q= OFF +then + echo "Skipping, no dwarf unwind support" + exit 2 +fi + skip_test_missing_symbol leafloop =20 PERF_DATA=3D$(mktemp /tmp/__perf_test.perf.data.XXXXX) --=20 2.34.1