From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baK76-00081I-9C for qemu-devel@nongnu.org; Thu, 18 Aug 2016 05:59:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baK72-0008Co-60 for qemu-devel@nongnu.org; Thu, 18 Aug 2016 05:59:52 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baK71-0008Ch-VH for qemu-devel@nongnu.org; Thu, 18 Aug 2016 05:59:48 -0400 Received: by mail-wm0-x243.google.com with SMTP id o80so4618403wme.0 for ; Thu, 18 Aug 2016 02:59:47 -0700 (PDT) Date: Thu, 18 Aug 2016 10:59:45 +0100 From: Stefan Hajnoczi Message-ID: <20160818095945.GB4850@stefanha-x1.localdomain> References: <147041636348.2523.2954972609232949598.stgit@fimbulvetr.bsc.es> <147041637432.2523.7105228834091669652.stgit@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm" Content-Disposition: inline In-Reply-To: <147041637432.2523.7105228834091669652.stgit@fimbulvetr.bsc.es> Subject: Re: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Llu=EDs?= Vilanova Cc: qemu-devel@nongnu.org, Stefan Hajnoczi --V0207lvV8h4k8FAm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 05, 2016 at 06:59:34PM +0200, Llu=EDs Vilanova wrote: > +# hypertrace > +hyperargs=3D$hypertrace > +if test $hypertrace =3D "disabled"; then > + hyperargs=3D0 > +fi > +echo "CONFIG_HYPERTRACE_ARGS=3D$hyperargs" >> $config_host_mak > +hypertrace_events=3Dhypertrace/trace-events > +mkdir -p $(dirname $hypertrace_events) > +echo "# See docs/trace-events.txt for syntax documentation." >$hypertrac= e_events > +echo -n 'vcpu guest_hypertrace(' >>$hypertrace_events > +for i in `seq $hypertrace`; do > + if test $i !=3D 1; then > + echo -n ", " >>$hypertrace_events > + fi > + echo -n "uint64_t arg$i" >>$hypertrace_events > +done > +echo -n ') ' >>$hypertrace_events > +for i in `seq $hypertrace`; do > + echo -n "\" arg$i=3D0x%016\"PRIx64" >>$hypertrace_events > +done > +echo >>$hypertrace_events This reminds me of the first versions of "simpletrace" where the number of arguments was fixed and argument size was fixed. This meant strings cannot be traced, number of arguments is limited, and you pay an space overhead for unused arguments. Later on the format was changed to header (including .length field) and binary data payload. This reduced the space overhead, elminated the argument count limit, and allowed strings to be traced. I think these are desirable qualities for any tracing mechanism and would reconsider a fixed number of uint64_t arguments. Stefan --V0207lvV8h4k8FAm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXtYcRAAoJEJykq7OBq3PI01UH/3+t7HQxqgdcJwV1CclJW3SR 8Onj+TsNbScyzyf9WKlkjb/VMoEk2LQKsI2jcQsAGGHF/YJ77c7X6dhQev/9iofM SwbTYwM2GYPWotqopucOlIIh3+mM63mxUA+pfK2TkbpJkzxp4cHzZ1ywgdp5d/4x OJJ93B5gVTLJzKbGJZSPxN3xdeFifCzVytdbCL0joAmZRGFNthvO7wnbEcKT+sZ7 M+ntjeAoBwQB3qXEVk4Pv6AgkYXJ+0bo1+V/jjsUJT47T2hw7b0GinZEPmt8GASo S5zm/krfjXcZrS8DZ+E4D+YU9wcc2srwEsnoXM8LCPMdnbFecVy91MxW6P5xHuQ= =dsEC -----END PGP SIGNATURE----- --V0207lvV8h4k8FAm--