From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1br4Ti-0004sS-0q for qemu-devel@nongnu.org; Mon, 03 Oct 2016 10:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1br4Te-0002K4-Ow for qemu-devel@nongnu.org; Mon, 03 Oct 2016 10:44:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1br4Te-0002Jm-Eo for qemu-devel@nongnu.org; Mon, 03 Oct 2016 10:44:22 -0400 Date: Mon, 3 Oct 2016 15:44:19 +0100 From: Stefan Hajnoczi Message-ID: <20161003144419.GN10245@stefanha-x1.localdomain> References: <1475068103-356-1-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lBqJz4CGKwlWe7/k" Content-Disposition: inline In-Reply-To: <1475068103-356-1-git-send-email-berrange@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 00/20] Refactor trace to allow modular build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, =?iso-8859-1?Q?Llu=EDs?= Vilanova --lBqJz4CGKwlWe7/k Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2016 at 02:08:03PM +0100, Daniel P. Berrange wrote: > These patches were previously posted as part of my giant > trace events modular build series >=20 > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg01714.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03335.html > v3: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg04282.html > v4: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg05467.html >=20 > This series does all the refactoring required to support a fully > modular build of the trace probe points, but does not actually > convert anything to use it. The 40+ patches to convert each subdir > to use modular build will only be posted again, once the refactoring > is reviewed & queued, in order to avoid patch-bombing the list > more than is needed. The full series is visible at >=20 > https://github.com/berrange/qemu/tree/trace-events-3 >=20 > The key problem being tackled by this series is the assumption > that there is a single statically declared enum which provides > globally unique event IDs. Inside QEMU the event IDs were used > as list indexes into the 'trace_events' array, while the event > VCPU IDs were used as bitmap indexes in trace_dstate against > the CPUState struct. Externally to QEMU, the event IDs were > also written in the simpletrace binary data format and used > to lookup the entry in the trace-events file afterwards. >=20 > Inside QEMU the refactoring work managed to remove all need > for event IDs for purposes of 'trace_events' array lookups. > Instead we now have global variables per-event which can be > referenced directly. >=20 > When QEMU starts up and the various event groups are registered, > we now dynamically assign event IDs and VCPU IDs to each event. > This removes the limitation in the v1 posting that all vCPU > events had to be in one file. We also removed the limitation > on the total number of vCPU events. So there is no regression > in functionality of VCPU event support compared to current > GIT master. > Since the event IDs are allocated dynamically at runtime, > the simpletrace.py script cannot assume they map directly > to the 'trace-events' file entries. Thus, the simpletrace > binary format is extended to include a record type that > maps trace event IDs to trace event names. While it would > be possible to take this even further and make the > simpletrace binary format 100% self-describing this is left > as an exercise for future developers, as it is not a > pre-requisite for this modular build. >=20 > While some of the intermediate patches may seem pointless > on their own, they exist in order to facilitate the review > of later patches by ensuring each patch does the minimum > possible refactoring work. >=20 > Changed in v5: >=20 > - Use single '_' instead of double/triple '_' in > constants (Llu=EDs) > - Use more pythonic loop iterator (Llu=EDs) > - Misc typos (Llu=EDs/Stefan) > - Fix filtering of QMP trace events (Llu=EDs) > - Fix some new mistakes in trace-events in master Great, this looks very close. There are only a few comments from Llu=EDs and me. Stefan --lBqJz4CGKwlWe7/k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJX8m7DAAoJEJykq7OBq3PI848H/3Gttq23Z7ZHPIhw53BERiqW hgw15Y7tGWp89qY7fCxi/sXZv/WrM+7igU4h2B9JMBqbX9a5THERAtKgBLMlip9Q fHukcD4F6Qb8NmaVBLZb/B1/WRc3wxPUrReE0U6uyQjElEHScGdLGKybq46iHOUi AfFVCSdesg1QD+fwcdKHAxD5cD8MQmHhX52uJ4De1ilnUMFYX3lSjnSeF32ySCY+ yqbg80s/7UHnu9OrHeOayhoNy8BXCeuRyAW73vwrjGzuEEP4hR0MRXif6Fz9yRdD PsfYG18gS+rYUAyZ0JzKtKQ0V8JhGq1CNEjgfLHztOXu8lcnT5LvrMrY0j1TXws= =LWR4 -----END PGP SIGNATURE----- --lBqJz4CGKwlWe7/k--