From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5x59-0007vB-FJ for qemu-devel@nongnu.org; Tue, 20 Sep 2011 05:57:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5x58-0002Av-5k for qemu-devel@nongnu.org; Tue, 20 Sep 2011 05:57:39 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:41381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5x57-00023u-RY for qemu-devel@nongnu.org; Tue, 20 Sep 2011 05:57:38 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8K9vZdA021807 for ; Tue, 20 Sep 2011 09:57:35 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8K9vZX22625722 for ; Tue, 20 Sep 2011 10:57:35 +0100 Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8K9vYdu018326 for ; Tue, 20 Sep 2011 03:57:34 -0600 Date: Tue, 20 Sep 2011 10:57:34 +0100 From: Stefan Hajnoczi Message-ID: <20110920095734.GA16352@stefanha-thinkpad.localdomain> References: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> <4E785769.403@vnet.linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E785769.403@vnet.linux.ibm.com> Subject: Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: hkran Cc: Jan Kiszka , qemu-devel@nongnu.org On Tue, Sep 20, 2011 at 05:05:45PM +0800, hkran wrote: > On 09/09/2011 05:37 PM, Stefan Hajnoczi wrote: > >The 'simple' trace backend uses pthreads and does not work on Windows. These > >patches switch from pthreads to glib so that the code builds on all platforms > >supported by glib. > > > >Only one thing I'm unhappy about: the simpletrace write-out thread used to > >block all signals. I have removed that code and don't expect glib to do it for > >me. I'm not sure if there is a problem if signal handlers are invoked in the > >write-out thread instead of a QEMU thread. Any thoughts? > > > >Stefan Hajnoczi (2): > > trace: portable simple trace backend using glib > > trace: use binary file open mode in simpletrace > > > > trace/simple.c | 58 ++++++++++++++++++++++++++----------------------------- > > 1 files changed, 27 insertions(+), 31 deletions(-) > > > Stefan, > > I applied the patch and make &install it. > > After a round of running of the qemu with the patch, a trace file is > here, but when I want to open it like this, > ./simpletrace.py trace-events trace-29948 //trace-29948 is my tracefile > an error occurs: > > Traceback (most recent call last): > File "./simpletrace.py", line 151, in > run(Formatter()) > File "./simpletrace.py", line 131, in run > events = parse_events(open(sys.argv[1], 'r')) > IOError: [Errno 2] No such file or directory: 'trace-events' > > Am I using it in a right way? Looks like your current working directory is scripts/ so simpletrace.py will be unable to find the trace-events file which is in the parent directory. Usually I stay in QEMU's root directory and just run: $ qemu # ...generate the trace $ scripts/simpletrace.py trace-events trace-$PID > Additionally, There is something about WIN32 in patch, How can I > compile a qemu running on windows? Could you give a reference? Search for 'mingw' in qemu-doc.texi for instructions. Stefan