[PATCH v3 0/6] perf arm-spe: Enable timestamp

From: Leo Yan
Date: Sat Apr 10 2021 - 01:02:21 EST


This patch set is to enable timestamp for Arm SPE trace. It reads out
TSC parameters from the TIME_CONV event, the parameters are used for
conversion between timer counter and kernel time and which is applied
for Arm SPE samples.

This version dropped the change for adding hardware clock parameters
into auxtrace info, alternatively, it utilizes the TIME_CONV event to
extract the clock parameters which is used for timestamp calculation.

This patch set can be clearly applied on perf/core branch with:

commit 2c0cb9f56020 ("perf test: Add a shell test for 'perf stat --bpf-counters' new option")

Ths patch series has been tested on Hisilicon D06 platform.

Changes from v2:
* Changed to use TIME_CONV event for extracing clock parameters (Al).

Changes from v1:
* Rebased patch series on the latest perf/core branch;
* Fixed the patch for dumping TSC parameters to support both the
older and new auxtrace info format.


Leo Yan (6):
perf arm-spe: Remove unused enum value ARM_SPE_PER_CPU_MMAPS
perf arm-spe: Save clock parameters from TIME_CONV event
perf arm-spe: Convert event kernel time to counter value
perf arm-spe: Assign kernel time to synthesized event
perf arm-spe: Bail out if the trace is later than perf event
perf arm-spe: Don't wait for PERF_RECORD_EXIT event

tools/perf/util/arm-spe.c | 66 +++++++++++++++++++++++++++++++++------
tools/perf/util/arm-spe.h | 1 -
2 files changed, 56 insertions(+), 11 deletions(-)

--
2.25.1