Received: from eggs.gnu.org ([2001:4830:134:3::10]:59156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz2sH-0002sS-TI for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:52:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz2sG-00048Q-6R for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:52:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz2sF-00048F-TI for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:52:52 -0400 Date: Tue, 16 Jul 2013 18:52:43 +0800 From: Amos Kong Message-ID: <20130716105243.GB743@amosk.info> References: <1371644677-11041-1-git-send-email-akong@redhat.com> <20130620232021.27a96a20@redhat.com> <20130702083729.GA12400@amosk.info> <20130702102039.56aa458a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130702102039.56aa458a@redhat.com> Subject: Re: [Qemu-devel] [PATCH] full introspection support for QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: pbonzini@redhat.com, qiaonuohan@cn.fujitsu.com, aliguori@us.ibm.com, armbru@redhat.com, qemu-devel@nongnu.org On Tue, Jul 02, 2013 at 10:20:39AM -0400, Luiz Capitulino wrote: > On Tue, 2 Jul 2013 16:37:29 +0800 > Amos Kong wrote: > > > > Btw, I find your approach interesting but I'm wondering if it's going to > > > be a good thing to keep all the schema in memory. Do you have an idea > > > on its size? > > > > The size of qmp_schema_table[] is 1528 bytes. > > > > method 2rd: > > save the raw json strings to qmp-schema.txt, allocate dynamical > > qmp_schema_table[] in qmp_query_qmp_schema(), and restore the > > file content to the table, free it at the end of qmp_query_qmp_schema() > > Well, keeping a file around like that doesn't look like a good solution. If we keep it in a file, we need to install the file to system. If the file is changed after installing, it's risk. > Let's do your approach for now. If having this in memory turns out to > be a problem, we could try compacting it. Ok, I will still define a big table in head file. Current 1528 bytes is not very big. -- Amos.