From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEcc9-0003ut-39 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 04:27:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEcc4-0002iz-9j for qemu-devel@nongnu.org; Mon, 02 Apr 2012 04:27:48 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:53967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEcc3-0002iD-W9 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 04:27:44 -0400 Received: by wibhm17 with SMTP id hm17so2233673wib.4 for ; Mon, 02 Apr 2012 01:27:40 -0700 (PDT) Date: Mon, 2 Apr 2012 08:36:58 +0100 From: Stefan Hajnoczi Message-ID: <20120402073658.GA19273@stefanha-thinkpad.localdomain> References: <20120327194910.7241.47693.stgit@ginnungagap.bsc.es> <20120327194918.7241.10931.stgit@ginnungagap.bsc.es> <20120330072716.GA16437@stefanha-thinkpad.localdomain> <8762dmt4ej.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8762dmt4ej.fsf@ginnungagap.bsc.es> Subject: Re: [Qemu-devel] [RFC PATCH v3 1/8] tracetool: Rewrite infrastructure as python modules List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Llu=EDs?= Vilanova Cc: qemu-devel@nongnu.org On Fri, Mar 30, 2012 at 06:55:16PM +0200, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > >> + kwargs = {} > >> + > >> + try: > >> + tracetool.generate(sys.stdin, arg_format, arg_backend, **kwargs) > > > If forgot to ask what kwargs is doing here? Can we default to {}? > > Otherwise let's drop it for now since there are no options defined yet. > > It's used later in the patch adding dtrace support. I just thought it would be > better to maintain the interface of 'tracetool.generate' instead of adding new > parameters later when necessary. Thanks for pointing that out. I went back to look at how the dtrace-specific options get passed in. I noticed you assigned them directly to dtrace.py module variables - probably because you didn't want to add the (mostly unused) kwargs argument to all code generation functions? For now I think this is okay since most backends don't care about kwargs. If we need it more maybe we should think of a cleaner solution. Stefan