All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] perf: Allow TIME_CONV to be backwards-compatible and dump it
@ 2021-04-28 12:09 Leo Yan
  2021-04-28 12:09 ` [PATCH v3 1/4] perf tool: Change fields type in perf_record_time_conv Leo Yan
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Leo Yan @ 2021-04-28 12:09 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Adrian Hunter, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, Gustavo A. R. Silva, Steve MacLean,
	Yonatan Goldschmidt, Kan Liang, linux-perf-users, linux-kernel
  Cc: Leo Yan

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 v2:
* Fixed subject and commit log in patch 01.

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 perf_record_time_conv
  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-28 14:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 12:09 [PATCH v3 0/4] perf: Allow TIME_CONV to be backwards-compatible and dump it Leo Yan
2021-04-28 12:09 ` [PATCH v3 1/4] perf tool: Change fields type in perf_record_time_conv Leo Yan
2021-04-28 13:16   ` Adrian Hunter
2021-04-28 12:09 ` [PATCH v3 2/4] perf jit: Let convert_timestamp() to be backwards-compatible Leo Yan
2021-04-28 12:09 ` [PATCH v3 3/4] perf session: Add swap operation for event TIME_CONV Leo Yan
2021-04-28 14:43   ` Adrian Hunter
2021-04-28 12:09 ` [PATCH v3 4/4] perf session: Dump PERF_RECORD_TIME_CONV event Leo Yan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.