Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1657426ybz; Thu, 23 Apr 2020 03:14:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKzPDwEtGavMK51dqP0MVBhKmtih88fwRtZ11Xy/9UJHyItEkUHGBwKo78XD5YdkLbnyScP X-Received: by 2002:a50:eb8b:: with SMTP id y11mr2029989edr.229.1587636880623; Thu, 23 Apr 2020 03:14:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587636880; cv=none; d=google.com; s=arc-20160816; b=ReqGQdeo18tkSlzkYuVHDYzHuZQuHoznXL9NhGWznhKpV8+jMwgu0doXViwhHx52bL c0Gs2VYcxjQUF7SI/yfrrr8Cgz/dx43/+6AW2GVRYKuPyjtoH2vCAWU2sFtFqohm9zV1 Virx1AIyLfAJCX23isB5qRy4mIpWozJlp2TloEdTTRRF2mgONF7Ct37LuiRR+hQVZ6re peyCe+b6SobDEq9gKopOkDwJOI+Lg6YFMXAyaduVQa79mySUch5GpCkVHR697RvPymk8 jRgGWSLuDYL0sI+2zScUeNSpBiRPb16NL47zyLgG7X6HbvDM3S4Mmk3sJanjbzJi6JUq VueA== 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=HfqEuva2WCu+InLgj0cg6GtiPLaYgBrrm5Fspv4Uzlg=; b=q/1BnPVe9d3uxRPag0haNbik9TPKeqV53BdPCvHlLqkuX26qDAGpVT1seOt3HQLdy1 kQkG6z8nxMAW2b8L9RhmUW82a2YCS9zYqESmECARvO1Vsx92/g1SZBloPqLQ109TYKYo xPr0D8y0iZHH+eWsAFArkThCfQNmtG08kQW3GWF/edz4OVRspnbPnSAcdVvgOABuyJrl ekgP4k+N8/MELHi30L2+tkD6DkixaHdjfI8Pp4hOH/r/mLmCq8GvplhqsfF42/1UHo7/ UEMXZxZI1h5rwrjzxoO0AXorC75nD4jIlGIkLWoq4D/h210HZiOsHaaF3mkeqN5SWO7h Q6gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qda9dMe1; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si940423ejb.236.2020.04.23.03.14.16; Thu, 23 Apr 2020 03:14:40 -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=@redhat.com header.s=mimecast20190719 header.b=Qda9dMe1; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbgDWKLg (ORCPT + 99 others); Thu, 23 Apr 2020 06:11:36 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27397 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726386AbgDWKLg (ORCPT ); Thu, 23 Apr 2020 06:11:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587636694; 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=HfqEuva2WCu+InLgj0cg6GtiPLaYgBrrm5Fspv4Uzlg=; b=Qda9dMe1dHMaU5QW2ldTznQxjCS5z6MMVD3BjTAjjms338l7iR5f3rCQf4WPyvwbppx/5B 9BvZNhRSf+FxkER71e74AxErCki4LKO4I6LZLffeqMz7/vbmQazVV7SkxhHXTVhukHl8y/ sxsdMrAACpmOwbR/gkEKodMywdF/1J4= 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-355-YOpomD0DM7ybk8W8KnBNUA-1; Thu, 23 Apr 2020 06:11:29 -0400 X-MC-Unique: YOpomD0DM7ybk8W8KnBNUA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F9A218C43C3; Thu, 23 Apr 2020 10:11:27 +0000 (UTC) Received: from krava (unknown [10.40.196.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C622F1000325; Thu, 23 Apr 2020 10:11:22 +0000 (UTC) Date: Thu, 23 Apr 2020 12:11:20 +0200 From: Jiri Olsa To: "Jin, Yao" Cc: Ian Rogers , Andi Kleen , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Kan Liang , Haiyan Song , Ravi Bangoria , John Garry , Leo Yan , Adrian Hunter , LKML , linux-perf-users , Stephane Eranian Subject: Re: [PATCH 2/8] perf metrics: fix parse errors in cascade lake metrics Message-ID: <20200423101120.GC1136647@krava> References: <20200422074809.160248-1-irogers@google.com> <20200422074809.160248-3-irogers@google.com> <20200422143840.GJ608746@tassilo.jf.intel.com> <46e803f3-80a4-0d37-9d39-b625b947ac7f@linux.intel.com> <20200423101030.GB1136647@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423101030.GB1136647@krava> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 12:10:36PM +0200, Jiri Olsa wrote: > On Thu, Apr 23, 2020 at 03:51:18PM +0800, Jin, Yao wrote: > > Hi Ian, > > > > On 4/23/2020 2:09 PM, Ian Rogers wrote: > > > On Wed, Apr 22, 2020 at 10:54 PM Jin, Yao wrote: > > > > > > > > Hi Jiri, > > > > > > > > Bisected to this commit which introduced the regression. > > > > > > > > 26226a97724d ("perf expr: Move expr lexer to flex") > > > > > > > > Would you like to look at that? > > > > > > Hi Jin, > > > > > > that commit breaks parsing of things like ','. See fixes in this patch > > > set such as: > > > https://lore.kernel.org/lkml/20200422220430.254014-5-irogers@google.com/ > > > Fixing the lex issues then exposes other bugs that need to be > > > corrected in the json. I've added Fixes to the commit message of: > > > https://lore.kernel.org/lkml/20200422220430.254014-3-irogers@google.com/ > > > https://lore.kernel.org/lkml/20200422220430.254014-4-irogers@google.com/ > > > and would be glad of a review. If we can land: > > > https://lore.kernel.org/lkml/20200422220430.254014-12-irogers@google.com/ > > > then expr as the source of parse errors can go away :-) The next > > > problem is the parse events code, but some of that logic is dependent > > > on the machine it is running on. It'd be good to add a test that > > > parsed events code can handle the events in metrics too, filtering out > > > things like duration_time that are special to metrics. > > > > > > Thanks, > > > Ian > > > > > > > Only with the fix > > "https://lore.kernel.org/lkml/20200422220430.254014-5-irogers@google.com/" > > (without other json modifications), the issue was still there. > > > > localhost:~ # perf stat -M DRAM_Read_Latency > > event syntax error: > > '../event=0x36,,umask=0x21/,cha/event=0x35,cha_0/event=0x0/}:W,duration_time' > > \___ parser error > > > > Usage: perf stat [] [] > > > > -M, --metrics > > monitor specified metrics or metric groups > > (separated by ,) > > hum, I don't have that metric, is there another example of broken metric? > > [jolsa@krava perf]$ sudo ./perf stat -M DRAM_Read_Latency > Cannot find metric or group `DRAM_Read_Latency' > > > > > So you added other commits which changed the json to let the parse work. But > > I don't know if we have to do with this way because it should be a > > regression issue. > > > > In my opinion, we'd better fix the issue in 26226a97724d ("perf expr: Move > > expr lexer to flex") and try not to change the json if possible. > > yea, that change definitely had a potential of breaking things ;-) > but it should be easy to fix them > > I'll go through the v3 of the patchset ok, there's v2 now ;-) jirka