Re: [PATCH v2 00/14] perf arm-spe: Refactor decoding & dumping flow

From: Arnaldo Carvalho de Melo
Date: Tue Oct 13 2020 - 10:53:37 EST


Em Tue, Sep 29, 2020 at 02:39:03PM +0100, Leo Yan escreveu:
> The prominent issue for the SPE trace decoding and dumping is the packet
> header and payload values are hard coded with numbers and it's not
> readable and difficult to maintain; and has other minor issues, e.g. the
> packet length (header + payload) calculation is not correct for some
> packet types, and the dumping flow misses to support specific sub
> classes for operation packet, etc.
>
> So this patch set is to refactor the Arm SPE decoding SPE with:
> - Patches 01, 02 are minor cleans up;
> - Patches 03, 04 are used to fix and polish the packet and payload
> length calculation;
> - Patch 05 is to add a helper to wrap up printing strings, this can
> avoid bunch of duplicate code lines;
> - Patches 06 ~ 12 are used to refactor decoding for different types
> packet one by one (address packet, context packet, counter packet,
> event packet, operation packet);
> - Patch 13 is coming from Andre to dump memory tagging;
> - Patch 14 is coming from Wei Li to add decoding for ARMv8.3
> extension, in this version it has been improved to use defined
> macros, also is improved for failure handling and commit log.
>
> This patch set is cleanly applied on the top of perf/core branch
> with commit a55b7bb1c146 ("perf test: Fix msan uninitialized use."),
> and the patches have been verified on Hisilicon D06 platform and I
> manually inspected the dumping result.
>
> Changes from v1:
> - Heavily rewrote the patch 05 for refactoring printing strings; this
> is fundamental change, so adjusted the sequence for patches and moved
> the printing string patch ahead from patch 10 (v1) to patch 05;
> - Changed to use GENMASK_ULL() for bits mask;
> - Added Andre's patch 13 for dumping memory tagging;
> - Refined patch 12 for adding sub classes for Operation packet, merged
> some commit log from Andre's patch, which allows commit log and code
> to be more clear; Added "Co-developed-by: Andre Przywara" tag to
> reflect this.

Ok, so I'll wait for v3, as Leo indicated he'll respin.

Thanks,

- Arnaldo

>
> Andre Przywara (1):
> perf arm_spe: Decode memory tagging properties
>
> Leo Yan (12):
> perf arm-spe: Include bitops.h for BIT() macro
> perf arm-spe: Fix a typo in comment
> perf arm-spe: Refactor payload length calculation
> perf arm-spe: Fix packet length handling
> perf arm-spe: Refactor printing string to buffer
> perf arm-spe: Refactor packet header parsing
> perf arm-spe: Refactor address packet handling
> perf arm-spe: Refactor context packet handling
> perf arm-spe: Refactor counter packet handling
> perf arm-spe: Refactor event type handling
> perf arm-spe: Refactor operation packet handling
> perf arm-spe: Add more sub classes for operation packet
>
> Wei Li (1):
> perf arm-spe: Add support for ARMv8.3-SPE
>
> .../util/arm-spe-decoder/arm-spe-decoder.c | 54 +-
> .../util/arm-spe-decoder/arm-spe-decoder.h | 17 -
> .../arm-spe-decoder/arm-spe-pkt-decoder.c | 567 +++++++++++-------
> .../arm-spe-decoder/arm-spe-pkt-decoder.h | 124 +++-
> 4 files changed, 478 insertions(+), 284 deletions(-)
>
> --
> 2.20.1
>

--

- Arnaldo