Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8719754rwd; Tue, 20 Jun 2023 20:20:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Yn0XJytFmPX7Xpwcuf2jf6XzoKARRMHaKJJCMQ1o4mt4EHQrZze6Fvezl/leUQhvVJa91 X-Received: by 2002:a17:90a:e293:b0:259:bf1:3030 with SMTP id d19-20020a17090ae29300b002590bf13030mr12746184pjz.42.1687317644524; Tue, 20 Jun 2023 20:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687317644; cv=none; d=google.com; s=arc-20160816; b=NtiDeHYxudfl+eR/NJj7pDfhgKyqmU9IjbxQ+auXCh2jbBFKhD+cNu+Df5Vr6H/xRd grMOpDVlr+8iSOKV1P7kRYNNh+05iVIiCE7MiUHCk0c+ZA3evFdGDrKdDnDNBvdRaBwA 002RrydqxaT8lEGcLR67DOWBQmNt8lumooK1qcXS1oTcjVMe3EUirUcB/PZ/STcT4bSp WzVklw8lGr4rnhIt43cEDN/bN3POy3Dni21atI8LiH56vq7gZWAFDa6il2a7q78EHinG eK47HQoWkwHYYWo60cjCS5uIABDYrOjCTeaUSai6sqNzM2ujGUUsglUh0rnGFpBCmz2x miUg== 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=nBd06Ypvi+JAiY8/ugvk2IWafrDwvHhy0+i05VMxunk=; b=A7rLxwQ5seJ01ia4r3UI8X0lqUlfHhXn1S/Rs7nLCa9SAZ5dPJjTT9V6hQAKG9AGjM 7TXHa8qw8bR19/krChxditrG0rla2tn9rqxpEloGwBQ9pm4m2BKSXXZl2/8I7qwXW9sX mEaT1zcWe01xtkBRRcifHEGoUXnVC0QIZcCDiDiX+vARSgisOjGvY8O0O2Nc621u6GDi 63D92YF3PYC4jHowhAqeKrjsDQzC+AhyfEqmFBA8D97/mUc1IoJPts0kUMGPDp0tS1af m1ixvY0LniQXAvpJvmz8+ViiXLsmfBL4nBXzPmLsdgGlKEq6hSU4rmZ88D1nrN6neHwp +w4Q== 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 az9-20020a056a02004900b005074cff89b9si1766616pgb.250.2023.06.20.20.20.30; Tue, 20 Jun 2023 20:20: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; 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 S229888AbjFUDP2 (ORCPT + 99 others); Tue, 20 Jun 2023 23:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjFUDP1 (ORCPT ); Tue, 20 Jun 2023 23:15:27 -0400 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D4E31717; Tue, 20 Jun 2023 20:15:24 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R451e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VleADK4_1687317318; Received: from 30.221.149.25(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VleADK4_1687317318) by smtp.aliyun-inc.com; Wed, 21 Jun 2023 11:15:19 +0800 Message-ID: <738dda90-6235-07dd-145a-d1dd3b1f5b5c@linux.alibaba.com> Date: Wed, 21 Jun 2023 11:15: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.11.2 Subject: Re: [PATCH v3 2/7] perf metric: Event "Compat" value supports matching multiple identifiers To: John Garry Cc: James Clark , Mike Leach , Leo Yan , Mark Rutland , Ilkka Koskinen , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Zhuo Song , Ian Rogers , Will Deacon , Shuai Xue , Robin Murphy References: <1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com> <1685438374-33287-3-git-send-email-renyu.zj@linux.alibaba.com> <452e724b-2a2c-52fd-274b-60db7a7f730e@linux.alibaba.com> <76fcb062-61a8-5f90-b39d-b5fb6da35652@linux.alibaba.com> <5f38ef6c-8c50-5df9-19dd-c3c9fe590452@oracle.com> <892f57c7-8ce2-634c-26f3-4d4ab8b2f2ce@oracle.com> <079d7920-2030-2e00-a833-5ec6d450f7dc@oracle.com> <552eebae-76bb-a2fe-ccdc-11e8a01717da@linux.alibaba.com> <045a49c9-b9ae-bf0e-c4be-858d905bcc55@oracle.com> <7c765e0f-ca76-d212-0496-f9c56369e389@linux.alibaba.com> <71c4ef1e-0982-1ef4-5135-001303b43cd3@oracle.com> <777e06ae-fd9c-8fd3-6976-7b80594e1942@linux.alibaba.com> From: Jing Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.0 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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,URIBL_BLOCKED,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 在 2023/6/20 下午3:01, John Garry 写道: > On 20/06/2023 03:12, Jing Zhang wrote: >>> But that JSON is not in this series. Why is it not included? >>> >> Because the RFC version of the cmn.json file does not define the EventCode for each event, this will not take effect, so I temporarily removed it. >> The EventID of CMN events is different from other events. For example, hnf_slc_sf_cache_access corresponds to arm_cmn_0/type=0x5,eventid=0x2/. >> The current JSON format parsing does not support this EventID, and jevent.py needs to be extended. > > So please do that then. I would suggest just to first support event aliasing, and then support metrics. JFYI, I am still reworking current perf tool metric code for sys events, which should take a few more days. > Ok, thank you. >> >>> The cmn kernel driver exposes event hnf_slc_sf_cache_access, but I did not think that perf tool metric code matches those events described in/bus/event_sourcs/devices//events >>> >> If there is no alias defined, other events with the same name may be matched, it is indeed necessary to define an alias for each event first, >> and I will add it in the next version. But first I need to extend jevent.py to support cmn EventID. > > ok, please do this. I assume that you are talking about wildcard matching for cmn HW identifier. We would also need perf tool self-test expanded to cover this wildcard matching - see tests/pmu-events.c > Ok, let me try. Thanks, Jing