Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1517409ybg; Tue, 2 Jun 2020 12:08:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLYaNU89uvXySsoa6En7sYMtnXQFo+l17F/9px98AUDPOP/oPPxrj7dlQC3tkastv9PIXZ X-Received: by 2002:a17:906:3b57:: with SMTP id h23mr13256224ejf.326.1591124924473; Tue, 02 Jun 2020 12:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591124924; cv=none; d=google.com; s=arc-20160816; b=u6kN4rs4s57jX/tO2etLAg73WkAudGlpyL7Bqsl2JBmrVly/Kp4Sv/E1u+4+aiODnf 53B8MYeq335sJMHwlQSrXpLwKcrWRb1XdSX6vMiFUAUwFMI9idslhyRl7R6s5oOWYkW+ sYjh4bzf0721VxMIcOkrfxfe/cdXShLmqk+NVj9nV1QQsFa1JkJ71HuQa1E8X0HEl9Bs o2RhZuSUfo9u09SecQxG/n+H3DH1lrFUkxNI6wd+MbDadUUlrC3Ti049DnQthDqoEIl9 /14GjlMTeaArkwdfqzy5slApOhcWdQq2zuQh//EW19uL2QAoIrt+qaN5rEBAjyTkp93C Z6FQ== 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=WtrYSz6qHZPXe9mHbjwGNmsUDvvIsrVil0AIiTdl8U0=; b=PW9lbRg9LgZGYkaiixAV2HbAQMnN9wrIRN+8BXM/sY9GOPEjJ3HQQHu6M4esfXNWJX sj0Jk/Cz4/q7NaPCuU1dreqx+/vaFQqi+PqUDmp+yf0438VozcaF2EbSWVjOG0xYMbbl Y/zkslzsD0CbK8oz7VzIatZdAbkGkQNohx2gKI2jwNGHVAjAD82DNJzcboL8KE++0oqT 5iC9bdPiI8GRGyErHCqXihHyRs6Kxpwvkds3+eAuvbCX87MAptAPxUcO+Osql4L3fN44 a13GHsEUeJPxENMjUBKmB1HT+bohPJJ4mFEviGaQXELNoCOibbfhAGzf3RgZODoSyS1r f2gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+XXKV+b; 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 d13si1885404ejw.753.2020.06.02.12.08.20; Tue, 02 Jun 2020 12:08:44 -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=h+XXKV+b; 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 S1728087AbgFBTDU (ORCPT + 99 others); Tue, 2 Jun 2020 15:03:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32242 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726174AbgFBTDT (ORCPT ); Tue, 2 Jun 2020 15:03:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591124598; 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=WtrYSz6qHZPXe9mHbjwGNmsUDvvIsrVil0AIiTdl8U0=; b=h+XXKV+bqI0vxgNG1wprL6zBPB/3hdRXE1stUP7lwwMA70vydEwjkMq44MfgCEmHkUTauj MHZQmiJSFcJ1OeEEk7lmho9cffBMPV6T3Y7yCrXfGBTyOFKdNffa5RUlXwSzHsXledvCq/ TeBDF6aDt9QLm0HPhe1/5FzUiVQGTv8= 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-19-NwLzME_pNGexxlu9llJrbA-1; Tue, 02 Jun 2020 15:03:14 -0400 X-MC-Unique: NwLzME_pNGexxlu9llJrbA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CCFE80B726; Tue, 2 Jun 2020 19:03:12 +0000 (UTC) Received: from krava (unknown [10.40.192.62]) by smtp.corp.redhat.com (Postfix) with SMTP id F3D7278EF6; Tue, 2 Jun 2020 19:03:09 +0000 (UTC) Date: Tue, 2 Jun 2020 21:03:08 +0200 From: Jiri Olsa To: Ian Rogers Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Stephane Eranian , Andi Kleen Subject: Re: [PATCH 04/13] perf tests: Add another metric parsing test Message-ID: <20200602190308.GF1169993@krava> References: <20200602115055.1168446-1-jolsa@kernel.org> <20200602115055.1168446-5-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 02, 2020 at 10:58:32AM -0700, Ian Rogers wrote: > On Tue, Jun 2, 2020 at 4:51 AM Jiri Olsa wrote: > > > > The test goes through all metrics compiled for arch > > within pmu events and try to parse them. > > > > This test is different from 'test_parsing' in that > > we go through all the events in the current arch, > > not just one defined for current CPU model. Using > > 'fake_pmu' to parse events which do not have PMUs > > defined in the system. > > > > Say there's bad change in ivybridge metrics file, like: > > > > --- a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json > > +++ b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json > > @@ -8,7 +8,7 @@ > > - "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( > > + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / / (4 * > > > > the test fails with (on my kabylake laptop): > > > > $ perf test 'Parsing of PMU event table metrics with fake PMUs' -v > > parsing 'idq_uops_not_delivered.core / / (4 * (( ( cpu_clk_unh... > > syntax error, line 1 > > expr__parse failed > > test child finished with -1 > > ... > > For this example as the problem is the expression, presumably this was > "passing" with test_parsing due to returning TEST_SKIP? I did this > initially so that we could get the test merged and then the metrics > fixed. I'd prefer if test_parsing were returning TEST_FAIL. it will fail: [jolsa@krava perf]$ git diff diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json index 28e25447d3ef..0cad6b709f96 100644 --- a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json +++ b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json @@ -1,7 +1,7 @@ [ { "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", - "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / / (4 * cycles)", "MetricGroup": "TopdownL1", "MetricName": "Frontend_Bound", [jolsa@krava perf]$ ./perf test 'Parsing of PMU event table metrics with fake PMUs' 10: PMU events : 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! because the metric is malformed jirka