On 07/10/2017 08:40 PM, Stefan Hajnoczi wrote:
On Mon, Jul 10, 2017 at 01:24:23PM +0800, Xie Changlong wrote:
在 7/9/2017 5:57 PM, Wang Dong 写道:
Hi,

I am new to QEMU. But I got some problem so that  I want to figure it out.

So I try to debug qemu to see what happened.

And I found trace framework. I think this will help me understand the
point.

So I compiled qemu with option:

## *--enable-trace-backends=simple*

And did as the docs/tracing.txt tell. But when I execute the example
command in it, nothing just happens.

*./scripts/simpletrace.py trace-events-all trace-xxxxxx(my trace file
produced by qemu)
I am not sure what happened. Just ask this.
Any clue will be appreciated. Thanks in advance.
*

Did you set *trace-event*? I've encountered this issue in the past :)
(qemu) help trace-event
trace-event name on|off -- changes status of a specific trace event
(qemu) info trace-events
Yes, you need to enable specific trace events that you are interested
in.  'trace-event' does that from the QEMU monitor at runtime.  If you'd
rather keep a file with a list of events to enable:

   $ echo bdrv_aio_readv   > /tmp/events
   $ echo bdrv_aio_writev >> /tmp/events
   $ qemu -trace events=/tmp/events ... # your normal QEMU invocation

It's hard to know what is missing without seeing your QEMU command-line
and monitor commands you used.

Stefan

I thought the example in doc was enabled by default.

Thanks for your reply. Below is my command:
When to compile:

./configure --enable-debug --enable-trace-backends=simple

$ echo bdrv_aio_readv   > /tmp/events
$ echo bdrv_aio_writev >> /tmp/events


qemu [...]

-chardev socket,id=mon1,host=localhost,port=7777,server,nowait \
-mon chardev=mon1,mode=control,pretty=on \
-trace events=/tmp/events


Did I miss something?

--
Best regards. Wang Dong


Reply via email to