[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1334233262-5679-2-git-send-email-jolsa@redhat.com>
Date: Thu, 12 Apr 2012 14:21:00 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: acme@...hat.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
paulus@...ba.org, cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com
Cc: linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>
Subject: [PATCH 1/3] perf, tool: Force guest machine definition option
Running 'perf kvm record' without any of following options:
--guestmount
--guestvmlinux
--guestkallsyms
--guestmodules
is causing the guest machine to be ommited from the data file,
and all guest samples are counted in nr_unprocessable_samples.
This patch makes sure the 'perf kvm record' command is not
let through until one of the above option is specified.
Signed-off-by: Jiri Olsa <jolsa@...hat.com>
---
tools/perf/builtin-kvm.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 9fc6e0f..559d468 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -53,6 +53,16 @@ static int __cmd_record(int argc, const char **argv)
int rec_argc, i = 0, j;
const char **rec_argv;
+ if (perf_guest &&
+ !(symbol_conf.guestmount ||
+ symbol_conf.default_guest_vmlinux_name ||
+ symbol_conf.default_guest_modules ||
+ symbol_conf.default_guest_kallsyms)) {
+ ui__warning("You need to define guest with one of guestmount|"
+ "guestvmlinux|guestkallsyms|guestmodules\n");
+ return -EINVAL;
+ }
+
rec_argc = argc + 2;
rec_argv = calloc(rec_argc + 1, sizeof(char *));
rec_argv[i++] = strdup("record");
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists