perf kvm stat report: Enable the target.system_wide flag
authorAlexander Yarygin <[email protected]>
Mon, 1 Sep 2014 13:44:54 +0000 (17:44 +0400)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 17 Sep 2014 20:08:07 +0000 (17:08 -0300)
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]>
tools/perf/builtin-kvm.c

index 646ec5d5de802f65b47b2f77d5f59c2477302192..84295ab6c4e1486ccd7eb037977a42fbe5ec7e05 100644 (file)
@@ -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);
 }