[Top][All Lists]

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

Re: [Qemu-devel] About the trace framework

From: Wang Dong
Subject: Re: [Qemu-devel] About the trace framework
Date: Thu, 27 Jul 2017 09:03:38 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 07/14/2017 09:25 PM, Stefan Hajnoczi wrote:
On Thu, Jul 13, 2017 at 04:01:09PM +0800, Wang Dong wrote:
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 写道:

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

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.

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?
Recent QEMU versions do not have bdrv_aio_readv/bdrv_aio_writev trace
events, so you may not get any output.

Which events do you actually want to trace?

I will update the example in docs/devel/tracing.txt with trace events
that are more likely to be triggered.

Hi Stefan,
    Thanks for the reply and your patch.
    I just want to learn qemu with debugging.
I think it will be easier for me to learn the detail with this trace framework.

    So I just tried it. I will try it again with your updated.

Best regards. Wang Dong

reply via email to

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