qemu-2.2 using trace event
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!!!!!
Quoted 8 lines · 浩樊啊
Hi,here is my problem
1 ./configure --enable-trace-backends=simple
make
make install
echovirtio_notity>/tmp/events
echovirtio_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/eventsCan you post your full command-line?
Quoted 1 line
4
./scripts/simpletrace.pytrace-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 ...
Quoted 2 lines
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.
On Tue, Nov 3, 2015 at 9:13 AM, 浩樊啊 <[email protected]> wrote:
Please keep [email protected] on CC so the discussion stays on the mailing list where others can participate.
Quoted 3 lines
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
Quoted 2 lines · 浩樊啊
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'.