aboutsummaryrefslogtreecommitdiff
path: root/qemu-config.c
diff options
context:
space:
mode:
authorPrerna Saxena <prerna@linux.vnet.ibm.com>2010-08-09 11:48:32 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-09-09 16:22:44 -0500
commitab6540d55e8d57609c1e0c18b40269b05e231ce7 (patch)
tree7e761d38b442099464d8ea2c2b82d7e25274db2e /qemu-config.c
parentc5ceb523fa6fc168d3f51e306fee3def458e047e (diff)
trace: Add trace file name command-line option
This patch adds an optional command line switch '-trace' to specify the filename to write traces to, when qemu starts. Eg, If compiled with the 'simple' trace backend, [temp@system]$ qemu -trace FILENAME IMAGE Allows the binary traces to be written to FILENAME instead of the option set at config-time. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c
index 1efdbecdad..e3b746cc2b 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -288,6 +288,21 @@ static QemuOptsList qemu_mon_opts = {
},
};
+#ifdef CONFIG_SIMPLE_TRACE
+static QemuOptsList qemu_trace_opts = {
+ .name = "trace",
+ .implied_opt_name = "trace",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_trace_opts.head),
+ .desc = {
+ {
+ .name = "file",
+ .type = QEMU_OPT_STRING,
+ },
+ { /* end if list */ }
+ },
+};
+#endif
+
static QemuOptsList qemu_cpudef_opts = {
.name = "cpudef",
.head = QTAILQ_HEAD_INITIALIZER(qemu_cpudef_opts.head),
@@ -346,6 +361,9 @@ static QemuOptsList *vm_config_groups[32] = {
&qemu_global_opts,
&qemu_mon_opts,
&qemu_cpudef_opts,
+#ifdef CONFIG_SIMPLE_TRACE
+ &qemu_trace_opts,
+#endif
NULL,
};