aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kvm.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-03-03 10:37:54 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-12 11:39:49 -0400
commitd704ebdae4aaeec89180dcfd0ca74e5bba318853 (patch)
treefeb48de01669999de08213cde76525c222ef9634 /tools/perf/builtin-kvm.c
parentd10eb1eb76a86266354ecab6e42c1606e3b8bc4c (diff)
perf tools: tool->finished_round() doesn't need perf_session
It is all about flushing the ordered queue or piping it thru, no need for a perf_session pointer. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-g47fx3ys0t9271cp0dcabjc7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r--tools/perf/builtin-kvm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 802b8f53fa9a..643722f40075 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -18,6 +18,7 @@
18#include "util/stat.h" 18#include "util/stat.h"
19#include "util/top.h" 19#include "util/top.h"
20#include "util/data.h" 20#include "util/data.h"
21#include "util/ordered-events.h"
21 22
22#include <sys/prctl.h> 23#include <sys/prctl.h>
23#ifdef HAVE_TIMERFD_SUPPORT 24#ifdef HAVE_TIMERFD_SUPPORT
@@ -783,8 +784,10 @@ static int perf_kvm__mmap_read(struct perf_kvm_stat *kvm)
783 784
784 /* flush queue after each round in which we processed events */ 785 /* flush queue after each round in which we processed events */
785 if (ntotal) { 786 if (ntotal) {
786 kvm->session->ordered_events.next_flush = flush_time; 787 struct ordered_events *oe = &kvm->session->ordered_events;
787 err = kvm->tool.finished_round(&kvm->tool, NULL, kvm->session); 788
789 oe->next_flush = flush_time;
790 err = ordered_events__flush(oe, OE_FLUSH__ROUND);
788 if (err) { 791 if (err) {
789 if (kvm->lost_events) 792 if (kvm->lost_events)
790 pr_info("\nLost events: %" PRIu64 "\n\n", 793 pr_info("\nLost events: %" PRIu64 "\n\n",