qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "浩倫 魏" <goberwei@yahoo.com.tw>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Dumping execution trace of QEMU
Date: Tue, 2 Jun 2015 12:38:46 +0000 (UTC)	[thread overview]
Message-ID: <2015071118.1186303.1433248726176.JavaMail.yahoo@mail.yahoo.com> (raw)

[-- 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 --]

                 reply	other threads:[~2015-06-02 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2015071118.1186303.1433248726176.JavaMail.yahoo@mail.yahoo.com \
    --to=goberwei@yahoo.com.tw \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).