mbox series

[v2,0/4] Enable display of partial and empty SVE predicates from Arm SPE data

Message ID 20230320151509.1137462-1-james.clark@arm.com (mailing list archive)
Headers show
Series Enable display of partial and empty SVE predicates from Arm SPE data | expand

Message

James Clark March 20, 2023, 3:15 p.m. UTC
Changes since v1:
 * Rebase onto perf/core because it no longer applied cleanly

------------

Hi,

I'm submitting this on behalf of German who moved on to work on other
things in Arm before he could finish it off.

The predicate information is available on SPE samples from 
Armv8.3 (FEAT_SPEv1p1), this could be useful info for profiling SVE
code as partial and empty predicates indicate that the full vector
width isn't being used. There is a good example in the last commit
message.

Though currently, there isn't a suitable field to store the info
on Perf samples, so this change also adds a new SIMD field.
This field could be used by other architectures, but currently there
is only one bit reserved to identify SVE. It's only added to
struct perf_sample on the userspace side, and isn't part of the kernel
ABI, so it doesn't survive a perf inject. Although this is the
same behavior for some other fields like branch flags, so I don't
think it should be an issue to do something similar here. Perhaps in
the future we could make sure everything that is synthesised from
auxtrace data also makes it back into the new Perf inject file without
being lost.

German Gomez (4):
  perf event: Add simd_flags field to perf_sample
  perf arm-spe: Refactor arm-spe to support operation packet type
  perf arm-spe: Add SVE flags to the SPE samples
  perf report: Add 'simd' sort field

 tools/perf/Documentation/perf-report.txt      |  1 +
 .../util/arm-spe-decoder/arm-spe-decoder.c    | 30 ++++++++++--
 .../util/arm-spe-decoder/arm-spe-decoder.h    | 47 +++++++++++++++----
 tools/perf/util/arm-spe.c                     | 28 +++++++++--
 tools/perf/util/hist.c                        |  1 +
 tools/perf/util/hist.h                        |  1 +
 tools/perf/util/sample.h                      | 13 +++++
 tools/perf/util/sort.c                        | 47 +++++++++++++++++++
 tools/perf/util/sort.h                        |  2 +
 9 files changed, 152 insertions(+), 18 deletions(-)


base-commit: 96d541699e5c50b1bc2d50c83cd7145994d5f071

Comments

Ian Rogers March 20, 2023, 5:50 p.m. UTC | #1
On Mon, Mar 20, 2023 at 8:15 AM James Clark <james.clark@arm.com> wrote:
>
> Changes since v1:
>  * Rebase onto perf/core because it no longer applied cleanly
>
> ------------
>
> Hi,
>
> I'm submitting this on behalf of German who moved on to work on other
> things in Arm before he could finish it off.
>
> The predicate information is available on SPE samples from
> Armv8.3 (FEAT_SPEv1p1), this could be useful info for profiling SVE
> code as partial and empty predicates indicate that the full vector
> width isn't being used. There is a good example in the last commit
> message.
>
> Though currently, there isn't a suitable field to store the info
> on Perf samples, so this change also adds a new SIMD field.
> This field could be used by other architectures, but currently there
> is only one bit reserved to identify SVE. It's only added to
> struct perf_sample on the userspace side, and isn't part of the kernel
> ABI, so it doesn't survive a perf inject. Although this is the
> same behavior for some other fields like branch flags, so I don't
> think it should be an issue to do something similar here. Perhaps in
> the future we could make sure everything that is synthesised from
> auxtrace data also makes it back into the new Perf inject file without
> being lost.

Series:
Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> German Gomez (4):
>   perf event: Add simd_flags field to perf_sample
>   perf arm-spe: Refactor arm-spe to support operation packet type
>   perf arm-spe: Add SVE flags to the SPE samples
>   perf report: Add 'simd' sort field
>
>  tools/perf/Documentation/perf-report.txt      |  1 +
>  .../util/arm-spe-decoder/arm-spe-decoder.c    | 30 ++++++++++--
>  .../util/arm-spe-decoder/arm-spe-decoder.h    | 47 +++++++++++++++----
>  tools/perf/util/arm-spe.c                     | 28 +++++++++--
>  tools/perf/util/hist.c                        |  1 +
>  tools/perf/util/hist.h                        |  1 +
>  tools/perf/util/sample.h                      | 13 +++++
>  tools/perf/util/sort.c                        | 47 +++++++++++++++++++
>  tools/perf/util/sort.h                        |  2 +
>  9 files changed, 152 insertions(+), 18 deletions(-)
>
>
> base-commit: 96d541699e5c50b1bc2d50c83cd7145994d5f071
> --
> 2.34.1
>
Arnaldo Carvalho de Melo March 20, 2023, 10:29 p.m. UTC | #2
Em Mon, Mar 20, 2023 at 10:50:59AM -0700, Ian Rogers escreveu:
> On Mon, Mar 20, 2023 at 8:15 AM James Clark <james.clark@arm.com> wrote:
> >
> > Changes since v1:
> >  * Rebase onto perf/core because it no longer applied cleanly
> >
> > ------------
> >
> > Hi,
> >
> > I'm submitting this on behalf of German who moved on to work on other
> > things in Arm before he could finish it off.
> >
> > The predicate information is available on SPE samples from
> > Armv8.3 (FEAT_SPEv1p1), this could be useful info for profiling SVE
> > code as partial and empty predicates indicate that the full vector
> > width isn't being used. There is a good example in the last commit
> > message.
> >
> > Though currently, there isn't a suitable field to store the info
> > on Perf samples, so this change also adds a new SIMD field.
> > This field could be used by other architectures, but currently there
> > is only one bit reserved to identify SVE. It's only added to
> > struct perf_sample on the userspace side, and isn't part of the kernel
> > ABI, so it doesn't survive a perf inject. Although this is the
> > same behavior for some other fields like branch flags, so I don't
> > think it should be an issue to do something similar here. Perhaps in
> > the future we could make sure everything that is synthesised from
> > auxtrace data also makes it back into the new Perf inject file without
> > being lost.
> 
> Series:
> Acked-by: Ian Rogers <irogers@google.com>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Ian
> 
> > German Gomez (4):
> >   perf event: Add simd_flags field to perf_sample
> >   perf arm-spe: Refactor arm-spe to support operation packet type
> >   perf arm-spe: Add SVE flags to the SPE samples
> >   perf report: Add 'simd' sort field
> >
> >  tools/perf/Documentation/perf-report.txt      |  1 +
> >  .../util/arm-spe-decoder/arm-spe-decoder.c    | 30 ++++++++++--
> >  .../util/arm-spe-decoder/arm-spe-decoder.h    | 47 +++++++++++++++----
> >  tools/perf/util/arm-spe.c                     | 28 +++++++++--
> >  tools/perf/util/hist.c                        |  1 +
> >  tools/perf/util/hist.h                        |  1 +
> >  tools/perf/util/sample.h                      | 13 +++++
> >  tools/perf/util/sort.c                        | 47 +++++++++++++++++++
> >  tools/perf/util/sort.h                        |  2 +
> >  9 files changed, 152 insertions(+), 18 deletions(-)
> >
> >
> > base-commit: 96d541699e5c50b1bc2d50c83cd7145994d5f071
> > --
> > 2.34.1
> >