From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5sZD-0001lO-09 for qemu-devel@nongnu.org; Mon, 07 Dec 2015 04:58:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5sZ9-000332-Q2 for qemu-devel@nongnu.org; Mon, 07 Dec 2015 04:58:46 -0500 Received: from e06smtp05.uk.ibm.com ([195.75.94.101]:43693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5sZ9-00032r-GU for qemu-devel@nongnu.org; Mon, 07 Dec 2015 04:58:43 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 Dec 2015 09:58:40 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8A125219006A for ; Mon, 7 Dec 2015 09:58:30 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB79wbWJ655758 for ; Mon, 7 Dec 2015 09:58:37 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tB79wbOV028646 for ; Mon, 7 Dec 2015 02:58:37 -0700 Date: Mon, 7 Dec 2015 10:58:35 +0100 From: Cornelia Huck Message-ID: <20151207105835.1c200696.cornelia.huck@de.ibm.com> In-Reply-To: <1449118802-12047-2-git-send-email-stefanha@redhat.com> References: <1449118802-12047-1-git-send-email-stefanha@redhat.com> <1449118802-12047-2-git-send-email-stefanha@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL for-2.5 1/4] iothread: include id in thread name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Peter Maydell , qemu-devel@nongnu.org, Paolo Bonzini On Thu, 3 Dec 2015 12:59:59 +0800 Stefan Hajnoczi wrote: > From: Paolo Bonzini > > This makes it easier to find the desired thread. Use "IO" plus the id; > even with the 14 character limit on the thread name, enough of the id should > be readable (e.g. "IO iothreadNNN" with three characters for the number). > > Signed-off-by: Paolo Bonzini > Reviewed-by: Dr. David Alan Gilbert > Message-id: 1448372804-5034-1-git-send-email-pbonzini@redhat.com > Signed-off-by: Stefan Hajnoczi > --- > iothread.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/iothread.c b/iothread.c > index da6ce7b..1b8c2bb 100644 > --- a/iothread.c > +++ b/iothread.c > @@ -72,6 +72,7 @@ static void iothread_complete(UserCreatable *obj, Error **errp) > { > Error *local_error = NULL; > IOThread *iothread = IOTHREAD(obj); > + char *name, *thread_name; > > iothread->stopping = false; > iothread->thread_id = -1; > @@ -87,8 +88,12 @@ static void iothread_complete(UserCreatable *obj, Error **errp) > /* This assumes we are called from a thread with useful CPU affinity for us > * to inherit. > */ > - qemu_thread_create(&iothread->thread, "iothread", iothread_run, > + name = object_get_canonical_path_component(OBJECT(obj)); This one breaks x-data-plane: ... -device virtio-blk-ccw,x-data-plane=true ... ERROR:/data/git/yyy/qemu/qom/object.c:1515:object_get_canonical_path_component: assertion failed: (obj->parent != NULL) > + thread_name = g_strdup_printf("IO %s", name); > + qemu_thread_create(&iothread->thread, thread_name, iothread_run, > iothread, QEMU_THREAD_JOINABLE); > + g_free(thread_name); > + g_free(name); > > /* Wait for initialization to complete */ > qemu_mutex_lock(&iothread->init_done_lock);