From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjSg1-0004OW-Dd for qemu-devel@nongnu.org; Sun, 11 May 2014 08:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjSfw-0006oh-GZ for qemu-devel@nongnu.org; Sun, 11 May 2014 08:16:21 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:33890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjSfw-0006nw-9Z for qemu-devel@nongnu.org; Sun, 11 May 2014 08:16:16 -0400 Received: by mail-wi0-f171.google.com with SMTP id hm4so3232553wib.10 for ; Sun, 11 May 2014 05:16:15 -0700 (PDT) Date: Sun, 11 May 2014 13:16:11 +0100 From: Hani Benhabiles Message-ID: <20140511121611.GC4487@Inspiron-3521> References: <1398594570-14015-1-git-send-email-kroosec@gmail.com> <536A53B8.1080101@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <536A53B8.1080101@suse.de> Subject: Re: [Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: pbonzini@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com On Wed, May 07, 2014 at 05:39:36PM +0200, Andreas Färber wrote: > Hi Hani, > > Am 27.04.2014 12:29, schrieb Hani Benhabiles: > > Signed-off-by: Hani Benhabiles > > --- > > > > Not sure whether the qobject stringifying functions could fit or be of some use > > elsewhere. Thus, I kept them as static near the only place where they are used > > at the moment. > > Your "info qom-tree" reads quite similar to my proposed qom-tree script: > http://patchwork.ozlabs.org/patch/317224/ > > For HMP I had been working on a command "info qom-composition" that > emits a trimmed-down overview-style output, such as for x86_64: > > (qemu) info qom-composition > /machine (pc-i440fx-2.1-machine) > /peripheral-anon (container) > /peripheral (container) > /unattached (container) > /sysbus (System) > /device[0] (qemu64-x86_64-cpu) > /apic (apic) > /device[1] (kvmvapic) > /device[2] (i440FX) > /device[3] (PIIX3) > /isa.0 (ISA) > /device[4] (isa-i8259) > /device[5] (isa-i8259) > /device[6] (cirrus-vga) > /device[7] (hpet) > /device[8] (mc146818rtc) > /device[9] (isa-pit) > /device[10] (isa-pcspk) > /device[11] (isa-serial) > /device[12] (isa-parallel) > /device[13] (i8042) > /device[14] (vmport) > /device[15] (vmmouse) > /device[16] (port92) > /device[17] (isa-fdc) > /device[18] (e1000) > /device[19] (piix3-ide) > /ide.0 (IDE) > /ide.1 (IDE) > /device[20] (ide-cd) > /device[21] (PIIX4_PM) > /i2c (i2c-bus) > /device[22] (smbus-eeprom) > /device[23] (smbus-eeprom) > /device[24] (smbus-eeprom) > /device[25] (smbus-eeprom) > /device[26] (smbus-eeprom) > /device[27] (smbus-eeprom) > /device[28] (smbus-eeprom) > /device[29] (smbus-eeprom) > /icc-bridge (icc-bridge) > /icc (icc-bus) > /fw_cfg (fw_cfg) > /i440fx (i440FX-pcihost) > /pci.0 (PCI) > /ioapic (ioapic) > > I believe both commands can coexist. Question is how. > > My tree-walking implementation is not based on QMP and thus much > slimmer. I didn't have to care about printing properties yet - that I > deferred to a qom-get HMP command (which based on previous feedback we > should implement either way). Possibly we could rebase your patch onto > mine, adding an argument for whether or not to print the properties? > Sure, I am fine with rebasing the patch on top of yours if that ends up with less duplicated work. > Compared to my script, your "info qom-tree" does not allow to change the > root, so I believe we would need to print from "/" on (rather than > "/machine"), for dumping RNG backends etc. as well. The alternative > would be having arguments to the command, for specifying root and/or > output style. A path argument (defaulting to "/") seems like a good approach to me, but I have no strong preference on this.