qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How Qemu TCG optimize memory read?


From: nguyen linh mai
Subject: How Qemu TCG optimize memory read?
Date: Sun, 28 Jun 2020 04:08:06 +0800

Hi,

Looking at how Qemu TCG handle "pop rax" instruction on x64, which read from stack memory, I found that the code in load_helper() in accel/tcg/cputlb.c is never exercised. 

I guess the reason is that TCG try to avoid "trivial" memory access by optimizing memory read, perhaps by directly reading memory, thus does not go through this function. But after spending so much time looking at the code, I cannot find where TCG does this optimization. Any pointer, please?

My motivation is to instrument all memory read, so I want to avoid this optimization. I can see that Qemu 5 plugin can do this, but I dont see some information like data size (of reading). So I may hack the plugin code a bit. Or there is a better solution?

Thanks a lot.
Mai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]