From 8f480de0c91a18d550721f8d9af969ebfbda0793 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 30 Jan 2014 10:20:31 +0000 Subject: Add 'debug-threads' suboption to --name Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- vl.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vl.c') 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"); -- cgit v1.2.1