From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi3we-0008OV-Fa for qemu-devel@nongnu.org; Wed, 07 May 2014 11:39:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wi3wY-0003KL-TA for qemu-devel@nongnu.org; Wed, 07 May 2014 11:39:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33677 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi3wY-0003Jz-NJ for qemu-devel@nongnu.org; Wed, 07 May 2014 11:39:38 -0400 Message-ID: <536A53B8.1080101@suse.de> Date: Wed, 07 May 2014 17:39:36 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1398594570-14015-1-git-send-email-kroosec@gmail.com> In-Reply-To: <1398594570-14015-1-git-send-email-kroosec@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hani Benhabiles , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com, stefanha@redhat.com, lcapitulino@redhat.com Hi Hani, Am 27.04.2014 12:29, schrieb Hani Benhabiles: > Signed-off-by: Hani Benhabiles > --- >=20 > 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 a= re 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? 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. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg