From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6ynk-00074L-GD for qemu-devel@nongnu.org; Fri, 23 Sep 2011 01:59:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6ynj-0002N1-54 for qemu-devel@nongnu.org; Fri, 23 Sep 2011 01:59:56 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:48118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6yni-0002Mt-EX for qemu-devel@nongnu.org; Fri, 23 Sep 2011 01:59:55 -0400 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p8N5wV5j025057 for ; Fri, 23 Sep 2011 15:58:31 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8N5veQq1315040 for ; Fri, 23 Sep 2011 15:57:41 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8N5xZvG011719 for ; Fri, 23 Sep 2011 15:59:36 +1000 Message-ID: <4E7C2021.9090200@vnet.linux.ibm.com> Date: Fri, 23 Sep 2011 13:58:57 +0800 From: hkran MIME-Version: 1.0 References: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> <4E785769.403@vnet.linux.ibm.com> <20110920095734.GA16352@stefanha-thinkpad.localdomain> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Zhi Yong Wu Cc: Jan Kiszka , Stefan Hajnoczi , qemu-devel@nongnu.org On 09/20/2011 06:15 PM, Zhi Yong Wu wrote: > On Tue, Sep 20, 2011 at 5:57 PM, Stefan Hajnoczi > wrote: >> 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 > I know how to define my own event and play with it now. Very helpful > for me to debug my functions. thanks. > >>> 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 >> >> > > It took much long time to setup a mingw environment on windows to build qemu with the patch. I enable the events bdrv_aio_readv and bdrv_aio_writev...... finally I got a trace, I paste a piece of that here: bdrv_aio_readv 1172.216 bs=0x12b84a0 sector_num=0x538607 nb_sectors=0x40 opaque=0xe1a1d40 bdrv_aio_readv 1.676 bs=0x12b96e0 sector_num=0x538607 nb_sectors=0x40 opaque=0xe1a1d40 bdrv_aio_readv 811.555 bs=0x12b84a0 sector_num=0x538647 nb_sectors=0x37 opaque=0xe1a1d40 bdrv_aio_readv 2.515 bs=0x12b96e0 sector_num=0x538647 nb_sectors=0x37 opaque=0xe1a1d40 bdrv_aio_writev 3549944.197 bs=0x12b84a0 sector_num=0xf2b3f nb_sectors=0x48 opaque=0xe1a1d40 bdrv_aio_writev 4.190 bs=0x12b96e0 sector_num=0xf2b3f nb_sectors=0x48 opaque=0xe1a1d40 bdrv_aio_writev 35316.500 bs=0x12b84a0 sector_num=0x13f7b7 nb_sectors=0x60 opaque=0xe1a1d40 bdrv_aio_writev 3.911 bs=0x12b96e0 sector_num=0x13f7b7 nb_sectors=0x60 opaque=0xe1a1d40 bdrv_aio_writev 27754.924 bs=0x12b84a0 sector_num=0x9efdf nb_sectors=0x50 opaque=0xe1a1d40 bdrv_aio_writev 3.911 bs=0x12b96e0 sector_num=0x9efdf nb_sectors=0x50 opaque=0xe1a1d40 bdrv_aio_writev 30819.839 bs=0x12b84a0 sector_num=0xf36a7 nb_sectors=0x48 opaque=0xe1a1d40 It looks working fine when windows serving a host. For another thing, if I use virtio driver in my case like this: qemu-system-i386.exe -m 786 -drive file=/c/setup/iso/xp_shanghai.img,if=virtio -sdl -net nic,model=virtio -net user the guest can startup but soon go to crash without any traces. My question: Can not virtio drivers be applied in the case that windows serve as a host? furthermore, are there other limitations when qemu is running on windows?