[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] About the trace framework
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] About the trace framework |
Date: |
Fri, 14 Jul 2017 14:25:03 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
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 写道:
> > > > 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?
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.
Stefan
signature.asc
Description: PGP signature