From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKVFI-0007Le-QF for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:53:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKVFD-0001kE-Sq for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:53:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKVFC-0001jz-CZ for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:52:59 -0400 Message-ID: <5151B647.6070900@redhat.com> Date: Tue, 26 Mar 2013 08:52:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <20130326140021.4471.99597.stgit@fimbulvetr.bsc.es> <20130326140139.4471.51043.stgit@fimbulvetr.bsc.es> In-Reply-To: <20130326140139.4471.51043.stgit@fimbulvetr.bsc.es> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2ECJNIGKSNKWJRSWUTQFA" Subject: Re: [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ECJNIGKSNKWJRSWUTQFA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/26/2013 08:01 AM, Llu=C3=ADs Vilanova wrote: > Add QMP commands to control (un)loading of dynamic instrumentation libr= ary. >=20 > Signed-off-by: Llu=C3=ADs Vilanova > --- > include/qapi/qmp/qerror.h | 9 +++++ > instrument/Makefile.objs | 1 + > instrument/qapi-schema.json | 33 ++++++++++++++++++++ > instrument/qmp.c | 59 +++++++++++++++++++++++++++++++++++= + > qapi-schema.json | 2 + > qmp-commands.hx | 71 +++++++++++++++++++++++++++++++++++= ++++++++ > qmp.c | 4 ++ > 7 files changed, 179 insertions(+) > create mode 100644 instrument/qapi-schema.json > create mode 100644 instrument/qmp.c >=20 > +++ b/instrument/qapi-schema.json > @@ -0,0 +1,33 @@ > +# *-*- Mode: Python -*-* > + > +## > +# @instr-dynamic: > +# > +# Whether dynamic trace instrumentation is available. > +# > +# Since: 1.4 1.5 > +## > +{ 'command': 'instr-dynamic', > + 'returns': 'bool' } > + > +## > +# @instr-load: > +# > +# Load a dynamic instrumentation library. > +# > +# @path: path to the dynamic instrumentation library > +# @args: arguments to the dynamic instrumentation library No trailing underscore here... > +# > +# Since: 1.4 1.5 > +## > +{ 'command': 'instr-load', > + 'data': { 'path': 'str', 'args_': 'str' } } =2E..but there is one here. Something is wrong. Furthermore, this is gross - how does the receiver know how to break args into chunks? This should be '*args':['str'], taking an optional array of args (omitting is the same as a 0-length array). > +## > +# @instr-unload: > +# > +# Unload the current dynamic instrumentation library. > +# > +# Since: 1.4 1.5 > +## > +{ 'command': 'instr-unload' } Is it possible to load more than one library at a time? If so, then instr-load needs to return a handle, and instr-unload needs to take a handle as an argument. Also, a query-instr command might be useful for showing which library (or libraries) are loaded. > +++ b/instrument/qmp.c > @@ -0,0 +1,59 @@ > +/* > + * QMP interface for dynamic trace instrumentation control commands. > + * > + * Copyright (C) 2012 Llu=C3=ADs Vilanova It's 2013, now. > +++ b/qapi-schema.json > @@ -2360,6 +2360,8 @@ > ## > { 'command': 'device_del', 'data': {'id': 'str'} } > =20 > +input("instrument/qapi-schema.json") > + > ## > # @dump-guest-memory Unusual placement, having it in the middle of the file in no particular alphabetic ordering. I would typically expect to see includes done at the beginning, or maybe at the end, or at least in alphabetical order where the 'instr-*' commands would fall (but the file is already messy, so not entirely your fault). > +instr-load > +---------- > + > +Load a dynamic instrumentation library. > + > +Arguments: > + > +- path: path to the dynamic instrumentation library Missing out on args documentation. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2ECJNIGKSNKWJRSWUTQFA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRUbZHAAoJEKeha0olJ0Nq5hsIAJSEkufPFd2pBx8vOTSC+cfU yqIQ1ZxnDkUJ1FhtZAplTOXKm1vQXQ4Snz5KK4bzCIad4t8A/J5QghNff7Qydske tDgAonbFuT4+7WyQLM6AwpxWnnat5fHe8zGpVl855Q3FerR/6QaOSSwEoLjHkz4d yO90Wd3/9fdnxf3fjeyl8YNoVRC1Yjv8ozLoIN25EhBtpQGr1ovyrkycqniTewcm B7cR0OnkdnCAABar67pZ/Flz3hrSgsFDcGw0CFa5m46Rv9rFxyJBeSzZCbRZWWnm hg/X6HmVg9jmHCwYu88XQSSqxNHDgDo9C2DR+kgwTIVoFbGXKlbGDhVzHiGJZWQ= =G8nk -----END PGP SIGNATURE----- ------enig2ECJNIGKSNKWJRSWUTQFA--