qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows
Date: Tue, 20 Sep 2011 10:57:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 <module>
>     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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]