您可以检查使用 Qemu Simulator 运行的程序的性能吗? [英] Can you check performance of a program running with Qemu Simulator?

查看:30
本文介绍了您可以检查使用 Qemu Simulator 运行的程序的性能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我正在使用 Qemu 运行 ARM 模拟器,是否可以找到程序在真实 ARM 处理器上的执行时间.换句话说,如果我在模拟器上运行的程序中使用诸如gettimeofday之类的函数来检查经过的时间,经过周期精确的模拟是否会准确地给出经过的时间?

Say if I am running an ARM simulator using Qemu, is it possible to find the time of execution of a program as it would be on the real ARM processor. In other words if I use functions such as gettimeofday, in a program running on the simulator, to check the elapsed time, will the elapsed time be given accurately through the cycle-accurate simulation?

推荐答案

我们公司对此问题的调查得出结论,Qemu(用于 ARM)不是周期准确的.如果我没记错的话,周期精度不是 Qemu 的目标,而是旨在快速仿真.还要注意,确切的时间取决于非常不可预测的事情,例如缓存命中和未命中.它还取决于所选的实际架构.请注意,ARM 只是一个指令集 IP,存在几种不同的实现.如果另外模拟一个操作系统,事情就会变得更加不可预测.

Investigation in this issue at our company concluded that Qemu (for the ARM) is not cycle accurate. If I remember correctly cycle accuracy is not a goal of Qemu, instead it aims at fast emulation. Beware also that exact timing is dependent on quite unpredictable things like cache hits and misses. It will also depend on the actual architecture chosen. Note that ARM is merely an instruction set IP and several different implementations exist. If in addition an operating system is emulated, things get even more unpredictable.

我们使用来自 ARM 的模拟器来评估性能,但即便如此,对于最新版本的 ARM 架构也不是完全周期准确的.

We use the simulator from ARM to evaluate performance, but even that one is not fully cycle accurate for the latest versions of the ARM architecture.

这篇关于您可以检查使用 Qemu Simulator 运行的程序的性能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆