Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3625643
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类: LINUX

2021-08-07 15:03:17


https: //blog.csdn.net/daxiatou/article/details/103450929

(4)-D logfile:制定生成的log文件的路径,使用绝对路径;
(5)-d options:制定log文件的类型,具体支持的类型可见源代码。这里主要使用out_asm,in_asm,exec,cpu:
  1)out_asm:宿主机解释的指令;
  2)in_asm:目标机的指令;
  3)exec:执行的状态;
  4)cpu:cpu的状态;


1)编译qemu时要enable trace backend
./configure --enable-trace-backends=simple

2)添加你想要trace的event
$ cat /tmp/events
virtio_blk_req_complete
virtio_blk_handle_write

3)启动虚拟机
-trace events=/tmp/events,file=trace.bin

其中,在正常启动的的qemu程序中加入"-trace events=/tmp/events,file=trace.bin",其中/tmp/events就是要跟踪的event,而trace.bin就是trace产生的文件,不能直接读,而要通过工具来读。
4)获取trace结果
simpletrace.py trace-events trace.bin

 <qemu:commandline> <qemu:arg value='-D'/> <qemu:arg value='/var/log/qemu/qemu.log'/> </qemu:commandline>

阅读(4970) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~