From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnRiv-0003DO-TF for qemu-devel@nongnu.org; Wed, 18 Jan 2012 04:22:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnRip-0006pw-T4 for qemu-devel@nongnu.org; Wed, 18 Jan 2012 04:22:29 -0500 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:56279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnRip-0006pG-7U for qemu-devel@nongnu.org; Wed, 18 Jan 2012 04:22:23 -0500 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Jan 2012 14:52:17 +0530 Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0I9MDQ24464784 for ; Wed, 18 Jan 2012 14:52:13 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0I9MCep025788 for ; Wed, 18 Jan 2012 20:22:13 +1100 Message-ID: <4F168F44.7090104@linux.vnet.ibm.com> Date: Wed, 18 Jan 2012 14:52:12 +0530 From: Harsh Bora MIME-Version: 1.0 References: <20120111180504.25198.76946.stgit@ginnungagap.bsc.es> In-Reply-To: <20120111180504.25198.76946.stgit@ginnungagap.bsc.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/6] trace: [tracetool] Do not rebuild event list in backend code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= Cc: aneesh.kumar@linux.vnet.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On 01/11/2012 11:35 PM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > scripts/tracetool.py | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/scripts/tracetool.py b/scripts/tracetool.py > index 6874f66..80e5684 100755 > --- a/scripts/tracetool.py > +++ b/scripts/tracetool.py [.. snip ..] > @@ -510,14 +508,16 @@ class Event(object): > > # Generator that yields Event objects given a trace-events file object > def read_events(fobj): > + res = [] > event_num = 0 > for line in fobj: > if not line.strip(): > continue > if line.lstrip().startswith('#'): > continue > - yield Event(event_num, line) > + res.append(Event(event_num, line)) > event_num += 1 > + return res > Hi Lluis, This looks really nice. I can include your fixes while addressing other review comments. Shall I fold your patches with mine or do you want to keep them separate? regards, Harsh > backend = "" > output = "" > >