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: 3100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2479118wrn; Mon, 19 Dec 2022 08:14:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4I84LZatUBoQhV1Zl3BAuR4KyQJmb33MhSxDSnrEH10JqAKezABRq1r+wN2zk005rrm0+p X-Received: by 2002:a05:6402:e06:b0:46c:2c94:d30a with SMTP id h6-20020a0564020e0600b0046c2c94d30amr39376434edh.31.1671466478464; Mon, 19 Dec 2022 08:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671466478; cv=none; d=google.com; s=arc-20160816; b=NUEQu/GgDNCJ0vtS4OIZIFxB3aLpr4nkugeJo01y5vZlCQ+nloJto7KKXCX3wfiwDL NL3tJVFB15kJwbCxCzGOG74AyEorwdbIyB7eV3UpuK0gscmjZTZYWMrqLWgkBQCLBTkM WjwcjY2TlS5ge+jkxvBS9ac5h0A3d0/evPAkZw6XR2KfvK9Pu13oBVDfI6vjJ+jR7LGu AFzrQbClJxLRjfuFJJPm/xmLPUgS0tkm80Ssf1BsVbr0WwSHjo46lXqlE5SmhdDzooNl QDIIDMwlAT+NWaBJ5H8l23heyk/v7L3mqo5nfKdz58OOTjGp6EifjmscOjJfn55jheYd Hx4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8NtyBgD60CsRvrlqm4PNwGpYZ615y5TuOruy0xNBjsE=; b=SlncVHQYvmtBaP7JxRDkj52dCGBCWryKEt6O93IVhJ3/1Pzp7m+ZwG7XDC46jO20jc qJ4QzRsLZgf3TnjbcAWg2vZOsLHRarrBNH3Rm8HzQvQarNmxTIQu8NcL4xlNQHoaVkQF 70e10ooZRW5V0HC17JHzFarNl9jiFh81OMDxXIjuBBcJMod+QoSRVM18jVBBurnmhnEz S93oKhzsonS1s4FWSO9o69u8Y3bJegvMsZcKLxpb1VT3vdpvxKn2qVg9gjDJJpmYMrSx u5Wk9XsOOMOhFm1psdchf28/Hpigfg43UteP4e0Q0k7pxsHVVw1zkirfoTM9o4zSYtUC yR/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y4-20020a056402358400b004697dff9638si10575641edc.87.2022.12.19.08.14.14; Mon, 19 Dec 2022 08:14:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231586AbiLSQN4 (ORCPT + 99 others); Mon, 19 Dec 2022 11:13:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbiLSQNx (ORCPT ); Mon, 19 Dec 2022 11:13:53 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EF986A440; Mon, 19 Dec 2022 08:13:50 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752659633763612781?= X-GMAIL-MSGID: =?utf-8?q?1752659633763612781?= 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