From patchwork Mon Dec 19 16:12:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13076976 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 073AAC4332F for ; Mon, 19 Dec 2022 18:15:26 +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=R2yRCaE9/6b39re0mWGZHhvYD45cb3R8LCSvKVjO1aA=; b=dVTTIvAWzyHH6x w3VrOtrA/nxXj0xTb/ezZSdD25VcPLDvwBlpEeTpoH4parn6vWUpV7qrGvWFqyTMMcSJE5p6O2aVx KaqovbTrAiJiOLJKkOQyCiCM8GnCPbMCqcpLFri+r33sgls0kO0JVfIXy/EN5LjTySUzi/fd2hoRJ ZAOOLaFr4GF/a9HUOq20g5BYmCQ/Tvxqtc0BMZXHvQHbbYxqP8CBWqFt3XtIcIRz0cxO46q7Zm8PZ Xe36JdVGOJWS8/EknyBq2HsT/aZKj6Wx0H0xexo4cIJfJp4MV+pd3a9CZ7NpuDWGm5KbmdVVzslXC 9Fd6iewC62IVQrXyqYgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7Kef-00HGv1-2X; Mon, 19 Dec 2022 18:14:25 +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 1p7Im7-00Frty-Fe for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 16:14:03 +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 7B601AD7; Mon, 19 Dec 2022 08:14:31 -0800 (PST) Received: from e126815.warwick.arm.com (e126815.arm.com [10.32.32.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B5683F703; Mon, 19 Dec 2022 08:13:48 -0800 (PST) From: James Clark To: linux-perf-users@vger.kernel.org Cc: robh@kernel.org, James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mike Leach , Leo Yan , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/4] Enable display of partial and empty SVE predicates from Arm SPE data Date: Mon, 19 Dec 2022 16:12:54 +0000 Message-Id: <20221219161259.3097213-1-james.clark@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_081359_783309_52EDAAA6 X-CRM114-Status: GOOD ( 14.86 ) 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 Hi, I'm submitting this on behalf of German who moved on to work on other things in Arm before he could finish it off. The predicate information is available on SPE samples from Armv8.3 (FEAT_SPEv1p1), this could be useful info for profiling SVE code as partial and empty predicates indicate that the full vector width isn't being used. There is a good example in the last commit message. Though currently, there isn't a suitable field to store the info on Perf samples, so this change also adds a new SIMD field. This field could be used by other architectures, but currently there is only one bit reserved to identify SVE. It's only added to struct perf_sample on the userspace side, and isn't part of the kernel ABI, so it doesn't survive a perf inject. Although this is the same behavior for some other fields like branch flags, so I don't think it should be an issue to do something similar here. Perhaps in the future we could make sure everything that is synthesised from auxtrace data also makes it back into the new Perf inject file without being lost. German Gomez (4): perf event: Add simd_flags field to perf_sample perf arm-spe: Refactor arm-spe to support operation packet type perf arm-spe: Add SVE flags to the SPE samples perf report: Add 'simd' sort field tools/perf/Documentation/perf-report.txt | 1 + .../util/arm-spe-decoder/arm-spe-decoder.c | 30 ++++++++++-- .../util/arm-spe-decoder/arm-spe-decoder.h | 47 +++++++++++++++---- tools/perf/util/arm-spe.c | 28 +++++++++-- tools/perf/util/hist.c | 1 + tools/perf/util/hist.h | 1 + tools/perf/util/sample.h | 13 +++++ tools/perf/util/sort.c | 47 +++++++++++++++++++ tools/perf/util/sort.h | 2 + 9 files changed, 152 insertions(+), 18 deletions(-) base-commit: 573de010917836f198a4e579d40674991659668b