On 06/16/2017 01:19 PM, Emilio G. Cota wrote:
While booting debian-arm I'm measuring (see below) a hit rate in the
high 90's for the htable lookups here, so adding an 'unlikely()'
hint would be a good idea.
GCC already predicts null pointers unlikely.
We get identical code with and without the
On Wed, Jun 14, 2017 at 12:48:17 -0700, Richard Henderson wrote:
> --- a/tcg-runtime.c
> +++ b/tcg-runtime.c
(snip)
> tb = tb_htable_lookup(cpu, addr, cs_base, flags);
> -if (likely(tb)) {
> -atomic_set(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(addr)], tb);
> -
Richard Henderson writes:
> We can call tb_htable_lookup even when the tb_jmp_cache
> is completely empty. Therefore, un-nest most of the code
> dependent on tb != NULL from the read from the cache.
>
> Signed-off-by: Richard Henderson
Reviewed-by: Alex Bennée
> ---
> tcg-runtime.c | 34 ++
We can call tb_htable_lookup even when the tb_jmp_cache
is completely empty. Therefore, un-nest most of the code
dependent on tb != NULL from the read from the cache.
Signed-off-by: Richard Henderson
---
tcg-runtime.c | 34 ++
1 file changed, 18 insertions(+), 16