From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnROJ-0004ft-B9 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:23:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnROE-00041B-Kg for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:23:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnROE-00040j-E5 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:23:46 -0400 Date: Fri, 23 Sep 2016 15:23:44 +0100 From: Stefan Hajnoczi Message-ID: <20160923142344.GW8221@stefanha-x1.localdomain> References: <1474533652-31170-1-git-send-email-berrange@redhat.com> <1474533652-31170-9-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8bLSEqNM5P+Jqlqx" Content-Disposition: inline In-Reply-To: <1474533652-31170-9-git-send-email-berrange@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums 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 , Eric Blake --8bLSEqNM5P+Jqlqx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2016 at 09:40:43AM +0100, Daniel P. Berrange wrote: > The TraceEventID and TraceEventVCPUID enums constants are > no longer actually used for anything critical. >=20 > The TRACE_EVENT_COUNT limit is used to determine the size > of the TraceEvents array, and can be removed if we just > NULL terminate the array instead. >=20 > The TRACE_VCPU_EVENT_COUNT limit is used as a magic value > for marking non-vCPU events, and also for declaring the > size of the trace dstate mask in the CPUState struct. > The former usage can be replaced by a dedicated constant > TRACE_EVENT_VCPU_NONE, defined as (uint32_t)-1. For the > latter usage, we can simply define a constant for the > number of VCPUs, avoiding the need for the full enum. >=20 > The only other usages of the enum values can be replaced > by accesing the id/vcpu_id fields via the named TraceEvent > structs. >=20 > Signed-off-by: Daniel P. Berrange > --- > scripts/tracetool/backend/simple.py | 4 ++-- > scripts/tracetool/format/events_c.py | 16 +++++++++++----- > scripts/tracetool/format/events_h.py | 18 +++--------------- > scripts/tracetool/format/h.py | 3 +-- > trace/control-internal.h | 19 ++++++++++--------- > trace/control-target.c | 2 +- > trace/control.c | 2 +- > trace/control.h | 31 ++++++++----------------------- > trace/event-internal.h | 6 ++++++ > trace/simple.c | 8 ++++---- > trace/simple.h | 2 +- > 11 files changed, 48 insertions(+), 63 deletions(-) Reviewed-by: Stefan Hajnoczi --8bLSEqNM5P+Jqlqx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJX5TrwAAoJEJykq7OBq3PI6pgH/RugRlwvvyE5zWEF4gKus/9h yKyTpHlvzQ7DQD456ckSgETUlsJSCqGhxOqYboUjTc29RK9xyqd6HLawrfbX3Dit OLWPpUBG+Sg3XLPV/+3w6W1bjwGvoHmrIaUwmYRS+FmYlCZ9zk3HzOjlsH1OwZXV eDw2enW9/HEyVgcpOHiXumBsvq/RiU++MZRVRiT79Q0p1zaSqDCJVHgzCM0jaxfg 6PawPnbZUWqGoBaUBhkJED7DqNW5eZfU4qhtFsyXvfxX44zaBLHjxAi8vFq7p+XF uKUv5pYyXs1QwKPfpRpwI8HUyCfOHh4LvhDEOD8AT8RT72xEV0NiXLiPP1MS6YU= =xTAx -----END PGP SIGNATURE----- --8bLSEqNM5P+Jqlqx--