qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: hkran <hkran@vnet.linux.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows
Date: Tue, 20 Sep 2011 10:57:34 +0100	[thread overview]
Message-ID: <20110920095734.GA16352@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <4E785769.403@vnet.linux.ibm.com>

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	other threads:[~2011-09-20  9:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  9:37 [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows Stefan Hajnoczi
2011-09-09  9:37 ` [Qemu-devel] [PATCH 1/2] trace: portable simple trace backend using glib Stefan Hajnoczi
2011-09-20 10:31   ` Jan Kiszka
2011-09-20 10:52     ` Paolo Bonzini
2011-09-20 10:58       ` Jan Kiszka
2011-09-20 12:01         ` Stefan Hajnoczi
2011-09-09  9:37 ` [Qemu-devel] [PATCH 2/2] trace: use binary file open mode in simpletrace Stefan Hajnoczi
2011-09-09 11:12 ` [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows Paolo Bonzini
2011-09-20  9:05 ` hkran
2011-09-20  9:57   ` Stefan Hajnoczi [this message]
2011-09-20 10:15     ` Zhi Yong Wu
2011-09-23  5:58       ` hkran
2011-09-20 10:20 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110920095734.GA16352@stefanha-thinkpad.localdomain \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=hkran@vnet.linux.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).