summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2014-01-30 10:20:31 +0000
committerMichael S. Tsirkin <mst@redhat.com>2014-03-09 21:09:37 +0200
commit8f480de0c91a18d550721f8d9af969ebfbda0793 (patch)
tree5d1f4a76fb2cac801447291d3a723e9aa56b31c4 /vl.c
parent5d12f961c6f10cba15b0aa43a877c1fffca463d1 (diff)
downloadqemu-8f480de0c91a18d550721f8d9af969ebfbda0793.tar.gz
Add 'debug-threads' suboption to --name
Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 44b5ad3b39..c8a5bfa959 100644
--- a/vl.c
+++ b/vl.c
@@ -495,6 +495,12 @@ static QemuOptsList qemu_name_opts = {
.name = "process",
.type = QEMU_OPT_STRING,
.help = "Sets the name of the QEMU process, as shown in top etc",
+ }, {
+ .name = "debug-threads",
+ .type = QEMU_OPT_BOOL,
+ .help = "When enabled, name the individual threads; defaults off.\n"
+ "NOTE: The thread names are for debugging and not a\n"
+ "stable API.",
},
{ /* End of list */ }
},
@@ -954,6 +960,9 @@ static void parse_name(QemuOpts *opts)
{
const char *proc_name;
+ if (qemu_opt_get(opts, "debug-threads")) {
+ qemu_thread_naming(qemu_opt_get_bool(opts, "debug-threads", false));
+ }
qemu_name = qemu_opt_get(opts, "guest");
proc_name = qemu_opt_get(opts, "process");