On Tue, Feb 18, 2025 at 11:56 PM 蓝色的梦想 <1058183...@qq.com> wrote:
>
> Hello!
>
>     I am a graduate student currently studying in school. Recently, I used 
> QEMU 9.0.2 to create virtual machines with ARM, x86, and RISC-V architectures 
> for experiments. During the process, I found that the ‘perf stat’ command 
> does not support the collection of certain metrics, such as: instructions, 
> cache-misses, cache-references, etc. I am unsure whether this issue is due to 
> my operations or if QEMU itself does not support these metrics.

There are a range of different pieces that need to be in place to
support perf. From architecture support to kernel support. You will
need to investigate each architecture to see what is supported in QEMU
and the guest software that you are running. I would expect
instruction counts to work on the major architectures though. But that
will be up to you to dig into to see what is supported.

QEMU itself doesn't model caches and the instruction count (if
supported for the architecture in QEMU) is not going to be exact. You
can use a TCG plugin to model a cache [1] though if that's something
you need.

1: https://www.qemu.org/2021/08/19/tcg-cache-modelling-plugin/

Alistair

>
>     Therefore, I would like to ask you whether QEMU virtual machines support 
> the collection of the above metrics.
>
>     I apologize for bothering you, and I hope you will be able to reply at 
> your convenience. Thank you very much!
>

Reply via email to