问题描述
说,如果我使用的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一个目标,而是旨在快速仿真。同时要注意的是确切的时间依赖于像缓存成功和失败完全是非predictable的事情。它也将取决于所选择的实际结构。注意,ARM仅是一个指令集IP和几种不同的实现存在。如果除了操作系统进行了仿真,事情变得更未predictable。
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进行模拟运行的程序的表现呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!