From patchwork Wed May 25 15:41:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 12861385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C17BC433F5 for ; Wed, 25 May 2022 15:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=C54NxBb/G4VeMnDU21YKkPvGzFc+l1GMl/OH1BwTrds=; b=0sQScjc426I5k4 bQP+AE4gHBh7vh1ND/r07cuOVHchC86WmjudHS3gOweVHjx/8DTcBTM8XkM9LDL7/8Rz7eRddVYGR tgX1+vAVUhCNH/C790ZWjRwNq6bQiJyr6eGlk5M3Xp+u+I0i5jSozgmeA69PWiy/luE2hUCPCwQsG xJrajZhyT/o+sBNSHyf1FjOfmF4oIt7w7Imww+NIW8OKg5FThgt1KbJnNLkdSvTJx6cW1P+RZ2sRw 1zneGTns2oF4SE50n92+eBaj5yenNkYoqKCJFSgnnjJCrXl6Yi9HeaBB3/wn79OA1jsW131F961jA Vm1BGVVCAWdh9PyGDbRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntt8y-00BcZH-0M; Wed, 25 May 2022 15:41:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntt8v-00BcX2-4t for linux-arm-kernel@lists.infradead.org; Wed, 25 May 2022 15:41:50 +0000 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 71F221424; Wed, 25 May 2022 08:41:43 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.8.252]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 77E9A3F73D; Wed, 25 May 2022 08:41:39 -0700 (PDT) From: James Clark To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: broonie@kernel.org, german.gomez@arm.com, leo.yan@linaro.org, mathieu.poirier@linaro.org, john.garry@huawei.com, James Clark , Will Deacon , Mike Leach , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/5] perf: arm64: Tools support for Dwarf unwinding through SVE functions Date: Wed, 25 May 2022 16:41:09 +0100 Message-Id: <20220525154114.718321-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220525_084149_294899_4D7EDC34 X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes since v2: * Add commit to fix header include path to use Perf's copy * Apply Leo's review tags When SVE registers are pushed onto the stack the VG register is required to unwind because the stack offsets would vary by the SVE register width at the time when the sample was taken. The patches ("[PATCH v2 0/2] perf: arm64: Kernel support for Dwarf unwinding through SVE functions") add support for sampling the VG register to the kernel and the docs. This is the patchset to add support to userspace perf. A small change is also required to libunwind or libdw depending on which unwinder is used, and these will be published later. Without these changes Perf continues to work with both libraries, although the VG register is still not used for unwinding. Thanks James James Clark (5): perf tools: arm64: Use perf's copy of kernel headers perf tools: arm64: Copy perf_regs.h from the kernel perf tools: Use dynamic register set for Dwarf unwind perf tools: arm64: Decouple Libunwind register names from Perf perf tools: arm64: Add support for VG register tools/arch/arm64/include/uapi/asm/perf_regs.h | 7 +- tools/perf/arch/arm64/util/perf_regs.c | 34 +++++++++ tools/perf/arch/arm64/util/unwind-libunwind.c | 73 +------------------ tools/perf/util/evsel.c | 2 +- tools/perf/util/libunwind/arm64.c | 2 +- tools/perf/util/perf_regs.c | 2 + 6 files changed, 46 insertions(+), 74 deletions(-)