Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1917953pxb; Fri, 24 Sep 2021 15:14:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziLXliKeLTqPzlWaBgnRWlErM8QNgr2AQTmMrHE0DYocbfmJMVsvox7cKf2EC4rWtn5Pqi X-Received: by 2002:a05:6602:2bd4:: with SMTP id s20mr11294945iov.63.1632521689153; Fri, 24 Sep 2021 15:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632521689; cv=none; d=google.com; s=arc-20160816; b=F7sLZHrSn36XdZZ591oztjnJFiCXmgYSi7s/DzTQhexscyBroCw0ABFaJUXn3LTy+7 h0g66fULoWzV59AaZjRGGYFzZtgICrQGBpTLhNXaIrJkeGEKeX9/WFQ1aTZOkiOWgNW/ C4cfpTZfCzs60yNIPwot2NhlG9BZ9VCxzU2EE+KV2sDYHxiI2TKDIwBiYCMoEG0EheKR euQbRgqC/fhfk+GeMSly64DqxyClAaB1JTPKEnlfasoUfyyNTQZrB80lWMT++Vm5Hqwr OB9MYZ6RlRVAQohf8EFO9GQ/bUxkGXdG5GbyGqfv3zb8CA3TLsYuCJKSnap6bEjRylg5 KMHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y4Ys+8gbLavmCzUgu34ZLgzMbHDpAGgnLqrPPbdBJdc=; b=tbBIlDRZCcWoV0hGsbjdL5DX6OdGO3bIzw+FaYPOgvXv9pjKLPzjvPCZROfw3hq8zl CET4gFiaX/O0p/6VYioOhleVX/HYC3joPQtblghAhBelmOE9qcUgAkH7eC0hDahzclyS NsyRjYTtF3EPY+zUQJvEW/LRFWtAkC+HzcIh8VOstwXgxTcsT+FIxEB8KrKg38MSP3f2 qb4HbHmjFWzFHZR/qEBoXRRwIdw1DZQOroypKcGWxxdQdfJKnN2Ee7f8jxzmJKsLI9Ee mECMp4uFHPfgxDuz7AZzG7hdlSB/aMNlFh3S56ws8B4y9X9RYumKkpKt+gE/Y7ZfR7lf RjgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Hlu/Pa10"; 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 p8si14467599ilh.169.2021.09.24.15.14.38; Fri, 24 Sep 2021 15:14:49 -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=k20201202 header.b="Hlu/Pa10"; 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 S1346378AbhIXTKq (ORCPT + 99 others); Fri, 24 Sep 2021 15:10:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:52772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhIXTKp (ORCPT ); Fri, 24 Sep 2021 15:10:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2BA0961250; Fri, 24 Sep 2021 19:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632510552; bh=NwQH74aMnB1PseISd4nMEqKkBEsFOJREMogXH7iIssg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hlu/Pa10JGKN29fzEH0MrHdzCSzryn+RX2/diyZD2sEj6kkL0zCANjSzexgBpNlLq Crwn1rq2ZvIHSv6gyVFII+5mOpLUgvKI/yxCJIXguL4Xf4P/GMp3Xi0AJgHzOnOq3F m8UfPZD9kOREdnCPlANolYb/9QNVrGnYEZ29pYAiQRWhTNIaycBoLXpiGmFW8BY3F9 XxMzn1PleDeMVLEJzzxNuXwlMRtpuB94YHYQ/F7Bz3sMY87s28EIKX27GdrocWY68V TWS65FVBjtuzvYDVbVTg1YWdd4N+KNmKmP4otSA8bhCvfZ3TK3WkVAZHJZHAMMtR92 Qg0bdSZtptX6g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0AB5A410A1; Fri, 24 Sep 2021 16:09:10 -0300 (-03) Date: Fri, 24 Sep 2021 16:09:09 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Jin Yao , John Garry , "Paul A . Clarke" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com Subject: Re: [PATCH v3 1/2] perf test: Workload test of metric and metricgroups Message-ID: References: <20210917184240.2181186-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210917184240.2181186-1-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Sep 17, 2021 at 11:42:39AM -0700, Ian Rogers escreveu: > Test every metric and metricgroup with 'true' as a workload. For > metrics, check that we see the metric printed or get unsupported. If the > 'true' workload executes too quickly retry with 'perf bench internals > synthesize'. > > v3. Fix test condition (thanks to Paul A. Clarke ). Add a > fallback case of a larger workload so that we don't ignore " counted>". > v2. Switched the workload to something faster. Hi John, does your Reviewed-by stands for v3 too? - Arnaldo > Signed-off-by: Ian Rogers > --- > .../perf/tests/shell/stat_all_metricgroups.sh | 12 ++++++++++ > tools/perf/tests/shell/stat_all_metrics.sh | 22 +++++++++++++++++++ > 2 files changed, 34 insertions(+) > create mode 100755 tools/perf/tests/shell/stat_all_metricgroups.sh > create mode 100755 tools/perf/tests/shell/stat_all_metrics.sh > > diff --git a/tools/perf/tests/shell/stat_all_metricgroups.sh b/tools/perf/tests/shell/stat_all_metricgroups.sh > new file mode 100755 > index 000000000000..de24d374ce24 > --- /dev/null > +++ b/tools/perf/tests/shell/stat_all_metricgroups.sh > @@ -0,0 +1,12 @@ > +#!/bin/sh > +# perf all metricgroups test > +# SPDX-License-Identifier: GPL-2.0 > + > +set -e > + > +for m in $(perf list --raw-dump metricgroups); do > + echo "Testing $m" > + perf stat -M "$m" true > +done > + > +exit 0 > diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh > new file mode 100755 > index 000000000000..7f4ba3cad632 > --- /dev/null > +++ b/tools/perf/tests/shell/stat_all_metrics.sh > @@ -0,0 +1,22 @@ > +#!/bin/sh > +# perf all metrics test > +# SPDX-License-Identifier: GPL-2.0 > + > +set -e > + > +for m in $(perf list --raw-dump metrics); do > + echo "Testing $m" > + result=$(perf stat -M "$m" true 2>&1) > + if [[ ! "$result" =~ "$m" ]] && [[ ! "$result" =~ "" ]]; then > + # We failed to see the metric and the events are support. Possibly the > + # workload was too small so retry with something longer. > + result=$(perf stat -M "$m" perf bench internals synthesize 2>&1) > + if [[ ! "$result" =~ "$m" ]]; then > + echo "Metric '$m' not printed in:" > + echo "$result" > + exit 1 > + fi > + fi > +done > + > +exit 0 > -- > 2.33.0.464.g1972c5931b-goog -- - Arnaldo