qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xin Tong <xerox.time.tech@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] TCG questions
Date: Tue, 11 Sep 2012 15:56:27 -0700	[thread overview]
Message-ID: <CALKntY32Aj1zQQk0AOS1bAS0BP00b9zcVJJVjNxJsOPfi5vOww@mail.gmail.com> (raw)
In-Reply-To: <504F62F5.2090302@twiddle.net>

On Tue, Sep 11, 2012 at 9:12 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 09/10/2012 08:17 PM, Xin Tong wrote:
>> I have 2 questions about TCGv.
>>
>> 1.  if DEBUG is enabled on TCGv, TCGv is wrapped in a C struct. and
>> would it not be very expensive to pass TCGv by copy for all the
>> tcg_gen_xxx functions.i.e. tcg_gen_mov_tl(cpu_cc_src, cpu_T[1]);
>
> No.  The compiler is (generally) able to look through a struct with
> a single member.
>
>> 2. I have created some files that need to include tcg-op.h and cpu.h (
>> i use TCGv in the files). since cpu.h are architecture specific. what
>> do i put as the include path and how i should organize the files so
>> that the correct architecture specific cpu.h gets picked up. i tried
>> many things. but it seems none of them works very well.
>
> You've not provided enough details to give a meaningful answer.

I have created a set of instrument API on QEMU. one can write client
programs that compile into shared library. the shared library is then
loaded into qemu and extract statistics out of QEMU.

Basically when QEMU translates the guest ISA to emulation code. it
pushes some of the value (i.e. virt address, phys address of a memory
access) of interested into a structure in the CPUState.

Some of the files in the instrumentation module depends on TCGv. i
just want to find a way to include the tcg-op.h. it is not easy as it
is architecture dependent.

Xin

>
>
> r~
>

  parent reply	other threads:[~2012-09-11 22:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  3:17 [Qemu-devel] TCG questions Xin Tong
2012-09-11 16:12 ` Richard Henderson
2012-09-11 17:04   ` Peter Maydell
2012-09-11 22:56   ` Xin Tong [this message]
2012-09-11 23:23     ` Richard Henderson
2012-09-12  1:52     ` 陳韋任 (Wei-Ren Chen)
2012-09-12  2:34       ` Xin Tong
2012-09-12 13:14         ` Lluís Vilanova
2012-09-12 17:09           ` Xin Tong
2012-09-12 17:11             ` Xin Tong

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=CALKntY32Aj1zQQk0AOS1bAS0BP00b9zcVJJVjNxJsOPfi5vOww@mail.gmail.com \
    --to=xerox.time.tech@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).