qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] TCG questions


From: Xin Tong
Subject: Re: [Qemu-devel] TCG questions
Date: Tue, 11 Sep 2012 15:56:27 -0700

On Tue, Sep 11, 2012 at 9:12 AM, Richard Henderson <address@hidden> 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~
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]