qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: branches are expensive


From: Steffen Liebergeld
Subject: [Qemu-devel] Re: branches are expensive
Date: Tue, 17 Mar 2009 12:31:24 +0000 (UTC)
User-agent: slrn/pre0.9.9-111 (Linux)

Hi,

Jan Kiszka <address@hidden> schrieb:
> Avi Kivity wrote:
>> Steffen Liebergeld wrote:
>>> Hi,
>>>
>>> while measuring the execution of an ARM guest, I encountered that
>>> branches are
>>> extremely expensive in terms of executed host instructions. A single ARM
>>> branch takes 148 to 152 host instructions. In my setup host and guest
>>> use the
>>> ARM instruction set architecture.
>>>
>>> My question is what makes branches so expensive? What code is run when
>>> executing a branch? Other instructions are translated to 14 to 40
>>> instructions.
>>>   
>> 
>> I'm no tcg guru, but if branches are not chained, you'd need an
>> expensive lookup to find the next translation block.  If branches are
>> chained they'll probably be much faster.
>
> That is probably the reason.
>
> You can check to generated host code and compare it to the guest code
> via -d in_asm,out_asm (or via the monitor: log in_asm,out_asm), logs
> will be written /tmp/qemu.log by default. The ratio of direct (chained)
> jumps is given via "info jit".

The radio is quite bad. Do you have any documentation on when Qemu does the
chaining and more important, when it does not. For example are unconditional
jumps always chained, or only in one direction (forward or backward).

Many thanks.
Steffen 





reply via email to

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