Received: from eggs.gnu.org ([2001:4830:134:3::10]:41420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Geg-0007pv-9n for qemu-devel@nongnu.org; Fri, 31 Jan 2014 11:09:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9GeZ-0000nO-Jz for qemu-devel@nongnu.org; Fri, 31 Jan 2014 11:09:22 -0500 Received: from roura.ac.upc.edu ([147.83.33.10]:58449 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9GeZ-0000nI-6O for qemu-devel@nongnu.org; Fri, 31 Jan 2014 11:09:15 -0500 From: =?utf-8?b?TGx1w61z?= Vilanova Date: Fri, 31 Jan 2014 17:09:14 +0100 Message-Id: <20140131160914.32741.10373.stgit@fimbulvetr.bsc.es> In-Reply-To: <20140131160902.32741.2680.stgit@fimbulvetr.bsc.es> References: <20140131160902.32741.2680.stgit@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 02/12] trace: [tracetool, tcg] Allow TCG types in trace event declarations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi When found, TCG types are translated into the host native types when decl= aring and defining the tracing routines not used during TCG code translation (e= .g., "trace.h"). Signed-off-by: Llu=C3=ADs Vilanova --- scripts/tracetool/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.p= y index 175df08..c76f648 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -18,6 +18,7 @@ import sys =20 import tracetool.format import tracetool.backend +import tracetool.transform =20 =20 def error_write(*lines): @@ -122,7 +123,7 @@ class Event(object): =20 _CRE =3D re.compile("((?P.*)\s+)?(?P[^(\s]+)\((?P= [^)]*)\)\s*(?P\".*)?") =20 - _VALID_PROPS =3D set(["disable"]) + _VALID_PROPS =3D set(["disable", "tcg"]) =20 def __init__(self, name, props, fmt, args): """ @@ -259,6 +260,11 @@ def generate(fevents, format, backend, =20 events =3D _read_events(fevents) =20 + # transform arguments to host type by default + # (otherwise use event.original) + events =3D [e.transform(tracetool.transform.TCG_2_HOST(backend)) + for e in events] + if backend =3D=3D "nop": ( e.properies.add("disable") for e in events ) =20