From patchwork Mon Dec 19 16:12:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 34640 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2479142wrn; Mon, 19 Dec 2022 08:14:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf4x8tRQpR7k7U3x9t42SIgSB1Y0u4r0e+7M+VTkg8ZkRBifHUNInM72VI1Iz738IoM2fnqI X-Received: by 2002:a17:907:765a:b0:7c0:e305:a282 with SMTP id kj26-20020a170907765a00b007c0e305a282mr35677730ejc.59.1671466480165; Mon, 19 Dec 2022 08:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671466480; cv=none; d=google.com; s=arc-20160816; b=rMHvwiCx6wrRbzDc88NA6kSlkMtsrcmrJrtnAxwxFhl6am9M4E6vmdo19VOn2IY5lL sYQX6WClo2w8ogur5/FO5Q5jg5sT+CIdgYVeYsPwtdMIrDRud032TThgBfIKyIElDt0m LqOH3V0eBOjvwZUd4S6MTpf1Zb5tl6w2b6PhA/eXiwWS/2GdMiKyTTcm+5u9H8D74vMd HcS8p3H60+H0ejEbm0yRORzOapSSD3/cZOlr9yzFUPEmFWBDtPfl0Y70TPZ68c2OUE9C u5qRDwJtQQa98exmegYLxFAI6CBdYlwT8hrD5STZGwyAvbwfs2SIyTfabGAZZyM6m3CK RyTA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NzZ3/HpbxuUwwZfA+UifL/rR8MKO79+fObnuN3HgMww=; b=F0C3u0BrNsLaxTqT0+7r+lQErGHbJn3RNGnbjAIABvyHAHm+yQY6str6ln6a77GW80 INJRA+6z6LdUiy1C96A0tkDwuIVMM5Lh4QPEC3QO92/plME+SThk3GD7gYhY77kxvAJD pR+d904WnRpWkR/uw9ov0HMYD3OFT++4eJbn6bFqb1ENl7p9ymWHbj/VeUyBTOQWznJr n63nETELx8jcXiY53id/7AE6imyztTGF3DqrUWo2YbElX2BLTMnA4nfPhyhcQag/qwRq PmYmHwzNaZAMKyPEJ9udfsSseg0Nh6JQGgA+yMcQNhIsvykEIc7fFqEwF9eocXkwDELq CyEA== 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 qf39-20020a1709077f2700b00813b319af0esi3734244ejc.110.2022.12.19.08.14.17; Mon, 19 Dec 2022 08:14:40 -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 S231702AbiLSQN6 (ORCPT + 99 others); Mon, 19 Dec 2022 11:13:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbiLSQNz (ORCPT ); Mon, 19 Dec 2022 11:13:55 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 37A22DEA1; Mon, 19 Dec 2022 08:13:54 -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 BFCFBFEC; Mon, 19 Dec 2022 08:14:34 -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 8D78E3F703; Mon, 19 Dec 2022 08:13:51 -0800 (PST) From: James Clark To: linux-perf-users@vger.kernel.org Cc: robh@kernel.org, German Gomez , 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 1/4] perf event: Add simd_flags field to perf_sample Date: Mon, 19 Dec 2022 16:12:55 +0000 Message-Id: <20221219161259.3097213-2-james.clark@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221219161259.3097213-1-james.clark@arm.com> References: <20221219161259.3097213-1-james.clark@arm.com> 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?1752659635520668348?= X-GMAIL-MSGID: =?utf-8?q?1752659635520668348?= From: German Gomez Add new field to the struct perf_sample to store flags related to SIMD ops. It will be used to store SIMD information from SVE and NEON when profiling using ARM SPE. Signed-off-by: German Gomez Signed-off-by: James Clark --- tools/perf/util/sample.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h index 60ec79d4eea4..bdf52faf165f 100644 --- a/tools/perf/util/sample.h +++ b/tools/perf/util/sample.h @@ -66,6 +66,18 @@ struct aux_sample { void *data; }; +struct simd_flags { + u64 arch:1, /* architecture (isa) */ + pred:2; /* predication */ +}; + +/* simd architecture flags */ +#define SIMD_OP_FLAGS_ARCH_SVE 0x01 /* ARM SVE */ + +/* simd predicate flags */ +#define SIMD_OP_FLAGS_PRED_PARTIAL 0x01 /* partial predicate */ +#define SIMD_OP_FLAGS_PRED_EMPTY 0x02 /* empty predicate */ + struct perf_sample { u64 ip; u32 pid, tid; @@ -103,6 +115,7 @@ struct perf_sample { struct stack_dump user_stack; struct sample_read read; struct aux_sample aux_sample; + struct simd_flags simd_flags; }; /*