qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-2.2 using trace event
@ 2015-10-28 12:44 =?gb18030?B?usa3rrCh?=
  2015-10-29 16:40 ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: =?gb18030?B?usa3rrCh?= @ 2015-10-28 12:44 UTC (permalink / raw)
  To: =?gb18030?B?cWVtdS1kZXZlbA==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 649 bytes --]

Hi,here is my problem
1 ./configure --enable-trace-backends=simple
    make
    make install
    echo virtio_notity > /tmp/events
    echo virtio_queue_notify >> /tmp/events
2  I use a xml file run a virtual machine
3  qemu-system_x86_64 -trace events=/tmp/events 
4   ./scripts/simpletrace.py trace-events trace-*


But do not get trace.log. and when i check trace-* using 'vim' i find the file is almost empty.
I tried many times, including reinstall qemu,but still don't work.
when i use qemu -trace -m 2048 ........... commandline create virtual machine ,the vm become very slow and still no trace.log.
I am a green hand, help!!!!!

[-- Attachment #2: Type: text/html, Size: 866 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu-2.2 using trace event
  2015-10-28 12:44 [Qemu-devel] qemu-2.2 using trace event =?gb18030?B?usa3rrCh?=
@ 2015-10-29 16:40 ` Stefan Hajnoczi
       [not found]   ` <tencent_63CA6C5D3A03CD794683E24F@qq.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2015-10-29 16:40 UTC (permalink / raw)
  To: 浩樊啊; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

On Wed, Oct 28, 2015 at 08:44:27PM +0800, 浩樊啊 wrote:
> Hi,here is my problem
> 1 ./configure --enable-trace-backends=simple
>     make
>     make install
>     echo virtio_notity > /tmp/events
>     echo virtio_queue_notify >> /tmp/events
> 2  I use a xml file run a virtual machine
> 3  qemu-system_x86_64 -trace events=/tmp/events 

Here is my command-line:

  qemu-system-x86_64 -enable-kvm -m 1024 \
                     -drive if=virtio,file=test.img,format=raw \
		     -trace events=/tmp/events

Can you post your full command-line?

> 4   ./scripts/simpletrace.py trace-events trace-*

After shutting down QEMU I ran:

  $ scripts/simpletrace.py trace-events trace-16347
  ...
  virtio_notify 89.954 pid=16347 vdev=0x5628b0b5db30 vq=0x5628b1f8f650
  virtio_queue_notify 77.129 pid=16347 vdev=0x5628b0b5db30 n=0x0 vq=0x5628b1f8f650
  virtio_notify 171.445 pid=16347 vdev=0x5628b0b5db30 vq=0x5628b1f8f650
  virtio_queue_notify 65.987 pid=16347 vdev=0x5628b0b5db30 n=0x0 vq=0x5628b1f8f650
  virtio_notify 168.007 pid=16347 vdev=0x5628b0b5db30 vq=0x5628b1f8f650
  ...

> But do not get trace.log. and when i check trace-* using 'vim' i find the file is almost empty.
> I tried many times, including reinstall qemu,but still don't work.

The file is called trace-$QEMU_PID, not trace.log.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu-2.2 using trace event
       [not found]   ` <tencent_63CA6C5D3A03CD794683E24F@qq.com>
@ 2015-11-03  9:45     ` Stefan Hajnoczi
       [not found]       ` <tencent_7180EC0F15A92E792CCE31B8@qq.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2015-11-03  9:45 UTC (permalink / raw)
  To: 浩樊啊; +Cc: qemu-devel

On Tue, Nov 3, 2015 at 9:13 AM, 浩樊啊 <fanh2010@foxmail.com> wrote:

Please keep qemu-devel@nongnu.org on CC so the discussion stays on the
mailing list where others can participate.

> you mean that qemu-system-x86_64 .....   is a command to start a vm?
> can I just start a vm by a xml file and then use qemu-system_x86_64 -trace
> events=/tmp/events trace the vm?

No, each QEMU process is a separate VM.  Launching a new QEMU does not
attach to an existing QEMU process.

If you want to "attach" to a running QEMU process, you can use the
SystemTap tracing backend.  Make sure that your QEMU binary was built
with ./configure --enable-trace-backend=dtrace (that is the case in
Fedora and Red Hat-based distributions).  Take a look at the
/usr/share/systemtap/tapset/qemu-system-x86_64.stp tapset and
SystemTap documentation here:
https://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
https://sourceware.org/systemtap/SystemTap_Beginners_Guide/

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] 回复:  qemu-2.2 using trace event
       [not found]       ` <tencent_7180EC0F15A92E792CCE31B8@qq.com>
@ 2015-11-13  9:32         ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2015-11-13  9:32 UTC (permalink / raw)
  To: 浩樊啊; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

On Wed, Nov 11, 2015 at 05:18:56PM +0800, 浩樊啊 wrote:
> Hi, I can use trace-event now , but i still don't know what the second list stands for?
> is it a execution time of a function?

If you are using the "simple" trace backend then the second column
contains the time delta (in microseconds) since the previous trace
event.

For example:
a 0 ...
b 1000 ...

Event 'b' occurred 1 millisecond after 'a'.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-13  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28 12:44 [Qemu-devel] qemu-2.2 using trace event =?gb18030?B?usa3rrCh?=
2015-10-29 16:40 ` Stefan Hajnoczi
     [not found]   ` <tencent_63CA6C5D3A03CD794683E24F@qq.com>
2015-11-03  9:45     ` Stefan Hajnoczi
     [not found]       ` <tencent_7180EC0F15A92E792CCE31B8@qq.com>
2015-11-13  9:32         ` [Qemu-devel] 回复: " Stefan Hajnoczi

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).