From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKVLp-0008Et-RA for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:59:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKVLm-0003oI-RD for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:59:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKVLm-0003jc-Fb for qemu-devel@nongnu.org; Tue, 26 Mar 2013 10:59:46 -0400 Message-ID: <5151B7DF.1020205@redhat.com> Date: Tue, 26 Mar 2013 08:59:43 -0600 From: Eric Blake MIME-Version: 1.0 References: <20130326140021.4471.99597.stgit@fimbulvetr.bsc.es> <20130326140150.4471.14513.stgit@fimbulvetr.bsc.es> In-Reply-To: <20130326140150.4471.14513.stgit@fimbulvetr.bsc.es> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2URVRQPSVWENPGHQXOPTB" Subject: Re: [Qemu-devel] [PATCH 16/22] instrument: Add commandline options to start with an instrumentation library 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) ------enig2URVRQPSVWENPGHQXOPTB 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 commandline options to control initial loading of dynamic instrumen= tation > library. >=20 > Signed-off-by: Llu=C3=ADs Vilanova > --- > +++ b/instrument/cmdline.c > @@ -0,0 +1,94 @@ > +/* > + * Control dynamic trace instrumentation during program (de)initializa= tion. > + * > + * Copyright (C) 2012 Llu=C3=ADs Vilanova It's 2013. > + > +static bool loaded =3D false; Static variables are already 0-initialized; not all compilers can optimize an explicit 0-initialization into bss, so it is better to omit '=3D false'. > + > + exit(-1); Exiting with status 255 is unusual (twice this patch). > +++ b/linux-user/main.c > @@ -34,6 +34,8 @@ > #include "qemu/timer.h" > #include "qemu/envlist.h" > #include "elf.h" > +#include "instrument/cmdline.h" > + > =20 > char *exec_path; > =20 > @@ -3242,6 +3244,22 @@ static void handle_arg_reserved_va(const char *a= rg) > } > #endif > =20 > +static const char *instrument_path =3D NULL; Another case of not needing explicit 0-initialization. > +++ b/qmp-commands.hx > @@ -1519,6 +1519,7 @@ Load a dynamic instrumentation library. > Arguments: > =20 > - path: path to the dynamic instrumentation library > +- args: arguments to the dynamic instrumentation library This should have been in an earlier patch. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2URVRQPSVWENPGHQXOPTB 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/ iQEcBAEBCAAGBQJRUbffAAoJEKeha0olJ0Nq4FEIAKLRydiXRWcg02qJ7hwpRTUh JGRpVyiS2CxZQriZnUdxC6OHJhwgZc80wFwG8teTRURxadUwcF+6Ez8HVAVzSftz qpembxVRJN0NmPYsZaE/QjC5M3Cmb7qBxlZBtNxgk5xmyZtRvkeh45JHiuIUkiX/ axfS4R+cCFvsgaIlc4d88RieVu+cOaE3a2eCI583NCU6qvsGDS7RHBSMDtlEKz6T O6XRGFompYLxF2rr6aDxOOcLwO+OjE0NRBW5e9YIDaV+0RLju2NK0Cx6BxyQT359 eot4Cxz+nqboLHUWUSBbFVytZSwWhmPJbUTWLcPsYYkyd49ZzqqBFo1eiCN6Fbo= =dglY -----END PGP SIGNATURE----- ------enig2URVRQPSVWENPGHQXOPTB--