From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46002 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIOIZ-0001sm-1z for qemu-devel@nongnu.org; Sat, 29 May 2010 11:50:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIHBO-0002kK-VE for qemu-devel@nongnu.org; Sat, 29 May 2010 04:14:16 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:48333) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIHBO-0002kE-JD for qemu-devel@nongnu.org; Sat, 29 May 2010 04:14:14 -0400 Message-ID: <4C00CCD4.7050904@web.de> Date: Sat, 29 May 2010 10:14:12 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization References: <1f557b9feb1965a61e64f7166bcf4918bed8d0ec.1274516288.git.jan.kiszka@web.de> <4BF82895.6000706@redhat.com> <4BF8DFF7.5070302@web.de> <4BF8EAFB.2080807@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEC17F24EE23C684BDD741837" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEC17F24EE23C684BDD741837 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Markus Armbruster wrote: > Avi Kivity writes: >=20 >> On 05/23/2010 10:57 AM, Jan Kiszka wrote: >>> Avi Kivity wrote: >>> =20 >>>> On 05/22/2010 11:18 AM, Jan Kiszka wrote: >>>> =20 >>>>> From: Jan Kiszka >>>>> >>>>> This introduces device_show, a monitor command that saves the vmsta= te of >>>>> a qdev device and visualizes it. QMP is also supported. Buffers are= cut >>>>> after 16 byte by default, but the full content can be requested via= >>>>> '-f'. To pretty-print sub-arrays, vmstate is extended to store the = start >>>>> index name. A new qerror is introduced to signal a missing vmstate.= And >>>>> it comes with documentation. >>>>> >>>>> + >>>>> +Dump a snapshot of the device state. Buffers are cut after 16 byte= s >>>>> unless >>>>> +a full dump is requested. >>>>> + >>>>> +Arguments: >>>>> + >>>>> +- "path": the device's qtree path or unique ID (json-string) >>>>> >>>>> =20 >>>> This may be ambiguous. >>>> =20 >>> Can your elaborate what precisely is ambiguous? >>> =20 >> Can't the user choose the unique ID so that it aliases an unrelated >> qtree path? >> >> I prefer having mutually exclusive 'path' and 'ref' arguments. >=20 > Don't think that's necessary. If the string starts with '/', it's an > absolute path. Else, it's a relative path rooted at the node with the > ID equal to the first component. 'pci.0' can be both a (badly chosen) ID as well as an abbreviated qtree path. >=20 > Currently breaks down when IDs contain '/', but permitting that is a > bug. There may be more problems; the path lookup code is way too > clever. Indeed. Less can sometimes be more. My impression is that some of the cleverness was motivated by lacking qtree completion for the HMP. Jan --------------enigEC17F24EE23C684BDD741837 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkwAzNQACgkQitSsb3rl5xTWOQCcCsqGsM3dOLfKEXVljDSiVjTA aMcAn3IOFTFlgy/M8Xwayo1gG2NntK3G =mjuA -----END PGP SIGNATURE----- --------------enigEC17F24EE23C684BDD741837--