aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yarygin <[email protected]>2014-09-01 17:44:54 +0400
committerArnaldo Carvalho de Melo <[email protected]>2014-09-17 17:08:07 -0300
commitf181957c2849478fc963a8ac3c7dacf0a87c6b05 (patch)
tree0e109765513742fa3f1426b8a031484b81f0a029
parent3ae4a76ac840021294c091884e04af7c92e481ae (diff)
perf kvm stat report: Enable the target.system_wide flag
The 'perf kvm stat report' command can be used to analyze events either for system wide or for specific pids. Let's enable kvm->opts.target.system_wide flag when 'report' command is running for system-wide analyzing. This helps to sync kvm->opts.target values in 'report' and 'live' commands. Signed-off-by: Alexander Yarygin <[email protected]> Acked-by: David Ahern <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/builtin-kvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 646ec5d5de80..84295ab6c4e1 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1207,6 +1207,9 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv)
kvm_events_report_options);
}
+ if (!kvm->opts.target.pid)
+ kvm->opts.target.system_wide = true;
+
return kvm_events_report_vcpu(kvm);
}