From: Alexander Yarygin Date: Mon, 1 Sep 2014 13:44:54 +0000 (+0400) Subject: perf kvm stat report: Enable the target.system_wide flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f181957c2849478fc963a8ac3c7dacf0a87c6b05;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Acked-by: David Ahern Cc: Christian Borntraeger Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1409579095-12963-3-git-send-email-yarygin@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- 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); }