aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/kvm-stat.h
diff options
context:
space:
mode:
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>2019-07-18 23:47:48 +0530
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-20 10:28:26 -0300
commit124eb5f82bf9395419b20205c4dcc1b8fcda7f29 (patch)
treebf33b527d49e039fc1b851ce561ad9150b54ef49 /tools/perf/util/kvm-stat.h
parentperf kvm: Move kvm-stat header file from conditional inclusion to common include section (diff)
downloadlinux-dev-124eb5f82bf9395419b20205c4dcc1b8fcda7f29.tar.xz
linux-dev-124eb5f82bf9395419b20205c4dcc1b8fcda7f29.zip
perf kvm: Add arch neutral function to choose event for perf kvm record
'perf kvm record' uses 'cycles'(if the user did not specify any event) as the default event to profile the guest. This will not provide any proper samples from the guest incase of powerpc architecture, since in powerpc the PMUs are controlled by the guest rather than the host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceeding with 'cycles' event. Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> Reviewed-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20190718181749.30612-2-anju@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/kvm-stat.h')
-rw-r--r--tools/perf/util/kvm-stat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h
index 8fd6ec20662c..6f0fa05b62b6 100644
--- a/tools/perf/util/kvm-stat.h
+++ b/tools/perf/util/kvm-stat.h
@@ -148,4 +148,5 @@ extern const char *kvm_entry_trace;
extern const char *kvm_exit_trace;
#endif /* HAVE_KVM_STAT_SUPPORT */
+extern int kvm_add_default_arch_event(int *argc, const char **argv);
#endif /* __PERF_KVM_STAT_H */