From patchwork Tue May 16 02:37:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 94422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp129895vqo; Mon, 15 May 2023 19:56:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kPzx8DTXMpTwP1hg8lYfcAkikNJnHnEc8BjvsAU7eGR1QOms1S69BmseReWuvK6NFeBv+ X-Received: by 2002:a05:6a20:440c:b0:ff:7ebe:279a with SMTP id ce12-20020a056a20440c00b000ff7ebe279amr44567481pzb.41.1684205804206; Mon, 15 May 2023 19:56:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684205804; cv=pass; d=google.com; s=arc-20160816; b=ibjg5EUJsSFbRE/oRxJeufQbR97ateff3sKs2R/3eVO5B1Hpg8M+VQbELny9sEVUtH Y6s6zZBkzxPLXIozlGC4nzLVXY6LNolCtm+Wp9he+wEFoysQ/v40no5DzlO0/1/ZxXe6 AxKnRy9C+1TqUQzyh+DHE+vgX26yfChl1yVI3608EEyhHroGccSOxR3ivGYgOyQVz8u6 47QilIa9XGFC2CIeGNje8FUsAM24P719GbVYEfMxiWzyWEj+UKOq5asnq0boPFskXUuB tBjqiNbEcPBVwWj398LB8JLWxtLgiUkeTensmvTEnz3AxGt9Pp5c4OiB1QQcjoRbm0qT 4xzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bO2caqLVL4na9vRhaLRzHMHo8PPCtDQLUiJLAMxFQKg=; b=fW5Sgb2zMmVUCQnQfW7UhB48FeaUW8EOKNVmD15iOlJQzUEHLvYLgUZGsiRfk8HxIF R4LLGer1vxgLNnwzUSZzgCiYhdiQNHXHtjJ+AgODAeN1VXG76a5F/4Vi/bLqwfQ8RMWe KEfgK2AMr5ooUyHmEDSntmgaooqUmLosBY4gM74sXETcsm/OLG9QYsegfyOoDzE+AuQT 0w9/Y9Po+dUoa2sedpAHFIyQ2/zxyuLgImdfg1eA+YHzjfiEmJggs4DfCYpN52vMprAY 41OGYU4Kq8knwkeHsb1jsHQTPdvLsEiuLZBTQhOjeKb3fLYP0N1Y7Y2++SbmcZ8yqTK8 b/ew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=C5tOhjac; arc=pass (i=1); 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w186-20020a6382c3000000b0051b70ce7dd2si17315429pgd.80.2023.05.15.19.56.30; Mon, 15 May 2023 19:56:44 -0700 (PDT) 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; dkim=pass header.i=@outlook.com header.s=selector1 header.b=C5tOhjac; arc=pass (i=1); 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbjEPCp1 (ORCPT + 99 others); Mon, 15 May 2023 22:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbjEPCpZ (ORCPT ); Mon, 15 May 2023 22:45:25 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2059.outbound.protection.outlook.com [40.92.41.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AC07448A; Mon, 15 May 2023 19:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R9DjbJPCDI3CJr4+UjVUrWMZMTpyhZ/FBH9ElDj61B11j/4GcBRO3NauSCMVnUrY08K4opCDbzzS40KJQeaUmcYHSL7knkEtqpk6tmt+jXoTqjfQEpLkvoDZ6hlPJX5tQ1/wIV5Dv5VOlN7VQKOXbc4tyvFY7A9H66jte2BZX938tXpuUjLsLRISQ8RT20+q6x/iy+X0aQi9nbjloq9iV+gIDxpt00DXm8B6D4cFLL0TPMPcVEXMIsjBh4LOyadu15PauvdpfFo+yZkWG0ENQiM2XrhpT9Zf1SVqYH7Rw/N3NNtpOO9tfSjz2s35AVVBuNBDsEfcupgQM82FzYeiYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bO2caqLVL4na9vRhaLRzHMHo8PPCtDQLUiJLAMxFQKg=; b=UN12aogekRIBQhWdK4xmZjiYleSs386yBpf7WHRutoNjLQo4KPkOhdZpOMZuKA7Ih6qv5Xrw+Ga8XpGkFHqyuere//WbPliPqiFJBSxVkuQGNQqDgywUTA08cJ4Tm4Fxj0EZg/WMf5yuG5FLmksJTuDLlmJ2Yt6ZvLExiD0eq6uJ8Y9sJFoGHwtDe7AMbnuHO15tMxcNU8rRBVTiOjZhL4Ht3eUcnO7eLde7+y5SQFSoxxM514j3onSQIKLl7tSgce16IHVlXyv9wBeELH+LJCFnfoJy9bzNNEBn78alWcqwbZlYWjY8wgZaB9jcySzR3na4RyFIspwsT/z0/Mux+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bO2caqLVL4na9vRhaLRzHMHo8PPCtDQLUiJLAMxFQKg=; b=C5tOhjacTtRW6M1eTnK8VOe2RiW9FPkJfLRdnkJWOeADFBY3PgbBVe6bu/H3taDp+g97ha5z+YpJ3/AoMR5I+s/xdxApWYEocuFbNUikElYEvw2B2Dw05oyt9RqBt6Xu/tNGV4ymHgfBnMaJXkpYquhf7Mn3mJ32eOaZzEUueX/2wUTxzIHTj0WtqQNQBgQXTKRCQKMKsF4I111tk2Q06DT0Ps63A6heiDJgBSSI71k0k/CSHvrW0zjSorB/2rY3BhiiDlTmu/q3Zwu/zdYoHoULj2ZIbArjvP1kHytqIwPTNHchP+249Nv6EcVRFZZ2KY1DAzibYYlJWkhjOGnyXw== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH7PR20MB4457.namprd20.prod.outlook.com (2603:10b6:510:13d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Tue, 16 May 2023 02:45:21 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989%6]) with mapi id 15.20.6387.021; Tue, 16 May 2023 02:45:21 +0000 From: Inochi Amaoto To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nikita Shubin Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Inochi Amaoto Subject: [PATCH 1/2] perf tools riscv: Allow get_cpuid return empty MARCH and MIMP Date: Tue, 16 May 2023 10:37:13 +0800 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230516023714.306240-1-inochiama@outlook.com> References: <20230516023714.306240-1-inochiama@outlook.com> X-TMN: [xFPXv+togL8Ze0Iu4euHMYKGdBZiYK9Ci3fEUiOKbZg=] X-ClientProxiedBy: SI2PR01CA0030.apcprd01.prod.exchangelabs.com (2603:1096:4:192::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20230516023714.306240-2-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH7PR20MB4457:EE_ X-MS-Office365-Filtering-Correlation-Id: 05d51821-b946-402d-3499-08db55b79747 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqZFoN70z2Nlv7ldomxpsZ90jNkArboxeBTfSDhMBSZt1qSs0G+DrhPF+GEPwxJR7lSVkxivYiW4ZcjdcYHySOS1ddLYZtI4sBah6430phEx1akXvI25rH2YrhsRJwXlfSloYs8G5+mIUr3fHflS2RTgi8DgU9rKFwZey6qQMh/d1mxk56MT0Glwolh8SMWUGzPF+qph2kY+l16zp/nD0t5FIYGX06agCjJM6xLP6Ar6pDFOLr72zkq8LJqxPhJlNIfZ9TFDRuquksZpez4r99EU+0+MyQrPp9pJPD4aKvRVlUuoWna7D5k99woyMNwY1O4ffbSKEbyQF8YDGwMZr/5wfu1WGQddM76bJRdGBCx3XQyIEElKWd3jG/l+oavQI2Z5HWUunZ0SQq4hXIikGHojNfJo2Pmvq/21qtxtxulYnIHFIaOtX9l7XbHhEtfVjxmtE2Cij55G6osL5s2W+0gU9aa7Tw4ZP6PX01owQ6pTHEADq+rnL4Xk9x0WWIEKKclwCVxEBU5dR1iretWOxpbYFfnFoyxoMSz+2I8pPjnz/B3LGV6QWGeKB6hPIlNbXOsflOyjG9al7QmncdJrWnFHpKuDIptC9qW5gWMYwz7w5ezie38nVWg+2qEm06hwjYY0RV3olwF5c5d9KEXgLRuMDi26XPCa6/hhDmnlq8w3th+s23/zK13PQzmnFRbQng1BdXfnBsE7lHKGatTup4QN+7cqt2eFhs2sj6P7Vdm/V7+noli7A2G7wR2/JNJVoQ= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OdHqWTCVUsQlJu1e1uwoHa3MDOrew5raTGYgnAPCXgHHRWBrjllbxJ+J5sWJ9FfYDHCxNjKr0b66Aez25z58VdtOdA+/29V8ujnh5SCdPZ+XiDWQqAK1MAkeo7VrQPkxW6Vh81P6ai1ICsog7utzxICv/A4a3JnetWbsB9hRQtpUDnOHgprE2QbRkxF5bridikm8bZYXhWc1jFH198JyNsWouVu6iJnb7XVTCWlkdVEa44ftRijToqnkMHBHS39mDNslPKu2dC1RjRpfWj4Fg4gVyI511R5exDBihx7TRtUsReN1IS+vs2pdpVU+SgTsXOOOn13RNI2VB093Vx32AwigNQlLmZ+PqXDPBnnRwyDol8+GoWWd6RcfV1JeTSTn/bHB15CvN6in9ZI1xUEOkAPW/8rN1HDoLqqJsP56oN4rJVy5yAwOP6CI6ITxgCCENJ1/RfPh0ohDcQP8mZoIZABC+hP/tOSHApAI8l7uMY8y8blVPXh9N4xvR6TpztghTiVoZjLBpqm99xBU3ycjjpMaWUdnhdkrOI+vx+M2QUg9jqExGoQvftvaoZXwm7eKjkK/nKTX2xFqVpP3r/ebR3ek9+lqbFbSXFNBQDxizZ4QqtM63O0M2Kongf1PNxh4 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SXCR4KKy/H7vGwmgs0JiFSdr7xbcLxRcwykkurC9mdBcwlA7MiYgRdg+lgKoLuNLZVRTmVJUKapq2nNXpHqBg/Gg0zWK7VYqM8hcxeKMM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KrHV80qtKUnVB9p2ZXIGLfx4Sm0nqlpg1xfjAgLvqRhGXEamKOyTI0OqHcEw= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05d51821-b946-402d-3499-08db55b79747 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 02:45:21.0534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR20MB4457 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1766017785234940434?= X-GMAIL-MSGID: =?utf-8?q?1766017785234940434?= The T-HEAD C9xx series CPU only has MVENDOR defined, and left MARCH and MIMP unimplemented. To make perf support T-HEAD C9xx events. remove the restriction of the MARCH and MIMP. Signed-off-by: Inochi Amaoto --- tools/perf/arch/riscv/util/header.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/perf/arch/riscv/util/header.c b/tools/perf/arch/riscv/util/header.c index 4a41856938a8..031899c627f6 100644 --- a/tools/perf/arch/riscv/util/header.c +++ b/tools/perf/arch/riscv/util/header.c @@ -55,18 +55,13 @@ static char *_get_cpuid(void) goto free; } else if (!strncmp(line, CPUINFO_MARCH, strlen(CPUINFO_MARCH))) { marchid = _get_field(line); - if (!marchid) - goto free; } else if (!strncmp(line, CPUINFO_MIMP, strlen(CPUINFO_MIMP))) { mimpid = _get_field(line); - if (!mimpid) - goto free; - break; } } - if (!mvendorid || !marchid || !mimpid) + if (!mvendorid) goto free; if (asprintf(&cpuid, "%s-%s-%s", mvendorid, marchid, mimpid) < 0) From patchwork Tue May 16 02:37:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 94418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp129262vqo; Mon, 15 May 2023 19:55:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Z6zlgE6JteS9MfUXG0P9WiwBlE9OoFGGaJ7f/9APXH3cYcrVTZ+nOs9Xx701dVbwwQW98 X-Received: by 2002:a05:6a20:9193:b0:ec:7c4f:ed7a with SMTP id v19-20020a056a20919300b000ec7c4fed7amr44509479pzd.34.1684205704047; Mon, 15 May 2023 19:55:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684205704; cv=pass; d=google.com; s=arc-20160816; b=tDOaximlbN8dQ5gzhMIu1+7isQUgH6UtrkHOv93lKUPbGEJ5s1evDxDeOlKGXrYvFs u06RYKt3mnTR6VKp1M6h86vRifJX/T/WBGGLQJoqgjc2Xf8wgEMVRyyJACyDeUx91nQd gpLXpmA0PyOVsdh1DAwNanAgAVKp+RfzhkXwLJP41MNyXU459UzBpL7kZyW7NfLZUth1 VnAXoqJ7WUcDCCCFD8dvsmU4z48A4I8LrILlurfVbE687lGGcgvnbmzS8Iu2fjo3Owkz W/mCi12R9TIO2UWa+WHj69gusL+gVv2LitGBg1cKiXfFy1w8iyxWwNQidQDouY6X1Fjs xjpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OPtDhu2ar+vR3t0fDyH88n6nD/SsY+FFSxhJp/ZgWPY=; b=ZM6vN5nuMwbx+VX5mga//LvAJqCoaU0MVdS3RN3vE7yRdh4wIdMbfhxmyCcfjvtl6q MWV19BQ35mwM3mBxw9k4gLQmWK7b4b69E7bq3hDtxmWAOfxf9Em2Rpn69ofAVqyYVKzF gnuUmHA3XriZfWfeZFJV3rE1WvkmU/W2fXA7y+b6suk6ST1yu5cVCBJocOp7svHo0VSG FVdewX4X7Y0Saj/WPBN0gQuAyeNytQg5zT61e9Ka84yG9qhao861HsHIOfr57i4tB48W c7K5CeqkcYNCTsNAf/qxn1Qc3DPwXua5drcFJ9Sp/29sJk6Vps4h3QEXXneZc36gnv4q jiGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=LOEukIaB; arc=pass (i=1); 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a637a01000000b00517f0c53072si18632808pgc.170.2023.05.15.19.54.51; Mon, 15 May 2023 19:55:04 -0700 (PDT) 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; dkim=pass header.i=@outlook.com header.s=selector1 header.b=LOEukIaB; arc=pass (i=1); 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjEPCpj (ORCPT + 99 others); Mon, 15 May 2023 22:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbjEPCpf (ORCPT ); Mon, 15 May 2023 22:45:35 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2052.outbound.protection.outlook.com [40.92.41.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB27D4682; Mon, 15 May 2023 19:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJSqI72pK/Ifa05GoFlXWoJioo3gNHA3A1PYkErGMzSIzpt/xe+8TtkYAFHbvXePrbLOqDMfaqkVWR89+vF/bexX67Rd5lP+439sZz5AEZo7bXd2KDtKyB6XUtuc+Ebd+HpyvHr77tEGqQWR5Rt52QETV+RtsOJgWHn3quyqb9lLPMSoZ8Jlo/J0y/VQteqsUcygtLUybtDt4wRnt7pOyQzw2woym6SxLQl9G/w9slWvm6kArJP1hxAHPDfiYwpNa/BjM6nTGPHyWjfgB2Xq+lt4xRUUHKO4BnJcYaI+mOoKFyXYW5LRAO/znUXl1aUFYf+DnaBcamllJIf7i9RA0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OPtDhu2ar+vR3t0fDyH88n6nD/SsY+FFSxhJp/ZgWPY=; b=QjjyT3FuugsljnjW5WQZEMZmVs/GpTs3RxGdpYSyeRio/+DVIDntBvKdI7WCbD8afaiXbi2uYOpvSZxSWu1FhbuYg+HJjaH4UkHh7uEVW2uwexo2Xe7YYFPAZGWXq/quKtG96S5VDFIUVorYRCbLCmKBWGTb9witT5BJqjThX9wiAcaC0KkPxfywgMB0K71odyocyKIVIjrdvV3ckjUeVBJ7hnvCxuANJmuPN/6LeoP0+qWGxl6culGGjfYwM0YMEHXsxE+EEo8/S0qkt1z6EBZxVP3q7yg/Ckww2jHkAR9zwOEivwpM/OQIQvcoq/IfJ5aUXSI4oKrlJJtVUNt+UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OPtDhu2ar+vR3t0fDyH88n6nD/SsY+FFSxhJp/ZgWPY=; b=LOEukIaBzaq/l1ZCiAu1L6auDToYSppOLYcs3w3gyb1kBKNWPlA3YX/1Yd9ZWoTScvO4qnlDZtN0g8VSOgqOal7rLbIzDx9jzw5MkSbFE88hjmhU5OxcV1ZgOg+eVGNxwnD2Lj2LVHw236WC/miZdkIRDIzEriBl8JyTRI0HRc4SXk2oPaKwqUzMJVm6lHzB99Q5F7dC0yuhe4YVjZaZuJKRzo8VjvhNfL15cETjdNx6WtWuzjh5zfeby9l2DtvEWOF5UGymOGlIP+rhF/ubEVWz2Q/dFP6j4D4HeCIgk+gIHC0DbW8930sSc2Hx6pfTaz8uNjhAmp398NJ6Z0tv1w== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH7PR20MB4457.namprd20.prod.outlook.com (2603:10b6:510:13d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Tue, 16 May 2023 02:45:30 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989%6]) with mapi id 15.20.6387.021; Tue, 16 May 2023 02:45:30 +0000 From: Inochi Amaoto To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nikita Shubin Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Inochi Amaoto Subject: [PATCH 2/2] perf vendor events riscv: add T-HEAD C9xx JSON file Date: Tue, 16 May 2023 10:37:14 +0800 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230516023714.306240-1-inochiama@outlook.com> References: <20230516023714.306240-1-inochiama@outlook.com> X-TMN: [T7sDNuKx8UdW7Q6dIlzUjkvNga96UzILPDeaGBU5bnw=] X-ClientProxiedBy: SI2PR06CA0002.apcprd06.prod.outlook.com (2603:1096:4:186::10) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20230516023714.306240-3-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH7PR20MB4457:EE_ X-MS-Office365-Filtering-Correlation-Id: e535d8f1-e53d-4ce6-6595-08db55b79cab X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nBJnOPH7CaP3sGjdDm6sgkhlmKtkRoFjduMTDi/LON24H5VvH+IWKaQUtth4UAZMWIR3Jfy3LnoDsIGYU/UvdTWygNn3DrCZ/0RaY5yiSrt+WfBOGHs0tfCfrpxqVFhqLs6JrY/62QohM2q73bZu5oBtcLZy3ZVYVna5AusSQ+po0QZyokGI76wgAV2yVgmfVXM5XHkwhmmzbZnVT1w0J/EHjaFKgcf2QqOO73OMu/nCNU/BOmTQ/dXCdWQuK/ORIWw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kzgrUlQwHLXmp24l5X3TImnCF4YOorEQ1oG//7h0bGlPL28fvunC4nqeQi6tAMWVmG3Z3F/iOp1AgCLPeqXmhhLiZzXLj04ebRD/43O6Wg2yYTbnO9VVAFEpvfx4d0EIsXvbUPlNYBw6/i8jv5dOqVU+vntylag4JKgg9dayq4f/hYOceU4wKphY9adcOJqD/DdfjZogBfBQlFzJpL7sra673nJ98/615QZhAXI9tRaklIe/+dNrwimWpSd9NR6CorHn5o5O3vhReLOhuSew5HLDSZSii0vacs5jN0Jyg3REkn1ueHImfErk2Ol+vk4uaZtH90OQdy0Fp3aAl8fqPQlXGxBpL2eyjJ84keIo6Qx2Sy1yvn52T0= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e535d8f1-e53d-4ce6-6595-08db55b79cab X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 02:45:30.0979 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR20MB4457 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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?1766017680188054321?= X-GMAIL-MSGID: =?utf-8?q?1766017680188054321?= Add json file of T-HEAD C9xx events. Signed-off-by: Inochi Amaoto --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../arch/riscv/t-head/c9xx/cache.json | 67 ++++++++++++++++++ .../arch/riscv/t-head/c9xx/firmware.json | 68 +++++++++++++++++++ .../arch/riscv/t-head/c9xx/instruction.json | 22 ++++++ .../arch/riscv/t-head/c9xx/microarch.json | 42 ++++++++++++ 5 files changed, 200 insertions(+) create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/cache.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/firmware.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/instruction.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/microarch.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index c61b3d6ef616..9fbdfcdc17ad 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -15,3 +15,4 @@ # #MVENDORID-MARCHID-MIMPID,Version,Filename,EventType 0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/u74,core +0x5b7-0x0000000000000000-0x[[:xdigit:]]+,v1,t-head/c9xx,core diff --git a/tools/perf/pmu-events/arch/riscv/t-head/c9xx/cache.json b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/cache.json new file mode 100644 index 000000000000..2c6e9a904a11 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/cache.json @@ -0,0 +1,67 @@ +[ + { + "EventName": "L1_ICACHE_ACCESS", + "EventCode": "0x000001", + "BriefDescription": "L1 instruction cache access" + }, + { + "EventName": "L1_ICACHE_MISS", + "EventCode": "0x000002", + "BriefDescription": "L1 instruction cache miss" + }, + { + "EventName": "INST_TLB_MISS", + "EventCode": "0x000003", + "BriefDescription": "Instruction TLB (I-UTLB) miss" + }, + { + "EventName": "DATA_TLB_MISS", + "EventCode": "0x000004", + "BriefDescription": "Data TLB (D-UTLB) miss" + }, + { + "EventName": "JTLB_MISS", + "EventCode": "0x000005", + "BriefDescription": "JTLB access miss" + }, + { + "EventName": "L1_DCACHE_READ_ACCESS", + "EventCode": "0x00000c", + "BriefDescription": "L1 data cache read access" + }, + { + "EventName": "L1_DCACHE_READ_MISS", + "EventCode": "0x00000d", + "BriefDescription": "L1 data cache read miss" + }, + { + "EventName": "L1_DCACHE_WRITE_ACCESS", + "EventCode": "0x00000e", + "BriefDescription": "L1 data cache write access" + }, + { + "EventName": "L1_DCACHE_WRITE_MISS", + "EventCode": "0x00000f", + "BriefDescription": "L1 data cache write miss" + }, + { + "EventName": "L2_CACHE_READ_ACCESS", + "EventCode": "0x000010", + "BriefDescription": "L2 cache read access" + }, + { + "EventName": "L2_CACHE_READ_MISS", + "EventCode": "0x000011", + "BriefDescription": "L2 cache read miss" + }, + { + "EventName": "L2_CACHE_WRITE_ACCESS", + "EventCode": "0x000012", + "BriefDescription": "L2 cache write access" + }, + { + "EventName": "L2_CACHE_WRITE_MISS", + "EventCode": "0x000013", + "BriefDescription": "L2 cache write miss" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/t-head/c9xx/firmware.json b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/firmware.json new file mode 100644 index 000000000000..9b4a032186a7 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/firmware.json @@ -0,0 +1,68 @@ +[ + { + "ArchStdEvent": "FW_MISALIGNED_LOAD" + }, + { + "ArchStdEvent": "FW_MISALIGNED_STORE" + }, + { + "ArchStdEvent": "FW_ACCESS_LOAD" + }, + { + "ArchStdEvent": "FW_ACCESS_STORE" + }, + { + "ArchStdEvent": "FW_ILLEGAL_INSN" + }, + { + "ArchStdEvent": "FW_SET_TIMER" + }, + { + "ArchStdEvent": "FW_IPI_SENT" + }, + { + "ArchStdEvent": "FW_IPI_RECEIVED" + }, + { + "ArchStdEvent": "FW_FENCE_I_SENT" + }, + { + "ArchStdEvent": "FW_FENCE_I_RECEIVED" + }, + { + "ArchStdEvent": "FW_SFENCE_VMA_SENT" + }, + { + "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" + }, + { + "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" + }, + { + "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED" + }, + { + "ArchStdEvent": "FW_HFENCE_GVMA_SENT" + }, + { + "ArchStdEvent": "FW_HFENCE_GVMA_RECEIVED" + }, + { + "ArchStdEvent": "FW_HFENCE_GVMA_VMID_SENT" + }, + { + "ArchStdEvent": "FW_HFENCE_GVMA_VMID_RECEIVED" + }, + { + "ArchStdEvent": "FW_HFENCE_VVMA_SENT" + }, + { + "ArchStdEvent": "FW_HFENCE_VVMA_RECEIVED" + }, + { + "ArchStdEvent": "FW_HFENCE_VVMA_ASID_SENT" + }, + { + "ArchStdEvent": "FW_HFENCE_VVMA_ASID_RECEIVED" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/t-head/c9xx/instruction.json b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/instruction.json new file mode 100644 index 000000000000..53c5a9838400 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/instruction.json @@ -0,0 +1,22 @@ +[ + { + "EventName": "BR_COND_MIS_PRED", + "EventCode": "0x000006", + "BriefDescription": "Conditional branch mispredict" + }, + { + "EventName": "BR_INDIRECT_MIS_PRED", + "EventCode": "0x000008", + "BriefDescription": "Indirect branch mispredict" + }, + { + "EventName": "BR_INDIRECT_INST", + "EventCode": "0x000009", + "BriefDescription": "Indirect branch instruction" + }, + { + "EventName": "INST_STORE", + "EventCode": "0x00000b", + "BriefDescription": "Store instruction retired" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/t-head/c9xx/microarch.json b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/microarch.json new file mode 100644 index 000000000000..47f94890d20f --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/t-head/c9xx/microarch.json @@ -0,0 +1,42 @@ +[ + { + "EventName": "LSU_SPEC_FAIL", + "EventCode": "0x00000a", + "BriefDescription": "LSU Spec Fail" + }, + { + "EventName": "RF_LAUNCH_FAIL", + "EventCode": "0x000014", + "BriefDescription": "Register file launch fail" + }, + { + "EventName": "RF_REG_LAUNCH", + "EventCode": "0x000015", + "BriefDescription": "Register file reg launch" + }, + { + "EventName": "RF_INSTRUCTION", + "EventCode": "0x000016", + "BriefDescription": "Register file instruction" + }, + { + "EventName": "LSU_STALL_CROSS_4K", + "EventCode": "0x000017", + "BriefDescription": "LSU stall with cross 4K access" + }, + { + "EventName": "LSU_STALL_OTHER", + "EventCode": "0x000018", + "BriefDescription": "LSU stall with other events" + }, + { + "EventName": "LSU_SQ_DISCARD", + "EventCode": "0x000019", + "BriefDescription": "LSU SQ discard" + }, + { + "EventName": "LSU_SQ_DISCARD_DATA", + "EventCode": "0x00001a", + "BriefDescription": "LSU SQ data discard" + } +]