aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kvm.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-29 06:23:32 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-29 06:23:32 -0400
commitaac898548d04c7bff179b79f805874b0d6f87571 (patch)
treee8de975fd5de6c95bf4329861a872dbcfe0c7ead /tools/perf/builtin-kvm.c
parent2f5e98802350627ad6f2e3cee4d177059fc0c2f2 (diff)
parentcd65718712469ad844467250e8fad20a5838baae (diff)
Merge branch 'perf/urgent' into perf/core
Conflicts: tools/perf/builtin-record.c tools/perf/builtin-top.c tools/perf/util/hist.h
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r--tools/perf/builtin-kvm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 188bb29b373f..cb05f39d8a77 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -889,11 +889,18 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
889 while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) { 889 while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) {
890 err = perf_evlist__parse_sample(kvm->evlist, event, &sample); 890 err = perf_evlist__parse_sample(kvm->evlist, event, &sample);
891 if (err) { 891 if (err) {
892 perf_evlist__mmap_consume(kvm->evlist, idx);
892 pr_err("Failed to parse sample\n"); 893 pr_err("Failed to parse sample\n");
893 return -1; 894 return -1;
894 } 895 }
895 896
896 err = perf_session_queue_event(kvm->session, event, &sample, 0); 897 err = perf_session_queue_event(kvm->session, event, &sample, 0);
898 /*
899 * FIXME: Here we can't consume the event, as perf_session_queue_event will
900 * point to it, and it'll get possibly overwritten by the kernel.
901 */
902 perf_evlist__mmap_consume(kvm->evlist, idx);
903
897 if (err) { 904 if (err) {
898 pr_err("Failed to enqueue sample: %d\n", err); 905 pr_err("Failed to enqueue sample: %d\n", err);
899 return -1; 906 return -1;