From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhC2f-0002TD-AE for qemu-devel@nongnu.org; Tue, 06 Sep 2016 04:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhC2a-00058z-AS for qemu-devel@nongnu.org; Tue, 06 Sep 2016 04:47:40 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:40797 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhC2Z-00057v-UP for qemu-devel@nongnu.org; Tue, 06 Sep 2016 04:47:36 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <147220276782.31645.5491006457066656304.stgit@fimbulvetr.bsc.es> <20160905174943.GE24387@stefanha-x1.localdomain> Date: Tue, 06 Sep 2016 10:47:33 +0200 In-Reply-To: <20160905174943.GE24387@stefanha-x1.localdomain> (Stefan Hajnoczi's message of "Mon, 5 Sep 2016 13:49:43 -0400") Message-ID: <87k2eppg7u.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] trace: Allow events without arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org Stefan Hajnoczi writes: > On Fri, Aug 26, 2016 at 11:12:47AM +0200, Llu=C3=ADs Vilanova wrote: >> Signed-off-by: Llu=C3=ADs Vilanova >> --- >> scripts/tracetool/__init__.py | 5 +++++ >> 1 file changed, 5 insertions(+) >>=20 >> diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.= py >> index be24039..96657e6 100644 >> --- a/scripts/tracetool/__init__.py >> +++ b/scripts/tracetool/__init__.py >> @@ -72,6 +72,11 @@ class Arguments: >> arg_str : str >> String describing the event arguments. >> """ >> + # check for empty argument list >> + arg_str =3D arg_str.strip() >> + if arg_str =3D=3D "": >> + return Arguments([]) >> + > Why is this necessary? C syntax uses f(void) and not f(). > We already have trace events with no argument. They use the correct C > syntax. Sorry, I wasn't aware of that. My bad. Thanks, Lluis