[RFC 0/4] perf kvm: Guest Symbol Resolution for powerpc

From: Ravi Bangoria
Date: Wed Feb 24 2016 - 04:09:00 EST


Design of [patch v2] Guest Symbol Resolution is focused on enabling
perf kvm {record|report} on powerpc. Here is the link for the same:
thread.gmane.org/gmane.linux.kernel/2132409

As per the point raised by acme, this design does not enable cross
arch reporting functionality. i.e. record on powerpc and report on
!powerpc.

This patch aims to enable cross arch reporting functionality along with
enabling perf kvm {record|report} on powerpc. Note that basic principle
of enabling perf kvm {record|report} on powerpc using tracepoint
kvm_hv:kvm_guest_exit has not been changed.

Major change between [patch v2] and this [RFC] patch is, I've moved
'perf kvm report' related and ppc specific functionality from
tool/perf/arch/powerpc/ to generic tool/perf/ code. This is required
because perf binary needs ppc specific code even if it's compiled on
!ppc to enable cross arch reporting.

I need suggestion specifically on patch 3 (Enable 'report' on powerpc)
which contains arch specific code in generic area. Right now I've added
code in util/evsel.c. But please let me know if there's any better way
to do this.

This patch is to get suggestions on approach so I've tagged it as RFC
and not following the patch version series.

Ravi Bangoria (4):
perf kvm: Enable 'record' on powerpc
perf kvm: Introduce evsel as argument to perf_event__preprocess_sample
perf kvm: Enable 'report' on powerpc
perf kvm: Fix output fields instead of 'trace' for perf kvm report on
powerpc

tools/perf/arch/powerpc/util/Build | 1 +
tools/perf/arch/powerpc/util/kvm.c | 18 +++++++++
tools/perf/builtin-annotate.c | 3 +-
tools/perf/builtin-diff.c | 3 +-
tools/perf/builtin-mem.c | 10 +++--
tools/perf/builtin-report.c | 8 +++-
tools/perf/builtin-script.c | 3 +-
tools/perf/builtin-timechart.c | 8 ++--
tools/perf/builtin-top.c | 3 +-
tools/perf/tests/hists_cumulate.c | 2 +-
tools/perf/tests/hists_filter.c | 2 +-
tools/perf/tests/hists_link.c | 4 +-
tools/perf/tests/hists_output.c | 2 +-
tools/perf/util/event.c | 8 ++--
tools/perf/util/event.h | 3 +-
tools/perf/util/evlist.c | 9 +++++
tools/perf/util/evlist.h | 1 +
tools/perf/util/evsel.c | 77 ++++++++++++++++++++++++++++++++++++++
tools/perf/util/evsel.h | 7 ++++
tools/perf/util/session.c | 7 ++--
tools/perf/util/util.c | 5 +++
tools/perf/util/util.h | 1 +
22 files changed, 161 insertions(+), 24 deletions(-)
create mode 100644 tools/perf/arch/powerpc/util/kvm.c

--
2.1.4