mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Perf tool: Enable Arm arch timer counter and arm-spe's timestamp
@ 2020-07-15  2:33 Leo Yan
  2020-07-15  2:33 ` [PATCH v1 1/3] perf tools: Support Arm arch timer counter Leo Yan
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Leo Yan @ 2020-07-15  2:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Mark Rutland, Peter Zijlstra,
	Ingo Molnar, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Kemeng Shi, Nick Desaulniers, Ian Rogers, Mathieu Poirier,
	Adrian Hunter, Igor Lubashev, Andi Kleen, Jin Yao, James Clark,
	linux-kernel
  Cc: Leo Yan

This patch set is to enable Arm arch timer counter and Arm SPE is the
first customer to use arch timer counter for its timestamp.

The patch 01 is to retrieve arch timer's parameters from mmaped page;
patch 02 provides APIs for the conversion between arch timer's counter
and time; patch 03 is to enable timestamp based on the new introduced
APIs for timestamp related calculation.

Note, this patch set is depend on the kernel changes for "arm64: perf:
Proper cap_user_time* support" [1].

This patch set has been rebased on mainline kernel with the latest
commit 11ba468877bb ("Linux 5.8-rc5") and also applied on top of patch
set [1].  After enabling the timestamp, the samples can show the
timestamp, and the timestamp is consistent with the kernel's timestamp
by checking the kernel log:

  $ perf script -F,+time
    dd  6799 [034] 25496.733475:          1              l1d-access:      ffff87f37b88 _dl_start+0x288 (/usr/lib/aarch64-linux-gnu/ld-2.28.so)
    dd  6799 [034] 25496.733475:          1              tlb-access:      ffff87f37b88 _dl_start+0x288 (/usr/lib/aarch64-linux-gnu/ld-2.28.so)
    dd  6799 [034] 25496.733479:          1              l1d-access:      ffff87f37c74 _dl_start+0x374 (/usr/lib/aarch64-linux-gnu/ld-2.28.so)
    dd  6799 [034] 25496.733479:          1              tlb-access:      ffff87f37c74 _dl_start+0x374 (/usr/lib/aarch64-linux-gnu/ld-2.28.so)
    dd  6799 [034] 25496.733485:          1              l1d-access:      ffff87f49af4 __GI___tunables_init+0x3c (/usr/lib/aarch64-linux-gnu/ld-2.28.so)
    dd  6799 [034] 25496.733485:          1              tlb-access:      ffff87f49af4 __GI___tunables_init+0x3c (/usr/lib/aarch64-linux-gnu/ld-2.28.so)

[1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=318401


Leo Yan (3):
  perf tools: Support Arm arch timer counter
  perf arm_arch_timer: Convert between counter and timestamp
  perf arm-spe: Enable timestamp with arch timer counter

 tools/perf/arch/arm64/util/Build        |  1 +
 tools/perf/arch/arm64/util/arch_timer.c | 50 +++++++++++++++++++++++++
 tools/perf/arch/arm64/util/arm-spe.c    | 17 +++++++++
 tools/perf/util/Build                   |  1 +
 tools/perf/util/arm-spe.c               | 16 +++++++-
 tools/perf/util/arm-spe.h               |  5 +++
 tools/perf/util/arm_arch_timer.c        | 28 ++++++++++++++
 tools/perf/util/arm_arch_timer.h        | 23 ++++++++++++
 8 files changed, 139 insertions(+), 2 deletions(-)
 create mode 100644 tools/perf/arch/arm64/util/arch_timer.c
 create mode 100644 tools/perf/util/arm_arch_timer.c
 create mode 100644 tools/perf/util/arm_arch_timer.h

-- 
2.17.1


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

end of thread, other threads:[~2020-07-16  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  2:33 [PATCH v1 0/3] Perf tool: Enable Arm arch timer counter and arm-spe's timestamp Leo Yan
2020-07-15  2:33 ` [PATCH v1 1/3] perf tools: Support Arm arch timer counter Leo Yan
2020-07-15  2:34 ` [PATCH v1 2/3] perf arm_arch_timer: Convert between counter and timestamp Leo Yan
2020-07-15  2:34 ` [PATCH v1 3/3] perf arm-spe: Enable timestamp with arch timer counter Leo Yan
2020-07-15 16:31 ` [PATCH v1 0/3] Perf tool: Enable Arm arch timer counter and arm-spe's timestamp Ian Rogers
2020-07-16  1:17   ` Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®