From: "Alex Bennée" <alex.bennee@linaro.org>
To: Tom Clark <tsc288@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: TCG IR extraction
Date: Thu, 01 Sep 2022 15:18:35 +0100 [thread overview]
Message-ID: <87y1v3mb1l.fsf@linaro.org> (raw)
In-Reply-To: <CAA_GOyF3YxqT4-9gv-u-3pSK7zPZq7YiGCpsUUvmYbuE_h33_w@mail.gmail.com>
Tom Clark <tsc288@gmail.com> writes:
> Hello,
>
> Thanks so much for reading this and I appreciate any and all time you put into this.
>
> I'm a dev working on a project that's using QEMU as its basis. I'm interested in extracting the IR representation of
> translation blocks, preferably at the instruction level, to do some
> analysis on it.
If you are purely interested in the instruction level you could look at
TCG plugins although they deliberately don't expose any of the details of the
underlying TCGOps.
> In various documentation around the web
> I see lots of references to textual examples of the IR so I assumed it would be possible to extract it in byte format and
> convert to textual myself.
>
> I've done a lot of digging in the source and found the code_gen_buffer and determined that's where the IR generation is
> being written to, but I'm having trouble cross referencing DisasContext, etc, with that global to actually identify individual
> lines of code. I'm also assuming there's some kind of framing going on, so I don't think that I can even expect it to be a
> simple buffer of bytes.
>
> So my - is this reasonable to even attempt, and if so, how would you go about doing it?
>
> Regards,
> -T
--
Alex Bennée
prev parent reply other threads:[~2022-09-01 14:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 18:11 TCG IR extraction Tom Clark
2022-09-01 5:28 ` Richard Henderson
2022-09-01 14:18 ` Alex Bennée [this message]
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=87y1v3mb1l.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=tsc288@gmail.com \
/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).