bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] perf: arm/arm64: Improve completeness for kernel address space
@ 2019-08-10  7:21 Leo Yan
  2019-08-10  7:21 ` [PATCH v4 1/2] perf machine: Support arch's specific kernel start address Leo Yan
  2019-08-10  7:21 ` [PATCH v4 2/2] perf machine: arm/arm64: Improve completeness for kernel address space Leo Yan
  0 siblings, 2 replies; 7+ messages in thread
From: Leo Yan @ 2019-08-10  7:21 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, David Miller,
	Milian Wolff, Donald Yandt, Davidlohr Bueso, Wei Li,
	Adrian Hunter, Mark Drayton, Tzvetomir Stoyanov (VMware),
	linux-kernel, netdev, bpf, clang-built-linux, Mathieu Poirier
  Cc: Leo Yan

This patch set is to improve completeness for kernel address space for
arm/arm64; it adds architecture specific tweaking for the kernel start
address, thus can include the memory regions which are prior to '_stext'
symbol.  With this change, we can see the eBPF program can be parsed
properly on arm64.

This patch set is a following up version for the old patch "perf cs-etm:
Improve completeness for kernel address space" [1]; the old patch was
only to fix the issue for CoreSight ETM event; but the kernel address space
issue is not only limited to CoreSight event, it should be a common issue
for other events (e.g. PMU events), clock events for profiling eBPF
program.  So this patch set tries to resolve it as a common issue for
arm/arm64 archs.

When implemented related code, I tried to use the API
machine__create_extra_kernel_maps(); but I found the 'perf script' tool
directly calls machine__get_kernel_start() instead of running into
the flow for machine__create_extra_kernel_maps(); this is the reason I
don't use machine__create_extra_kernel_maps() for tweaking kernel start
address and refactor machine__get_kernel_start() alternatively.

If there have better method to resolve this issue, any suggestions and
comments are very welcome!

[1] https://lkml.org/lkml/2019/6/19/1057


Leo Yan (2):
  perf machine: Support arch's specific kernel start address
  perf machine: arm/arm64: Improve completeness for kernel address space

 tools/perf/Makefile.config           | 22 ++++++++++++++++++++++
 tools/perf/arch/arm/util/Build       |  2 ++
 tools/perf/arch/arm/util/machine.c   | 17 +++++++++++++++++
 tools/perf/arch/arm64/util/Build     |  1 +
 tools/perf/arch/arm64/util/machine.c | 17 +++++++++++++++++
 tools/perf/arch/x86/util/machine.c   | 10 ++++++++++
 tools/perf/util/machine.c            | 13 +++++++------
 tools/perf/util/machine.h            |  2 ++
 8 files changed, 78 insertions(+), 6 deletions(-)
 create mode 100644 tools/perf/arch/arm/util/machine.c
 create mode 100644 tools/perf/arch/arm64/util/machine.c

-- 
2.17.1


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

end of thread, other threads:[~2019-08-12  7:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10  7:21 [PATCH v4 0/2] perf: arm/arm64: Improve completeness for kernel address space Leo Yan
2019-08-10  7:21 ` [PATCH v4 1/2] perf machine: Support arch's specific kernel start address Leo Yan
2019-08-12  6:37   ` Adrian Hunter
2019-08-12  7:02     ` Leo Yan
2019-08-12  7:23       ` Adrian Hunter
2019-08-12  7:39         ` Leo Yan
2019-08-10  7:21 ` [PATCH v4 2/2] perf machine: arm/arm64: Improve completeness for kernel address space Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).