* [Qemu-devel] Dumping execution trace of QEMU
@ 2015-06-02 12:38 浩倫 魏
0 siblings, 0 replies; only message in thread
From: 浩倫 魏 @ 2015-06-02 12:38 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]
Hi all:
Please correct me if I have any misunderstanding for the following descriptions. Thanks in advance.
I've been trying to dump ARM's execution trace, including guest PC, guest instruction binary, guest virtual/guest physical address for load/store instruction. But I encountered some troubles, and I hope you can help me out.
I used a helper function to dump PC & binary for every instruction while the "disas_arm_insn" generating the TCG IR, and indeed, it can print out the information I want.
And for the guest virtual/physical address for load/store instructions, as far as I've understood, EVERY guest load/store instructions would natively be translated into "qemu_ld/st" IR which would be translated into call function to softmmu's helper function.
So for those address translation information I want to get, in my opinion, I just have to print out the virtual address and corresponding physical address inside the softmmu helper function, that's say like in the end of "get_phys_addr_v6()" function in target-arm/helper.c.
And those information should consequently follow the PC & binary I printed out previously.
BUT, things didn't work out as I expected. I couldn't get the address information for guest ld/st indtruction.
I used "-qemu -d in_asm, op, out_asm" command line options to watch the translation procedure, and found that there are "qemu_ld/st" IRs being translated for every guest ld/st instruction, also in host(x86) binary, I saw "callq" that should be jump into softmmu helper function.
But there are no address translation information being printed out. Then I was wondering if it really went inside the softmmu, I tried to move to upper level.
I added 'printf("Hello World")' in the beginning of "glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr, int mmu_idx)" function, while it still didn't print it out when encountered qemu_ld/st IR, and I really don't know why.
Shouldn't every guest ld/st step into that function?
Please tell me where did I go wrong. Thanks again.
Hao-Lun Wei
[-- Attachment #2: Type: text/html, Size: 2992 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-02 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 12:38 [Qemu-devel] Dumping execution trace of QEMU 浩倫 魏
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).