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: Thu, 19 Mar 2009 10:07:57 +0000 (UTC)
User-agent: slrn/pre0.9.9-111 (Linux)

Hi Paul,

Paul Brook <address@hidden> schrieb:
>> The ratio 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).
>
> Direct jumps[1] within the same page are chained (including ). Indirect 
> jumps[2] and direct jumps to a different page are not chained. Chaining jumps 
> between pages would require breaking TB chains every time a TLB flush occurs.

I've tested Qemu 0.10.0 and with i386-softmmu on a i386 host I get the
following numbers:
direct jump count 70%, 2 jumps 54%

For qemu-system-arm on an ARM host, the numbers look like this:
direct jump count 47%, 2 jumps 40%

For completeness I tested qemu-system-arm on a i386 host as well:
direct jump count 44%, 2 jumps 37%

So it looks like the chaining on ARM targets is not as effective as on i386
targets (regardless of the guest, I used the same guest setup, compiled for
different architectures, on all tests). Do you have any ideas why this is the
case?

> Unchained jumps just a two stage lookup to cache frequently used entries.

Many thanks for your explanations.

> Paul
>
> [1] b, b<cc> and bl
> [2] bx, mov pc, ldr pc, pop {pc}

Greetings, Steffen





reply via email to

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