[PATCH v2 0/4] perf: Allow TIME_CONV to be backwards-compatible and dump it
From: Leo Yan
Date: Wed Apr 28 2021 - 07:58:16 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 rebased on perf/core branch with:
commit 4c391ea001cb ("perf beauty: Fix fsconfig generator")
And the patches have been tested on Arm64 HiSilicon D06 platform.
Changes from v1:
* Changed from bool to __u8 for perf_record_time_conv (Adrain);
* Added helper event_contains() and used it (Adrian).
Leo Yan (4):
perf tool: Change fields type in cap_user_time_short
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/lib/perf/include/perf/event.h | 7 +++++--
tools/perf/util/jitdump.c | 30 +++++++++++++++++++----------
tools/perf/util/session.c | 28 +++++++++++++++++++++++++--
tools/perf/util/tsc.c | 30 +++++++++++++++++++++++++++++
tools/perf/util/tsc.h | 4 ++++
5 files changed, 85 insertions(+), 14 deletions(-)
--
2.25.1