Received: from eggs.gnu.org ([140.186.70.92]:35954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnTxa-0004qv-GV for qemu-devel@nongnu.org; Wed, 18 Jan 2012 06:45:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnTxU-0007ML-OL for qemu-devel@nongnu.org; Wed, 18 Jan 2012 06:45:46 -0500 Received: from gw.ac.upc.edu ([147.83.30.3]:43648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnTxU-0007Lv-Da for qemu-devel@nongnu.org; Wed, 18 Jan 2012 06:45:40 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20120111180504.25198.76946.stgit@ginnungagap.bsc.es> <4F168F44.7090104@linux.vnet.ibm.com> Date: Wed, 18 Jan 2012 12:45:28 +0100 In-Reply-To: <4F168F44.7090104@linux.vnet.ibm.com> (Harsh Bora's message of "Wed, 18 Jan 2012 14:52:12 +0530") Message-ID: <8739bdcjzb.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Harsh Bora Cc: aneesh.kumar@linux.vnet.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Harsh Bora writes: > On 01/11/2012 11:35 PM, Llu=C3=ADs Vilanova wrote: >> Signed-off-by: Llu=C3=ADs Vilanova >> --- >> scripts/tracetool.py | 14 +++++++------- >> 1 files changed, 7 insertions(+), 7 deletions(-) >>=20 >> 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): >>=20 >> # Generator that yields Event objects given a trace-events file object >> def read_events(fobj): >> + res =3D [] >> event_num =3D 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 +=3D 1 >> + return res >>=20 > Hi Lluis, > This looks really nice. I can include your fixes while addressing other r= eview > comments. Shall I fold your patches with mine or do you want to keep them > separate? Whatever works best for you. Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth