[PATCH 2/3] perf kvm stat report: Enable the target.system_wide flag
From: Alexander Yarygin
Date: Mon Sep 01 2014 - 09:48:43 EST
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.
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Signed-off-by: Alexander Yarygin <yarygin@xxxxxxxxxxxxxxxxxx>
---
tools/perf/builtin-kvm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index ad73476..b7fa0bc 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1212,6 +1212,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);
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/