Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp811346ybk; Wed, 13 May 2020 13:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyN+FrmAnoJJD2i5OR1WzgdJnLCmD7mdqdaoUX+T+gtBKvkSRdjmNV8epgZGnoptGjEckw X-Received: by 2002:a17:906:6d90:: with SMTP id h16mr792160ejt.117.1589402963603; Wed, 13 May 2020 13:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589402963; cv=none; d=google.com; s=arc-20160816; b=ZBGbOZ7gVDwoTUNNrtv+073VtP+ADbcc34VH/WExW4JmdlckRdcjXkpI60DBwNvM0u LaCcTvhH92cqtZl+W7fikuuek3Qv9gw2JgCTQHRfQG9usKIX9bxOjSpIZY2o/IRY6B3Z 6BvYGcbQq8b4GteKlqkzFGXYJF5vWhlSU32Mbe5Bh4NebGlLsL9zuV23Gn8wfD9FUQzy M4ZUkZY025P2siAg7YS1F0C+zsyqHiaZ5u5O41tc0j9juZsRgAD4ysYUuqBZB28aDFGF bFsr4uqWLG5niXyuseCVzkup5lF1TlUxHAb80sKftdyTbUeAqdy1prtV7ENfKvX/dmHZ svNQ== 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:date:from :dkim-signature; bh=SECExaF68jqsgwvUFVEH9etxfDpHjfhtHYaCcot2wVk=; b=EOP0bODUKCdmJPjpMrPOiMQBnRI7U1eLS1PjONCG0MJMCD/exxLLA51jqY9o3bhxqE pNTF55M9lEmbLMnhE3UwyVh0MC3U7DCS1nXUMVRBhpapbdtPOrqngi6imcd+/U/So6pN 1AAbWlFyzsPiYKbZ6eh4FJzC5WGUye57IiPmlIHUfT8sdGZsmn+d6P2QE0esGmWy+cYm uuI+gCtbhaYchosyJHvcC9JGZ1Gr9BsgfHijySGOE8IALv60X8o6Rr9RVE9DCizBpgTY LYFbCUZGMhGwSNshtNwwZ2C+AkJGR/gDI4k6teDLStOIzksFmmjWXNAfAJlwyGe2sUi4 xQJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WO4j4Tz6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si537656ejr.464.2020.05.13.13.49.01; Wed, 13 May 2020 13:49:23 -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=@gmail.com header.s=20161025 header.b=WO4j4Tz6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729400AbgEMPOv (ORCPT + 99 others); Wed, 13 May 2020 11:14:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729242AbgEMPOu (ORCPT ); Wed, 13 May 2020 11:14:50 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97DB3C061A0C for ; Wed, 13 May 2020 08:14:50 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id b1so116793qtt.1 for ; Wed, 13 May 2020 08:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SECExaF68jqsgwvUFVEH9etxfDpHjfhtHYaCcot2wVk=; b=WO4j4Tz6G9DKujlJMO41xMTBanh0Ki5ICFQzNhOvQPbqQixEid+Xyd4E/7YmQoCTMn PYcq9+VR55SGw9E1bL9Xu61n9Jpes+XG3qu9uZPo11GJRudAoACDlqgIzRRRo8N039FP JjhJ524I8jfZveYilb/aREvP+KxeylZWFij5lQIWLDVY/aR1vctOMBW5KfhJvDQYjWvg rx9aJH4dqL24QVYCt7uKrGjs2cIHv8faYb/mpYO14n6kLACmT9wStdsp+b/21RTyC9Yu QwxHPur75ojTqVON5BcCzL5yCJ8DepyNaonRsNL7obJ9TcvRhkRZ6ehvNFfhY7o3kIsq q+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SECExaF68jqsgwvUFVEH9etxfDpHjfhtHYaCcot2wVk=; b=VMEAxSOIWZo17cn8/qKzfzfDF4OBcY7oK5ZEvl4qIb/r53sY0DhZGjUq7n6NA9bL8b g70QdLA6s33qbF5HdVugR1F9dvrvlaAdVj0FW9Cw7zyM6N77LhPQJhU7digwZWv41Cl8 /Rm0Lqu5VVQ/mWfnISEP916qgx57yuk5V+w4wuH9RiSA3P/R3gg+TsP5MOybll10a4Zv kSG0IngHTeKVqLafgq6pcGF4Mo5hAplsju6FByE04T4CDNxLPXJTmaqsiLeXk6HbTgJ0 x64u5tP2btkSzh+27PCxxwjIbNvpmIQ49QWQCJ052sIPPCNCgbm1Qvi3LugKL8x3gv5H BmnQ== X-Gm-Message-State: AOAM530u2dlNo6PFWgxd56695IkA+nfJ3GtOoidz0uhs1kSFYJf2oCtJ yqKyslsWmXFK4VkKle7qUu8= X-Received: by 2002:aed:34c2:: with SMTP id x60mr13530226qtd.156.1589382889664; Wed, 13 May 2020 08:14:49 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id a24sm11780294qto.10.2020.05.13.08.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 08:14:49 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 25D4A40AFD; Wed, 13 May 2020 12:14:46 -0300 (-03) Date: Wed, 13 May 2020 12:14:46 -0300 To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Ian Rogers , Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Joe Mario , Andi Kleen , Kajol Jain , John Garry Subject: Re: [PATCH 4/4] perf expr: Report line number with error Message-ID: <20200513151446.GC7216@kernel.org> References: <20200511205307.3107775-1-jolsa@kernel.org> <20200511205307.3107775-5-jolsa@kernel.org> <20200513113424.GJ3158213@krava> <20200513140825.GG5583@kernel.org> <20200513144610.GM3158213@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513144610.GM3158213@krava> 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 13, 2020 at 04:46:10PM +0200, Jiri Olsa escreveu: > On Wed, May 13, 2020 at 11:08:25AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, May 13, 2020 at 01:34:24PM +0200, Jiri Olsa escreveu: > > > On Wed, May 13, 2020 at 12:09:30AM -0700, Ian Rogers wrote: > > > > On Mon, May 11, 2020 at 1:54 PM Jiri Olsa wrote: > > > > > > > > > > Display line number on when parsing custom metrics file, like: > > > > > > > > > > $ cat metrics > > > > > // IPC > > > > > mine1 = inst_retired.any / cpu_clk_unhalted.thread; > > > > > > > > > > krava > > > > > $ sudo perf stat --metrics-file ./metrics -M mine1 -a -I 1000 --metric-only > > > > > failed to parse metrics file: ./metrics:4 > > > > > > > > > > Please note that because the grammar is flexible on new lines, > > > > > the syntax could be broken on the next 'not fitting' item and > > > > > not the first wrong word, like: > > > > > > > > > > $ cat metrics > > > > > // IPC > > > > > krava > > > > > mine1 = inst_retired.any / cpu_clk_unhalted.thread; > > > > > $ sudo perf stat --metrics-file ./metrics -M mine1 -a -I 1000 --metric-only > > > > > failed to parse metrics file: ./metrics:3 > > > > > > > > A line number is better than nothing :-) It'd be nice to be told about > > > > broken events and more information about what's broken in the line. A > > > > common failure is @ vs / encoding and also no-use or misuse of \\. > > > > Perhaps expand the test coverage. > > > > > > yep, error reporting needs more changes.. but the line is crucial ;-) > > > > So I had started processing this patchkit, I assume you will send a v2 > > and I should drop what I had processed, is that ok? > > yes, I will resubmit on top of the other expr changes > we have now pending Ok, I removed those from my local branch, and pushed what I have, which includes a few more fixes from Ian and others, continuing to process other remaining patches now. - Arnaldo