[tip:perf/core] perf kvm stat report: Enable the target.system_wide flag
From: tip-bot for Alexander Yarygin
Date: Fri Sep 19 2014 - 01:21:07 EST
Commit-ID: f181957c2849478fc963a8ac3c7dacf0a87c6b05
Gitweb: http://git.kernel.org/tip/f181957c2849478fc963a8ac3c7dacf0a87c6b05
Author: Alexander Yarygin <yarygin@xxxxxxxxxxxxxxxxxx>
AuthorDate: Mon, 1 Sep 2014 17:44:54 +0400
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Wed, 17 Sep 2014 17:08:07 -0300
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 <yarygin@xxxxxxxxxxxxxxxxxx>
Acked-by: David Ahern <dsahern@xxxxxxxxx>
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>
Link: http://lkml.kernel.org/r/1409579095-12963-3-git-send-email-yarygin@xxxxxxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
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 646ec5d..84295ab 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);
}
--
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/