lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb98e7fd-bf0f-bc3b-ad2a-2775d2ef321d@arm.com>
Date:   Mon, 28 Feb 2022 15:05:21 +0000
From:   James Clark <james.clark@....com>
To:     German Gomez <german.gomez@....com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org, acme@...nel.org
Cc:     Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH] perf test: Add perf_event_attr tests for the arm_spe
 event



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 <german.gomez@....com>

Reviewed-by: James Clark <james.clark@....com>

> ---
>  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]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ