[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Monitoring memory access
From: |
Jun Koi |
Subject: |
Re: [Qemu-devel] Monitoring memory access |
Date: |
Fri, 9 Jul 2010 21:45:57 +0900 |
On Fri, Jul 9, 2010 at 7:41 PM, malc <address@hidden> wrote:
> On Fri, 9 Jul 2010, Jun Koi wrote:
>
>> Hi,
>>
>> I want to monitor memory reading access in Qemu. According to function
>> tcg/i386/tcg-target.c::tcg_out_qemu_ld(), all the memory access must
>> call qemu_ld_helpers[] functions, which in turn calls __ldX_mmu
>> functions.
>>
>> These __ldX_mmu() functions are declared in softmmu_template.c, with
>> macro glue(glue(__ld, SUFFIX), MMUSUFFIX).
>>
>> To monitor memory reading access, I simply put my monitored code at
>> the top of the above macro. But apparently I still miss something,
>> because I dont see the memory access I am looking for.
>>
>> Any hint where I am wrong? Perhaps some memory access do not call the
>> qemu_ld_helpers[] functions?
>
> Haven't we been through this already?
> http://www.mail-archive.com/address@hidden/msg29788.html
>
Yes, we did, but sorry I am still stuck there.
You said that once TLB is setup properly, future memory access would
do directly, without going thru helpers any more. Is that correct?
But what I see in tcg_out_qemu_ld() is that the below function is always called:
....
tcg_out_calli(s, (tcg_target_long)qemu_ld_helpers[s_bits]);
....
And since qemu_ld_helpers[] points to __ldX_mmu, so that means below
macro is always executed:
glue(glue(__ld, SUFFIX), MMUSUFFIX).
I simply put my monitored code inside this macro.
Could you give me some hints where I am wrong?
Thanks,
J