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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B76C3C433DB for ; Tue, 16 Feb 2021 11:15:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77B4164DDA for ; Tue, 16 Feb 2021 11:15:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77B4164DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wFn6dz1GUWjqLBQubIzw3PcLYh0A2xzr7Rf7w5iGfQc=; b=LhEcT22WC0BWDLjWYNEZ3Ndzj ufgd+l5LFCZPoqBpug3xOxVWD5dyytke6ACupX1OW6KWZYBICrpW7UfixRzkD/Nxeblep/jISdCSf UeaaapcdcolOn4a8bRdTWBp62E6i4p2fLFwq5hBKhHqQTBJDlcvKoWI1tPj3cbfi1TuPC31bLBLDa LMxiUwH06GduLwpLfvGLN/n2c5AEq3UlTAbc4tNVY+7RI/6izkyg8u4E9YwvhscWuOVXU50kuNu7N 1K6CY+Rt950JiH+Ka4tmcTe7n0q+jasvvDjqdJBVspbfGH7GMv/dDiR/HzKjx+rgO7v3CHttMPoKa d4/H9ZFuw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lByIR-0004cb-TJ; Tue, 16 Feb 2021 11:13:35 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lByIP-0004bv-Fv for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2021 11:13:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613474012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=StUGz/4UtDVkUfOUmYPH0sVJfgkVqzYBCdEf0FlM4KI=; b=DZRNe+u34k2hmWxzXXEWSkWXXjaG2PDNJ2TaIU9akUm+FnIRcZAh+9j0XOCfFOwOekIhvW Jtck+U2d/+/t1rX3BPpTYVxG9oe6ePnh3uuVKAqvRWCaB3eQwvCkMxR3mVjSQPqKQUTkiz 8REI1E+8XCytl86HHsmBzTqD4vT7XuE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-lc2zrWgBNW6nxh8a7eDgQg-1; Tue, 16 Feb 2021 06:13:31 -0500 X-MC-Unique: lc2zrWgBNW6nxh8a7eDgQg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B635B801975; Tue, 16 Feb 2021 11:13:28 +0000 (UTC) Received: from krava (unknown [10.40.195.208]) by smtp.corp.redhat.com (Postfix) with SMTP id 140CB1970A; Tue, 16 Feb 2021 11:13:24 +0000 (UTC) Date: Tue, 16 Feb 2021 12:13:23 +0100 From: Jiri Olsa To: Namhyung Kim Subject: Re: [PATCH v6 2/3] perf tools: Add lexical definition of event name Message-ID: References: <20210212090318.1522292-1-nakamura.shun@jp.fujitsu.com> <20210212090318.1522292-3-nakamura.shun@jp.fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_061333_627409_FEB20604 X-CRM114-Status: GOOD ( 23.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Shunsuke Nakamura , Mathieu Poirier , Peter Zijlstra , John Garry , linux-kernel , Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , Leo Yan , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 16, 2021 at 05:23:18PM +0900, Namhyung Kim wrote: > On Mon, Feb 15, 2021 at 9:34 PM Jiri Olsa wrote: > > > > On Fri, Feb 12, 2021 at 06:03:17PM +0900, 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 > > > --- > > > 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_*?.\[\]]* > > > > I can't see anything broken because of this change, > > also numbers are defined few lines before so we should > > be fine > > But this change makes the syntax ambiguous with numbers > and names. I don't think it's a good idea. I'll check again, but we already have hex numbers above which could easily clash, but the syntax context makes this work.. tests should help to clear this up > > Is it possible to change the event names not having numbers > at the beginning like inst_commit0, inst_commit1 and so on? that'd be of course much better thanks, jirka > > Thanks, > Namhyung > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel