From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD095C433DB for ; Fri, 12 Feb 2021 09:55:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E77664E6B for ; Fri, 12 Feb 2021 09:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbhBLJzw (ORCPT ); Fri, 12 Feb 2021 04:55:52 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2557 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbhBLJzq (ORCPT ); Fri, 12 Feb 2021 04:55:46 -0500 Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DcTHx69NQz67lYN; Fri, 12 Feb 2021 17:50:05 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 12 Feb 2021 10:55:05 +0100 Received: from [10.47.10.68] (10.47.10.68) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 12 Feb 2021 09:55:04 +0000 Subject: Re: [PATCH v6 2/3] perf tools: Add lexical definition of event name To: Shunsuke Nakamura , , , , , , , , , , CC: , References: <20210212090318.1522292-1-nakamura.shun@jp.fujitsu.com> <20210212090318.1522292-3-nakamura.shun@jp.fujitsu.com> From: John Garry Message-ID: <1e786f11-708f-85db-e965-a6ade5781b32@huawei.com> Date: Fri, 12 Feb 2021 09:53:28 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20210212090318.1522292-3-nakamura.shun@jp.fujitsu.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.10.68] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/02/2021 09:03, Shunsuke Nakamura wrote: > Add the lexical definition of event name so that the numbers are recognizable. > > A64FX defines an event name that starts with a number. > - 0inst_commit > - 1inst_commit > - 2inst_commit > - 3inst_commit > - 4inst_commit > > Signed-off-by: Shunsuke Nakamura > --- FWIW, Acked-by: John Garry I would prefer if more knowledgeable perf reviewers also checked this... > tools/perf/util/parse-events.l | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l > index 0b36285a9435..33f627187415 100644 > --- a/tools/perf/util/parse-events.l > +++ b/tools/perf/util/parse-events.l > @@ -205,7 +205,7 @@ bpf_source [^,{}]+\.c[a-zA-Z0-9._]* > num_dec [0-9]+ > num_hex 0x[a-fA-F0-9]+ > num_raw_hex [a-fA-F0-9]+ > -name [a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]]* > +name [a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]]* > name_tag [\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\'] > name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]* > drv_cfg_term [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)? >