From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHYm-0004au-An for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:19:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYHYj-0005ko-4W for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:19:44 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:36282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHYi-0005kf-N2 for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:19:41 -0500 From: =?utf-8?b?TGx1w61z?= Vilanova Date: Tue, 23 Feb 2016 19:19:39 +0100 Message-Id: <145625157879.9577.1624226698382315239.stgit@localhost> In-Reply-To: <145625154789.9577.15659725961737992178.stgit@localhost> References: <145625154789.9577.15659725961737992178.stgit@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v8 5/6] [trivial] trace: Add helper function to cast event arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Eduardo Habkost , Stefan Hajnoczi Signed-off-by: Llu=C3=ADs Vilanova --- scripts/tracetool/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.p= y index 26878f4..9e02f73 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -121,6 +121,10 @@ class Arguments: """List of argument types.""" return [ type_ for type_, _ in self._args ] =20 + def casted(self): + """List of argument names casted to their type.""" + return ["(%s)%s" % (type_, name) for type_, name in self._args] + def transform(self, *trans): """Return a new Arguments instance with transformed types. =20