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]
Date:   Mon, 19 Dec 2022 10:21:56 -0800
From:   Namhyung Kim <namhyung@...nel.org>
To:     James Clark <james.clark@....com>
Cc:     linux-perf-users@...r.kernel.org, robh@...nel.org,
        German Gomez <german.gomez@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        John Garry <john.g.garry@...cle.com>,
        Will Deacon <will@...nel.org>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/4] perf event: Add simd_flags field to perf_sample

Hi James,

On Mon, Dec 19, 2022 at 8:13 AM James Clark <james.clark@....com> wrote:
>
> From: German Gomez <german.gomez@....com>
>
> Add new field to the struct perf_sample to store flags related to SIMD
> ops.
>
> It will be used to store SIMD information from SVE and NEON when
> profiling using ARM SPE.
>
> Signed-off-by: German Gomez <german.gomez@....com>
> Signed-off-by: James Clark <james.clark@....com>
> ---
>  tools/perf/util/sample.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h
> index 60ec79d4eea4..bdf52faf165f 100644
> --- a/tools/perf/util/sample.h
> +++ b/tools/perf/util/sample.h
> @@ -66,6 +66,18 @@ struct aux_sample {
>         void *data;
>  };
>
> +struct simd_flags {
> +       u64     arch:1, /* architecture (isa) */
> +               pred:2; /* predication */

Can we reserve more bits for possible future extension or
other arch support?  It seems to be too tight for each field.
Do you plan to add more info to the struct in the future?

Thanks,
Namhyung


> +};
> +
> +/* simd architecture flags */
> +#define SIMD_OP_FLAGS_ARCH_SVE         0x01    /* ARM SVE */
> +
> +/* simd predicate flags */
> +#define SIMD_OP_FLAGS_PRED_PARTIAL     0x01    /* partial predicate */
> +#define SIMD_OP_FLAGS_PRED_EMPTY       0x02    /* empty predicate */
> +
>  struct perf_sample {
>         u64 ip;
>         u32 pid, tid;
> @@ -103,6 +115,7 @@ struct perf_sample {
>         struct stack_dump user_stack;
>         struct sample_read read;
>         struct aux_sample aux_sample;
> +       struct simd_flags simd_flags;
>  };
>
>  /*
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ