From patchwork Mon Mar 20 15:15:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13181466 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 AD23DC7618D for ; Mon, 20 Mar 2023 15:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: 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=Gs0z39MuMuOm4DoRGdvKPGwMCMeMgFMichNY52wOVQg=; b=n2of16KegnVEZs K3tcCdilhQ9XDVdiouJsOWvVcLYOet0U5mWsywuJnVeNgIxLtOioZAfoJIZRSBPCBnvCH2gkFjHwI ZzUjt2ar7l5CVkJXQZuKMzQnr1OKZZxquPBsKPvw0IDyQz/2tgYbLITXbz+4c/m2vIIgwsj8hI6zW EG1pbnoMpvVMi/uqlp0ggIUZRHw7u/nZVZH1xzEgi+qJiNq/MMRXP8mygHEcVF+09nbI1X+POm+Wv Tc+4KvZp46X9L/caJSsweWYuQkQsGNtHEt0W9+4aJFh9bC+Xt1DXs3lJIdniuBWl8YKRhUZieupzi ow41WjuT9ZOlXjImeGTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peHEL-009UQ5-0K; Mon, 20 Mar 2023 15:15:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peHEI-009UOo-0Z for linux-arm-kernel@lists.infradead.org; Mon, 20 Mar 2023 15:15:23 +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 E183CAD7; Mon, 20 Mar 2023 08:16:01 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9A7D93F71E; Mon, 20 Mar 2023 08:15:15 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, Anshuman.Khandual@arm.com Cc: James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , Mike Leach , Leo Yan , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/4] Enable display of partial and empty SVE predicates from Arm SPE data Date: Mon, 20 Mar 2023 15:15:04 +0000 Message-Id: <20230320151509.1137462-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_081522_263410_F97845EE X-CRM114-Status: GOOD ( 15.56 ) 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 v1: * Rebase onto perf/core because it no longer applied cleanly ------------ 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: 96d541699e5c50b1bc2d50c83cd7145994d5f071 Acked-by: Ian Rogers