Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6612461rwb; Tue, 15 Nov 2022 00:47:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf5eNG1nk4Ngr2vJJPMFX5drlUn0TJAzTkn6Ys81SdoXmuF/YhIuvKVUpVlvGFfk/MmxoPkO X-Received: by 2002:a17:906:f0d7:b0:7ae:fbe8:a92e with SMTP id dk23-20020a170906f0d700b007aefbe8a92emr6172145ejb.369.1668502022102; Tue, 15 Nov 2022 00:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668502022; cv=none; d=google.com; s=arc-20160816; b=c9hTuZZ6/iyXI4rypYN24jZTy55F4mV6+a0rhraO/m7zvk8qQ/H2yVxgbtNVsjGcpX TLheF2W3cNakXkfG+A2r8krMLW/RULSNHLzrQwhVztRnoendBEMEImfOlfO3bH2nYAYK ddYdMum7k3HOqJb+A5pNh8b5bmcmzjaMVNutWeDk705cNA8F2uSodajJ1TLYFc3phGYb /v0GbEuOehAn404ailSRDkJfHDKISCLv5SeqgOJH/33QBxH0EBXF8amNngrPVQDZv+J8 m+fqWi8l/Fqz0Usmp7x32gsediQfH05EPbo3LsJc7c1g6KlFeR01E24ynjRiwYEYx8OW 7HAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=AdNdUG2CBbeJ2ZlO/fsogQqIzn+CHWwW/mcRoksOzJU=; b=AhDhl2Wjru/7caQEQ2y79P1iyUIkoYEQvlAuQLByllJsC3jqJAuKGY85ofyTPEHDsG rSvT3jBVy0DPiOrHJW9jgElJH2Srvx/gIKgBq152RVLQmVdvID8WTrFPzEhrbFSLTuxE D/E4xME+FZbGQxr2CzHVQLMpsyb08qqghVAhD66dfmQBI9rRRgR0mhs3IDKsDTcVAvJi Nl3KZ30Q/1eLFLjVpwi47/BOqTPLFFV1yHntKN9z4i8dl0sI5n117EAaQVmOES3Qqjcc hLao3tcvjxyc7FC2RV9Tj9eZMhdJ9dTPGJmZmPFhzczer4L8mOg33ThS4f++QNewvxG/ EBBw== 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=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t29-20020a056402241d00b004542c9947c1si10558322eda.217.2022.11.15.00.46.38; Tue, 15 Nov 2022 00:47:02 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbiKOInv (ORCPT + 89 others); Tue, 15 Nov 2022 03:43:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236567AbiKOInh (ORCPT ); Tue, 15 Nov 2022 03:43:37 -0500 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E95AF205EA; Tue, 15 Nov 2022 00:43:21 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUsd9r0_1668501796; Received: from 30.221.131.168(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUsd9r0_1668501796) by smtp.aliyun-inc.com; Tue, 15 Nov 2022 16:43:18 +0800 Message-ID: Date: Tue, 15 Nov 2022 16:43:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [External] : [RFC PATCH v2 1/6] perf vendor events arm64: Add topdown L1 metrics for neoverse-n2 To: John Garry , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> <1668411720-3581-2-git-send-email-renyu.zj@linux.alibaba.com> <590ff032-d271-48ee-a4d8-141cc070c335@oracle.com> From: Jing Zhang In-Reply-To: <590ff032-d271-48ee-a4d8-141cc070c335@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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 在 2022/11/14 下午8:59, John Garry 写道: > On 14/11/2022 07:41, Jing Zhang wrote: >> The calculation formula of topdown L1 is from the document: >> https://urldefense.com/v3/__https://documentation-service.arm.com/static/60250c7395978b529036da86?token=__;!!ACWV5N9M2RV99hQ!Ll-Jgvfs0LitTCU-hC6i6BKBVJfhke-pbQq2VoO-gmuSAcglQ3ZqMVMd2r0An_5a3ZDPYmn8zXuCrpUbehwnLHplVQ$  > > So since this is a from "standard" document, did you consider putting these as an arch std event? I think arch std events would work for metrics, like they do for regular events. > I didn't find out how to put the metric as an arch std event, it would be best if you could provide me with an example in the upstream code, thank you very much. >> >> However, due to the wrong count of stall_slot and stall_slot_frontend >> in neoverse-n2, the real stall_slot and real stall_slot_frontend need >> to subtract cpu_cycles, so when calculating the topdownL1 metrics, >> stall_slot and stall_slot_frontend are corrected. > > Is there a reference to this? It would be indeed useful to pass a link to the n2 doc as these metrics are not part of the arm64 arm. At least I assume that they are not there. > You are right, I need to add a doc link. ARM has released the n2 ERRATA document about the incorrect count of stall_slot and stall_slot_frontend, and provides a workaround to get the correct value. Link: https://developer.arm.com/documentation/SDEN1982442/1200/?lang=en >> >> Since neoverse-n2 does not yet support topdown L2, metricgroups such >> as Cache, TLB, Branch, InstructionsMix, and PEutilization will be >> added to further analysis of performance bottlenecks in the following >> patches. >> > > > Thanks, > John Best Regards, Jing