Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp588413pxp; Sat, 5 Mar 2022 12:15:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJybXR39pCBFxr+4jZ4kxfrD1JNyjMf6JAyDs5E85qqbbENwf4rzG6MvinCms/G0J1As+wHX X-Received: by 2002:a17:906:a210:b0:6d5:9fa:11ce with SMTP id r16-20020a170906a21000b006d509fa11cemr3965002ejy.172.1646511323244; Sat, 05 Mar 2022 12:15:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646511323; cv=none; d=google.com; s=arc-20160816; b=uKuDCp0STEB4G5h2VcOVIaIXaNaV66lIDKxMwOk3rWRC0xjWP6IUyW/LjQ/W+QeXzI hgnhKJZZ1YZi3v6D6nZgV/mObbHIj8h7k4yHwI5hv+K5TgBssR8ErR1BEGuzpdufFvb8 gkxMVTE507Ev+DMXtogGPABCvqJavqvuDhyeZFhjTM8BUc/w+Q5zWMdmfwINUvyFRYUi sXIK5qz64O2wg9e2XKFiBAvzcS9xUj5GqmVAzS7xNBsEfix/cGevwZCuLbKSgJkyaj0o erOGbGaV4YdrY2O939EgMVpzzUZQmzs5qSEJwZuj8TnvLIcJdfJKBuzMmmJe5JXm6MIg S5WQ== 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=sVdK46q6pAr64G6W24AHrEenrQLd5EeVx4OAfrJq+Gw=; b=XRTKmRyHl30GvNyO4KrzOpdMMlpNBFHs18vYDI4FvTlfIqOdDdXZdbtMmqLU7fsADx PsePzxXoReecbzIo8q8C6JJ21DpAjl5BHB2CHfcG5h9m26H0V5jzEUTe2d/FCam+0XPC G5K0pr13+zJZL6rbe/fL9nXoMCdvht6bKYnyz/6N73lM0C5AssdfRMnMpA2B+AZG+wPA 4Z0zjx8VmSc+6iZijCniRKI7dT+BYzbRjWkLpj8nPi8DBS95l4VqDDefCVlJEa7mlw/+ ZIvdsH25LgWl6YcJ1mBzTa6iZMTMWyVI5l/hlk7m+6gQ/crWe1eRh2zZI6+85ipbpajq pBfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TmgI9JgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq4-20020a1709073f0400b006da6550217bsi6910012ejc.973.2022.03.05.12.15.00; Sat, 05 Mar 2022 12:15:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TmgI9JgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231684AbiCETBj (ORCPT + 99 others); Sat, 5 Mar 2022 14:01:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbiCETBh (ORCPT ); Sat, 5 Mar 2022 14:01:37 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B0F75AA78; Sat, 5 Mar 2022 11:00:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id BEAB3CE0957; Sat, 5 Mar 2022 19:00:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4FD8C340EC; Sat, 5 Mar 2022 19:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646506842; bh=zWhrfFFYUoTwiNUraXxSf4+e7ma2/l09MR0Xu9OVbXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TmgI9JgVoxZG4/01E3S/Ghq+3mLOjM3eD9RP5HYbl0HhXj2hwERpGtKR1F8rL4kbt 0VAMwLoSomXSi/DNxUYWS539CE7tNBHhW6fOonjTsuk2OAJ72iGEpWA9xDQ3tXlYUT Pj3AZhpxYKjaDlijUPI/QkN96tn9ICjYHLYS95V1Egj4qCJW4nlFUjZEY3OJw+WTK5 2gSMevhXzkpznDKQB+7VEHoL7CbZaurX1mKU00O+PPK/GkaYLt5vzgx08TzHKRuqcf hmbopn9/M9TISambUNKaXYX7BEkge0tqn+xJGK7f1AlMKXdOQJoNVaIJ+qqotFNwgc 0RZUEkvlEbx4w== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B98F6403C8; Sat, 5 Mar 2022 16:00:39 -0300 (-03) Date: Sat, 5 Mar 2022 16:00:39 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: German Gomez , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] perf test: Add perf_event_attr tests for the arm_spe event Message-ID: References: <20220126160710.32983-1-german.gomez@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Feb 28, 2022 at 03:05:21PM +0000, James Clark escreveu: > > > On 26/01/2022 16:07, German Gomez wrote: > > Adds a couple of perf_event_attr tests for the fix introduced in [1]. > > The tests check that the correct sample_period value is set in the > > struct perf_event_attr of the arm_spe events. > > > > [1]: https://lore.kernel.org/all/20220118144054.2541-1-german.gomez@arm.com/ > > > > Signed-off-by: German Gomez > > Reviewed-by: James Clark Thanks, applied. - Arnaldo > > --- > > tools/perf/tests/attr/README | 2 + > > tools/perf/tests/attr/base-record-spe | 40 +++++++++++++++++++ > > tools/perf/tests/attr/test-record-spe-period | 12 ++++++ > > .../tests/attr/test-record-spe-period-term | 12 ++++++ > > 4 files changed, 66 insertions(+) > > create mode 100644 tools/perf/tests/attr/base-record-spe > > create mode 100644 tools/perf/tests/attr/test-record-spe-period > > create mode 100644 tools/perf/tests/attr/test-record-spe-period-term > > > > diff --git a/tools/perf/tests/attr/README b/tools/perf/tests/attr/README > > index 1116fc6bf2ac..454505d343fa 100644 > > --- a/tools/perf/tests/attr/README > > +++ b/tools/perf/tests/attr/README > > @@ -58,6 +58,8 @@ Following tests are defined (with perf commands): > > perf record -c 100 -P kill (test-record-period) > > perf record -c 1 --pfm-events=cycles:period=2 (test-record-pfm-period) > > perf record -R kill (test-record-raw) > > + perf record -c 2 -e arm_spe_0// -- kill (test-record-spe-period) > > + perf record -e arm_spe_0/period=3/ -- kill (test-record-spe-period-term) > > perf stat -e cycles kill (test-stat-basic) > > perf stat kill (test-stat-default) > > perf stat -d kill (test-stat-detailed-1) > > diff --git a/tools/perf/tests/attr/base-record-spe b/tools/perf/tests/attr/base-record-spe > > new file mode 100644 > > index 000000000000..08fa96b59240 > > --- /dev/null > > +++ b/tools/perf/tests/attr/base-record-spe > > @@ -0,0 +1,40 @@ > > +[event] > > +fd=* > > +group_fd=-1 > > +flags=* > > +cpu=* > > +type=* > > +size=* > > +config=* > > +sample_period=* > > +sample_type=* > > +read_format=* > > +disabled=* > > +inherit=* > > +pinned=* > > +exclusive=* > > +exclude_user=* > > +exclude_kernel=* > > +exclude_hv=* > > +exclude_idle=* > > +mmap=* > > +comm=* > > +freq=* > > +inherit_stat=* > > +enable_on_exec=* > > +task=* > > +watermark=* > > +precise_ip=* > > +mmap_data=* > > +sample_id_all=* > > +exclude_host=* > > +exclude_guest=* > > +exclude_callchain_kernel=* > > +exclude_callchain_user=* > > +wakeup_events=* > > +bp_type=* > > +config1=* > > +config2=* > > +branch_sample_type=* > > +sample_regs_user=* > > +sample_stack_user=* > > diff --git a/tools/perf/tests/attr/test-record-spe-period b/tools/perf/tests/attr/test-record-spe-period > > new file mode 100644 > > index 000000000000..75f8c9cd8e3f > > --- /dev/null > > +++ b/tools/perf/tests/attr/test-record-spe-period > > @@ -0,0 +1,12 @@ > > +[config] > > +command = record > > +args = --no-bpf-event -c 2 -e arm_spe_0// -- kill >/dev/null 2>&1 > > +ret = 1 > > +arch = aarch64 > > + > > +[event-10:base-record-spe] > > +sample_period=2 > > +freq=0 > > + > > +# dummy event > > +[event-1:base-record-spe] > > diff --git a/tools/perf/tests/attr/test-record-spe-period-term b/tools/perf/tests/attr/test-record-spe-period-term > > new file mode 100644 > > index 000000000000..8f60a4fec657 > > --- /dev/null > > +++ b/tools/perf/tests/attr/test-record-spe-period-term > > @@ -0,0 +1,12 @@ > > +[config] > > +command = record > > +args = --no-bpf-event -e arm_spe_0/period=3/ -- kill >/dev/null 2>&1 > > +ret = 1 > > +arch = aarch64 > > + > > +[event-10:base-record-spe] > > +sample_period=3 > > +freq=0 > > + > > +# dummy event > > +[event-1:base-record-spe] -- - Arnaldo