QEMU简单后端跟踪不会打印任何内容 [英] QEMU simple backend tracing dosen't print anything
问题描述
我正在从QEMU获取简单的跟踪文件. 我遵循了docs/tracing.txt
I'm doing get simple trace file from QEMU. I followed instructions docs/tracing.txt
使用此命令"qemu-system-x86_64 -m 2G -trace events =/tmp/events ../qemu/test.img"
with this command "qemu-system-x86_64 -m 2G -trace events=/tmp/events ../qemu/test.img"
我只想获取简单的跟踪文件. 我有trace-pid文件,但是里面没有任何东西.
i'd like to get just simple trace file. i've got trace-pid file, however, it dosen't have anything in it.
-
使用简单"跟踪后端进行构建:
Build with the 'simple' trace backend:
./configure --enable-trace-backends =简单 制作
./configure --enable-trace-backends=simple make
使用您要跟踪的事件创建文件:
Create a file with the events you want to trace:
echo bdrv_aio_readv>/tmp/events 回声bdrv_aio_writev >>/tmp/events
echo bdrv_aio_readv > /tmp/events echo bdrv_aio_writev >> /tmp/events
运行虚拟机以生成跟踪文件:
Run the virtual machine to produce a trace file:
qemu -trace events =/tmp/events ...#您正常的QEMU调用
qemu -trace events=/tmp/events ... # your normal QEMU invocation
漂亮地打印二进制跟踪文件:
Pretty-print the binary trace file:
./scripts/simpletrace.py trace-events trace- *#使用QEMU覆盖*
./scripts/simpletrace.py trace-events trace-* # Override * with QEMU
我遵循了此说明. 请有人给我一些有关这种情况的建议.
i followd this instructions. please somebody give me some advise for this situation.
谢谢!
推荐答案
通过遵循相同的文档,我遇到了相同的问题. https://fossies.org/linux/qemu/docs/tracing.txt 一无所有,因为 默认情况下,未启用bdrv_aio_readv和bdrv_aio_writev,至少未启用我编译的版本.您需要在源目录下打开trace-events,寻找一些未禁用的行,例如我使用: 回声"load_file">/tmp/events 然后开始qemu, 来宾开始后,我跑步 ./scripts/simpletrace.py跟踪事件trace-Pid 我有
I got same problem by following the same document. https://fossies.org/linux/qemu/docs/tracing.txt got nothing because bdrv_aio_readv and bdrv_aio_writev was not enabled by default, at least the version I complied, was not enabled. you need to open trace-events under source directory, looking for some line without disabled, e.g. I using: echo "load_file" > /tmp/events Then start qemu, after a guest started, I run ./scripts/simpletrace.py trace-events trace-Pid I got
load_file 1474.156 pid=5249 name=kvmvapic.bin path=qemu-2.8.0-rc0/pc-bios/kvmvapic.bin
load_file 22437.571 pid=5249 name=vgabios-stdvga.bin path=qemu-2.8.0-rc0/pc-bios/vgabios-stdvga.bin
load_file 10034.465 pid=5249 name=efi-e1000.rom
您还可以在qemu命令行中添加-monitor stdio,启动后,您可以在qemu CLI中执行以下命令:
you can also add -monitor stdio to qemu command line, after it started, you can the following command in qemu CLI:
(qemu)信息跟踪事件
(qemu) info trace-events
load_file : state 1
vm_state_notify : state 1
balloon_event : state 0
cpu_out : state 0
cpu_in : state 0
1表示已启用的事件.
1 means enabled events.
这篇关于QEMU简单后端跟踪不会打印任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!