* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 28/01/2014 16:20, Dr. David Alan Gilbert (git) ha scritto: > >From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > > >This series uses pthread_setname_np (when available) to set the names on > >threads that QEMU creates to make life easier when debugging. > > > >It's turned off by default (because there were worries that it might break > >tools that relied on process names) but is enabled by adding > > > > namethreads=on > > > >to the --name option. > > > >Note that the initial thread still has the default name (or the value passed > >as the process= parameter to --name). > > I plead guilty to bikeshedding and propose s/namethreads/threads/.
If I need to reroll anyway I'll change that; although I just suggested making it debug-thread in my reply to Michael to make it clear it wasn't an API. > Also, how did you test the merging of options? Perhaps parse_name > could itself call qemu_find_opts("name"), and could be called just > once at the end of option parsing. But that's just how *I* would > have written the code, and what you have is fine if it works with > multiple occurrences of -name. I was trying to follow the closest example I could find; but the multiple --name seems to woke out ok; with a bit of debug if I do: ./bin/qemu-system-x86_64 --name foo,namethreads=off --name process=bar --name namethreads=on parse_name: setting namethreads=0 parse_name: qemu_name=foo proc_name=(null) parse_name: setting namethreads=0 parse_name: qemu_name=foo proc_name=bar parse_name: setting namethreads=1 parse_name: qemu_name=foo proc_name=bar So I think that ends up with the right result; it doesn't stop you from repeating options, but I think takes the last one. Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK