Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp641562rwb; Tue, 25 Jul 2023 23:51:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlGuo5nTqyaFh1dVDJbGF2OK+qPaVIKc3YPtBiENbvbM69DBuN5xx/IpmTL538uRWMTBoQcm X-Received: by 2002:a17:903:1251:b0:1bb:83ec:831 with SMTP id u17-20020a170903125100b001bb83ec0831mr1231216plh.25.1690354270230; Tue, 25 Jul 2023 23:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690354270; cv=none; d=google.com; s=arc-20160816; b=SprLPm/nhlzU0+/Ok3rhqbpSISKtSUJTjxpBlSbEIkVMVBNKpELqRjL+WOTufnhDvs Bno9nrWDOB/SvwOwlBf8Z6IsvBLCR8Qn4yZ3J9lsl65XQmHopAc8FtnHUqmkiczyZsbb 3hVNmiH3IAlkGMb8Oqur3vzwyG6k8Cs0mljr+8m79r4X0VUYzhDVJyrSbnkq5/TM3ECh szpz44R/GKGBJK6QstAsVF1nfaSJETzZUflpoZMZdg+duEKTmbyERhKGOPzn38kiJ2p/ 0rygEiS+91dzl7NDuljmVAR0JAx7QG0CKwFNRYyrLCFAuZlTlmjyA/5GvAYoidD0wkFW 1EnQ== 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=2bVt1NMtYA96aeDmtwI3zsG2G5jnnZ5EhyXLowad51o=; fh=Zi5LdlMBQJ86fGLr+5ZwdvbdImUhSSh3P/wP/BAC17c=; b=WJQ5embS0HGN1+dT9wBqnfXeT7jOhXaaTy0+OlbpOD9rP6lYLffVNj606faoSXBlM3 rXFTrjyHODZWr2sHLEpJL6N58Fee9RvirL0BWOLB8OIpSTulu1M1OApfbYFvaiwJmIQy /KYifdI3trAHJYyMlHb0tBDND8IRjqE2lRMJ6IpgABbOeO2mvhQiwhgzRDOqD0PP16vK fXrF22BHCN2MUw8bv7rtjkanDTc6VHTj4wYUVrk3iqBWS94V9KJl021VwY1bhqx9cXbG n0f9XkeQ4ZebMnlQe9NfHolAri5lhUyTdxdoji87ojre8tomy0gslDtMxnX1JiXyKv/8 GMJQ== 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 c1-20020a170902d48100b001b9d335180dsi13809437plg.618.2023.07.25.23.50.58; Tue, 25 Jul 2023 23:51:10 -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 S231824AbjGZGkV (ORCPT + 99 others); Wed, 26 Jul 2023 02:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231299AbjGZGkS (ORCPT ); Wed, 26 Jul 2023 02:40:18 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9657119A1; Tue, 25 Jul 2023 23:40:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VoFo2qO_1690353609; Received: from 30.221.150.4(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VoFo2qO_1690353609) by smtp.aliyun-inc.com; Wed, 26 Jul 2023 14:40:11 +0800 Message-ID: <4bb466a6-f64f-954c-0d4b-a140a555bffe@linux.alibaba.com> Date: Wed, 26 Jul 2023 14:40:07 +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 v4 2/4] perf jevents: Support more event fields To: John Garry , Ian Rogers Cc: Will Deacon , Mark Rutland , Robin Murphy , James Clark , Mike Leach , Leo Yan , 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, linux-doc@vger.kernel.org, Zhuo Song , Shuai Xue References: <1690100513-61165-1-git-send-email-renyu.zj@linux.alibaba.com> <1690100513-61165-3-git-send-email-renyu.zj@linux.alibaba.com> <13cdb7cb-e6c0-5b85-3ccf-adb3b0ed36e0@oracle.com> From: Jing Zhang In-Reply-To: <13cdb7cb-e6c0-5b85-3ccf-adb3b0ed36e0@oracle.com> 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_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,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 在 2023/7/25 下午5:41, John Garry 写道: > On 23/07/2023 09:21, Jing Zhang wrote: >> The usual event descriptions are "event=xxx" or "config=xxx", while the >> event descriptions of CMN are "type=xxx, eventid=xxx" or more complex. >> >> $cat /sys/bus/event_source/devices/arm_cmn_0/events/hnf_cache_fill >> type=0x5,eventid=0x3 >> >> When adding aliases for events described as "event=xxx" or "config=xxx", >> EventCode or ConfigCode can be used in the JSON files to describe the >> events. But "eventid=xxx, type=xxx" cannot be supported at present. >> >> If EventCode and ConfigCode is not added in the alias JSON file, the >> event description will add "event=0" by default. So, even if the event >> field is added to supplement "eventid=xxx" and "type=xxx", the final >> parsing result will be "event=0, eventid=xxx, type=xxx". >> >> Therefore, when EventCode and ConfigCode are missing in JSON, "event=0" is >> no longer added by default. EventidCode and Type are added to the event >> field, and ConfigCode is moved into the event field. > > What does "ConfigCode is moved into the event field" mean? > What I want to express is to move "ConfigCode" into the event_filed array which can also guarantee its original function. like this: event_fields = [ ... ('AnyThread', 'any='), ('PortMask', 'ch_mask='), ('ConfigCode', 'config='), ... ] Haha, my English language proficiency still needs improvement, please forgive me. >> > > There should be perf tool self-tests cases for this, see tests/pmu-events.c and tests/parse-events.c, like "umask" is tested > Ok, will do. Thanks, Jing