From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1y7e-0001OM-9A for qemu-devel@nongnu.org; Thu, 26 Nov 2015 10:06:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1y7Z-0006eo-5k for qemu-devel@nongnu.org; Thu, 26 Nov 2015 10:06:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1y7Z-0006ej-0i for qemu-devel@nongnu.org; Thu, 26 Nov 2015 10:06:05 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 7E5BDC04FF81 for ; Thu, 26 Nov 2015 15:06:04 +0000 (UTC) From: Markus Armbruster References: <1448040300-968-1-git-send-email-eblake@redhat.com> <1448040300-968-2-git-send-email-eblake@redhat.com> Date: Thu, 26 Nov 2015 16:06:02 +0100 In-Reply-To: <1448040300-968-2-git-send-email-eblake@redhat.com> (Eric Blake's message of "Fri, 20 Nov 2015 10:24:47 -0700") Message-ID: <87two8ssv9.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v13 01/14] qobject: Simplify QObject List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Luiz Capitulino Eric Blake writes: > The QObject hierarchy is small enough, and unlikely to grow further > (since we only use it to map to JSON and already cover all JSON > types), that we can simplify things by not tracking a separate > vtable, but just inline the refcnt element of the vtable QType > directly into QObject, and track a separate array of destroy > functions. We can drop qnull_destroy_obj() in the process. Make that something like "inline the code element of the vtable QType directly into QObject (renamed to type), and". > > The remaining QObject subclasses must export their destructor. > > This also has the nice benefit of moving the typename 'QType' > out of the way, so that the next patch can repurpose it for a > nicer name for 'qtype_code'. > > The various objects are still the same size (so no change in cache > line pressure), but now have less indirection (although I didn't > bother benchmarking to see if there is a noticeable speedup, as > we don't have hard evidence that this was in a performance hotspot > in the first place). > > Suggested-by: Markus Armbruster > Signed-off-by: Eric Blake