mbox series

[v2,0/4] perf arm-spe: Track pid/tid for Arm SPE samples

Message ID 20211109115020.31623-1-german.gomez@arm.com (mailing list archive)
Headers show
Series perf arm-spe: Track pid/tid for Arm SPE samples | expand

Message

German Gomez Nov. 9, 2021, 11:50 a.m. UTC
The following patchset is an iteration on RFC [1] where pid/tid info is
assigned to the Arm SPE synthesized samples. Two methods of tracking
pids are considered: hardware-based (using Arm SPE CONTEXT packets), and
context-switch events (from perf) as fallback.

  - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf.
  - Patch #2 updates perf-record documentation and arm-spe recording so
    that they are consistent.
  - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record
    struct.
  - Patch #4 enables hardware-based pid tracking using SPE CONTEXT
    packets.

Changes since v1:

  - [PATCH 1/4] Fix authorship of commit.
  - [PATCH 2/4] (New patch) Updated perf-record docs to reflect the
    behavior of Arm SPE introduced by the previous patch.
  - [PATCH 3/4] update initialization of context_id field to (u64)-1.
  - [PATCH 4/4] Update handling of pid/tid tracking fallback following
    Leo Yan's suggestion. Don't consider per-thread mode on this patch.

German Gomez (3):
  perf arm-spe: Update --switch-events docs in perf-record
  perf arm-spe: Save context ID in record
  perf arm-spe: Support hardware-based PID tracing

Namhyung Kim (1):
  perf arm-spe: Track task context switch for cpu-mode events

 tools/perf/Documentation/perf-record.txt      |   2 +-
 tools/perf/arch/arm64/util/arm-spe.c          |   8 +-
 .../util/arm-spe-decoder/arm-spe-decoder.c    |   2 +
 .../util/arm-spe-decoder/arm-spe-decoder.h    |   1 +
 tools/perf/util/arm-spe.c                     | 120 ++++++++++++++----
 5 files changed, 104 insertions(+), 29 deletions(-)

Comments

Leo Yan Nov. 11, 2021, 7:27 a.m. UTC | #1
Hi Arnaldo,

On Tue, Nov 09, 2021 at 11:50:16AM +0000, German Gomez wrote:
> The following patchset is an iteration on RFC [1] where pid/tid info is
> assigned to the Arm SPE synthesized samples. Two methods of tracking
> pids are considered: hardware-based (using Arm SPE CONTEXT packets), and
> context-switch events (from perf) as fallback.
> 
>   - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf.
>   - Patch #2 updates perf-record documentation and arm-spe recording so
>     that they are consistent.
>   - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record
>     struct.
>   - Patch #4 enables hardware-based pid tracking using SPE CONTEXT
>     packets.

I have tested this patch set, it works well on Hisilicon D06 board,
please consider to pick up.  Thanks!

Leo
Leo Yan Nov. 11, 2021, 1:26 p.m. UTC | #2
On Thu, Nov 11, 2021 at 03:27:14PM +0800, Leo Yan wrote:
> Hi Arnaldo,
> 
> On Tue, Nov 09, 2021 at 11:50:16AM +0000, German Gomez wrote:
> > The following patchset is an iteration on RFC [1] where pid/tid info is
> > assigned to the Arm SPE synthesized samples. Two methods of tracking
> > pids are considered: hardware-based (using Arm SPE CONTEXT packets), and
> > context-switch events (from perf) as fallback.
> > 
> >   - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf.
> >   - Patch #2 updates perf-record documentation and arm-spe recording so
> >     that they are consistent.
> >   - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record
> >     struct.
> >   - Patch #4 enables hardware-based pid tracking using SPE CONTEXT
> >     packets.
> 
> I have tested this patch set, it works well on Hisilicon D06 board,
> please consider to pick up.  Thanks!

Hi Arnaldo,

Please hold on this version and German will respin a new patch set for
a found issue.

Thanks,
Leo
Arnaldo Carvalho de Melo Nov. 11, 2021, 2:49 p.m. UTC | #3
Em Thu, Nov 11, 2021 at 09:26:47PM +0800, Leo Yan escreveu:
> On Thu, Nov 11, 2021 at 03:27:14PM +0800, Leo Yan wrote:
> > Hi Arnaldo,
> > 
> > On Tue, Nov 09, 2021 at 11:50:16AM +0000, German Gomez wrote:
> > > The following patchset is an iteration on RFC [1] where pid/tid info is
> > > assigned to the Arm SPE synthesized samples. Two methods of tracking
> > > pids are considered: hardware-based (using Arm SPE CONTEXT packets), and
> > > context-switch events (from perf) as fallback.
> > > 
> > >   - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf.
> > >   - Patch #2 updates perf-record documentation and arm-spe recording so
> > >     that they are consistent.
> > >   - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record
> > >     struct.
> > >   - Patch #4 enables hardware-based pid tracking using SPE CONTEXT
> > >     packets.
> > 
> > I have tested this patch set, it works well on Hisilicon D06 board,
> > please consider to pick up.  Thanks!
> 
> Hi Arnaldo,
> 
> Please hold on this version and German will respin a new patch set for
> a found issue.

Ok

- Arnaldo