From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm0uW-00074J-6g for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm0uR-0006FA-KZ for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:55:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm0uR-0006Cy-BT for qemu-devel@nongnu.org; Mon, 19 Sep 2016 11:55:07 -0400 References: <1474296549-29171-1-git-send-email-berrange@redhat.com> <1474296549-29171-5-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <18aa830c-dbac-bd98-1437-1b7ed9ef1f96@redhat.com> Date: Mon, 19 Sep 2016 10:55:04 -0500 MIME-Version: 1.0 In-Reply-To: <1474296549-29171-5-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pT5uwO9Gq72A2s5T041p056NCmEH6upSp" Subject: Re: [Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]' array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Llu=c3=ads_Vilanova?= , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pT5uwO9Gq72A2s5T041p056NCmEH6upSp From: Eric Blake To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Llu=c3=ads_Vilanova?= , Stefan Hajnoczi Message-ID: <18aa830c-dbac-bd98-1437-1b7ed9ef1f96@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]' array References: <1474296549-29171-1-git-send-email-berrange@redhat.com> <1474296549-29171-5-git-send-email-berrange@redhat.com> In-Reply-To: <1474296549-29171-5-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/19/2016 09:48 AM, Daniel P. Berrange wrote: > Instead of having a global dstate array, declare a single > 'uint16 TRACE_${EVENT_NAME}_DSTATE' variable for each > trace event. Record a pointer to this variable in the > TraceEvent struct too. >=20 > By turning trace_event_get_state_dynamic_by_id into a > macro, this still hits the fast path, and cache affinity > is ensured by declaring all the uint16 vars adjacent to > each other. >=20 > Signed-off-by: Daniel P. Berrange > --- > +++ b/scripts/tracetool/__init__.py > @@ -265,11 +265,12 @@ class Event(object): > =20 > QEMU_TRACE =3D "trace_%(name)s" > QEMU_TRACE_TCG =3D QEMU_TRACE + "_tcg" > + QEMU_DSTATE =3D "___TRACE_%(NAME)s_DSTATE" Inconsistent indentation. > +++ b/trace/control.c > @@ -28,12 +28,6 @@ > #include "monitor/monitor.h" > =20 > int trace_events_enabled_count; > -/* > - * Interpretation depends on wether the event has the 'vcpu' property:= Nice - we're nuking a typo while at it... > +++ b/trace/event-internal.h > @@ -19,6 +19,11 @@ > * @vcpu_id: Unique per-vCPU event identifier. > * @name: Event name. > * @sstate: Static tracing state. > + * @dstate: Dynamic tracing state > + * > + * Interpretation of @dstate depends on wether the event has the 'vcpu= ' property: =2E..oh, we just moved it. s/wether/whether/ while touching this. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pT5uwO9Gq72A2s5T041p056NCmEH6upSp 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX4ApYAAoJEKeha0olJ0NqfvQH/jce5FaEK09crhZ8i2znyAH2 XpXNT/LKcCpShRwxg417z/ISNxO2jmFGm3LGvSuYgYjlUDJOIYWs1ChjV5ULMCeb UD1teldN+iiKybRRv5H8w5D3Q+u5yWsB1s1UlreZbafHmkBQRkP81loBN2Tt9wAU IPsdyUXKYkO/67jolhETmWk+WpEhO6x5z3ODTNi3wvx/IEBzZKZsh0/dFLb+7Wlx 98AxNCMOKmY1i3RC/n9K+l7cRyx/+BUfXKFeBgBRsSDGLo56LPK15MO3k7pLgAo7 nPd3tn8ScNsFtAAM6uftPg9DIfxxEdtNUvM3bZhUjltOKjwH54FBdghiyHVNTbA= =m2cO -----END PGP SIGNATURE----- --pT5uwO9Gq72A2s5T041p056NCmEH6upSp--