Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp559147ybk; Wed, 20 May 2020 06:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNyrn1eDVqTtuUh/S1xrgQn9iKKwFOblxg9CB1QM41vzA+445fkTcmGTiwD8NCNODAXRDt X-Received: by 2002:a05:6402:8c1:: with SMTP id d1mr3453242edz.265.1589981691031; Wed, 20 May 2020 06:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589981691; cv=none; d=google.com; s=arc-20160816; b=rJnNubVJqqwEOabJZ2kgoDPsZnF904Rsjq3sHZ5d7G/2e7+NnAYM13wh6Qof5l+zC+ OEmX6ICb//0Lqm6LhilW3drQDBlY7+2ec+t1boxoAA68MHBhJDPUSYTcbt+ykt4MdRSU Y3XSI/tkPHvkBZfSKzaJ7Cg4u0tEEQfX2vEtni9VMCqeD5E9QtdfdpzIv1y8vKIE2cIC DbXT8TkJRcdB2Y8xw0x6T2Cs9RKx/97h637qv9D29f1/Bqj5KS1XlI8KZgT3/JeqkJBr Osth8Mvd0GwM7KWm3hXKiO/RrEo0GE/43rAn/qdniATuBjBI0RgctzkVjcZIN7sY4dPp ZVkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=yvO4ZAPr8Lu8+dh9QBZy7dJPNxyGKKorS+45Np1Bv98=; b=GpWbT6vANgCeJDUR72FuOa5OIIrMZPUezCYrZIE+GtyXwSOFuZdlg6RUWE6hnJRVW9 xPL7PlPEse3NRfxoqNb+Dc5il7JfIKZZxVNeHywLxzlAaBZjwjq04k6KGc1iu6eMr13j ObXwiMDVtBmmBFzT7wObLOK30zS6RZBTqmoAjlztC5PQ8zrCq2Linghv/vWajFWAxrQd eXER/Jvm3w0mckkAHw2HxL/fea0xyP+hkTxUWGbmvI42tPqYqkDY/nP486ZUlTel+5pv nANY1Pz8PEDkrOYHfoXOQQ2sAGkrrl8udsPgww4i5tYjL2x6kUEej8i45f4IU/z1XA0r /OAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mE8ciLVA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si1596570edi.376.2020.05.20.06.34.22; Wed, 20 May 2020 06:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mE8ciLVA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726827AbgETNch (ORCPT + 99 others); Wed, 20 May 2020 09:32:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:32978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbgETNch (ORCPT ); Wed, 20 May 2020 09:32:37 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD72720748; Wed, 20 May 2020 13:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589981557; bh=zz40LEwDhy/bBwHQxPzcfAFOOwMH3tx/OLlUA8WvHJg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mE8ciLVA7eX43/9pkSddLPTGsdw3V9YdKJxG3i71IlEA8ehlkaeDYF4+bkwNqgqkP gcXA8ByKYyydYXeKVuTAvphtf11QoBUyXZt3QP8LfCflNAAA5iV3/tHxpReSojfHh0 zGDPj7N2N+VItrm7AKDtfh8p/2hwYYlWwtzqyQcg= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 787CF40AFD; Wed, 20 May 2020 10:32:34 -0300 (-03) Date: Wed, 20 May 2020 10:32:34 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: Re: [PATCH] perf stat: Fail on extra comma while parsing events Message-ID: <20200520133234.GF32678@kernel.org> References: <20200520074050.156988-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, May 20, 2020 at 12:51:24AM -0700, Ian Rogers escreveu: > On Wed, May 20, 2020 at 12:41 AM Jiri Olsa wrote: > > > > Ian reported that we allow to parse following: > > > > $ perf stat -e ,cycles true > > > > which is wrong and we should fail, like we do with this fix: > > > > $ perf stat -e ,cycles true > > event syntax error: ',cycles' > > \___ parser error > > > > The reason is that we don't have rule for ',' in 'event' > > start condition and it's matched and accepted by default > > rule. > > > > Adding scanner debug support (that Ian already added for > > expr code), which was really useful for finding this. It's > > enabled together with bison debug via 'make PARSER_DEBUG=1'. > > > > Reported-by: Ian Rogers > > Signed-off-by: Jiri Olsa > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo