mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
c5ceb523fa
commit
ab6540d55e
3 changed files with 50 additions and 0 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue