diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-09-20 12:14:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-09-20 12:16:42 -0400 |
commit | 351a1f5c8afa13ea5cfcdae543f6596ef8ebdbd9 (patch) | |
tree | 6d039ac0d47666bd6de701911a283c51bea7105e /tools/perf/builtin-kvm.c | |
parent | 7f2444d38f6bbfa12bc15e2533d8f9daa85ca02b (diff) | |
parent | 2bff2b828502b5e5d5ea5a52643d3542053df03f (diff) |
Merge tag 'perf-core-for-mingo-5.4-20190920-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
perf stat:
Srikar Dronamraju:
- Fix a segmentation fault when using repeat forever.
- Reset previous counts on repeat with interval.
aarch64:
James Clark:
- Add PMU event JSON files for Cortex-A76 and Neoverse N1.
PowerPC:
Anju T Sudhakar:
- Make 'trace_cycles' the default event for 'perf kvm record' in PowerPC.
S/390:
- Link libjvmti to tools/lib/string.o to have a weak strlcpy()
implementation, providing previously unresolved symbol on s/390.
perf test:
Jiri Olsa:
- Add libperf automated tests to 'make -C tools/perf build-test'.
Colin Ian King:
- Fix spelling mistake.
Tree wide:
Arnaldo Carvalho de Melo:
- Some more header file sanitization.
libperf:
Jiri Olsa:
- Add dependency on libperf for python.so binding.
libtraceevent:
Sakari Ailus:
- Convert remaining %p[fF] users to %p[sS].
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r-- | tools/perf/builtin-kvm.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 0a4fcbe32bf6..6e3e36658900 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -17,9 +17,11 @@ | |||
17 | #include "util/debug.h" | 17 | #include "util/debug.h" |
18 | #include "util/tool.h" | 18 | #include "util/tool.h" |
19 | #include "util/stat.h" | 19 | #include "util/stat.h" |
20 | #include "util/synthetic-events.h" | ||
20 | #include "util/top.h" | 21 | #include "util/top.h" |
21 | #include "util/data.h" | 22 | #include "util/data.h" |
22 | #include "util/ordered-events.h" | 23 | #include "util/ordered-events.h" |
24 | #include "util/kvm-stat.h" | ||
23 | #include "ui/ui.h" | 25 | #include "ui/ui.h" |
24 | 26 | ||
25 | #include <sys/prctl.h> | 27 | #include <sys/prctl.h> |
@@ -58,7 +60,6 @@ static const char *get_filename_for_perf_kvm(void) | |||
58 | } | 60 | } |
59 | 61 | ||
60 | #ifdef HAVE_KVM_STAT_SUPPORT | 62 | #ifdef HAVE_KVM_STAT_SUPPORT |
61 | #include "util/kvm-stat.h" | ||
62 | 63 | ||
63 | void exit_event_get_key(struct evsel *evsel, | 64 | void exit_event_get_key(struct evsel *evsel, |
64 | struct perf_sample *sample, | 65 | struct perf_sample *sample, |
@@ -1513,11 +1514,21 @@ perf_stat: | |||
1513 | } | 1514 | } |
1514 | #endif /* HAVE_KVM_STAT_SUPPORT */ | 1515 | #endif /* HAVE_KVM_STAT_SUPPORT */ |
1515 | 1516 | ||
1517 | int __weak kvm_add_default_arch_event(int *argc __maybe_unused, | ||
1518 | const char **argv __maybe_unused) | ||
1519 | { | ||
1520 | return 0; | ||
1521 | } | ||
1522 | |||
1516 | static int __cmd_record(const char *file_name, int argc, const char **argv) | 1523 | static int __cmd_record(const char *file_name, int argc, const char **argv) |
1517 | { | 1524 | { |
1518 | int rec_argc, i = 0, j; | 1525 | int rec_argc, i = 0, j, ret; |
1519 | const char **rec_argv; | 1526 | const char **rec_argv; |
1520 | 1527 | ||
1528 | ret = kvm_add_default_arch_event(&argc, argv); | ||
1529 | if (ret) | ||
1530 | return -EINVAL; | ||
1531 | |||
1521 | rec_argc = argc + 2; | 1532 | rec_argc = argc + 2; |
1522 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); | 1533 | rec_argv = calloc(rec_argc + 1, sizeof(char *)); |
1523 | rec_argv[i++] = strdup("record"); | 1534 | rec_argv[i++] = strdup("record"); |