[PATCH v1 0/3] perf: Allow TIME_CONV to be backwards-compatible and dump it

From: Leo Yan
Date: Mon Apr 12 2021 - 04:35:14 EST


The event PERF_RECORD_TIME_CONV was extended for clock parameters, but
the tool fails to be backwards-compatible for the old event format.

Based on checking the event size, this patch series can decide if the
extended clock parameters are contained in the perf event or not. This
allows the event PERF_RECORD_TIME_CONV to be backwards-compatible.

The last patch also is introduced for dumping the event, for both the
old and latest event formats.

The patch set has been tested on Arm64 HiSilicon D06 platform.

Leo Yan (3):
perf jit: Let convert_timestamp() to be backwards-compatible
perf session: Add swap operation for event TIME_CONV
perf session: Dump PERF_RECORD_TIME_CONV event

tools/perf/util/jitdump.c | 31 +++++++++++++++++++++----------
tools/perf/util/session.c | 35 +++++++++++++++++++++++++++++++++--
tools/perf/util/tsc.c | 31 +++++++++++++++++++++++++++++++
tools/perf/util/tsc.h | 4 ++++
4 files changed, 89 insertions(+), 12 deletions(-)

--
2.25.1