[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 2/3] tcg-runtime: light re-factor of lookup_t
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v1 2/3] tcg-runtime: light re-factor of lookup_tb_ptr |
Date: |
Wed, 14 Jun 2017 08:44:50 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 06/14/2017 07:02 AM, Alex Bennée wrote:
Just a little precursor re-factoring before I was going to add a trace
point:
- single return point, defaulting to tcg_ctx.code_gen_epilogue
Why? Any if you're going to do that, why not init ret = epilogue and avoid the
null test at the end?
- move cs_base, pc and flags inside the jump cache hit scope
Funny story. While looking at this again, I notice that there's no reason to
avoid, and every reason not to avoid, calling tb_htable_lookup when
tb_jmp_cache is empty. So I'm now doing
tb = atomic_rcu_read(...);
cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
if (!(tb && tb->pc == addr && ...)) {
tb = tb_htable_lookup(...);
...
- calculate the tb_jmp_cache hash once
I did look once and the compiler is doing the CSE. But it does look cleaner.
r~
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, (continued)
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Paolo Bonzini, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Richard Henderson, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Alex Bennée, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Richard Henderson, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Emilio G. Cota, 2017/06/16
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Alex Bennée, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Richard Henderson, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Peter Maydell, 2017/06/14
- Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs, Richard Henderson, 2017/06/14
[Qemu-devel] [PATCH v1 2/3] tcg-runtime: light re-factor of lookup_tb_ptr, Alex Bennée, 2017/06/14
[Qemu-devel] [PATCH v1 1/3] vl: Fix broken thread=xxx option of the --accel parameter, Alex Bennée, 2017/06/14
Re: [Qemu-devel] [PATCH v1 0/3] Fixes for TCG hangs, Philippe Mathieu-Daudé, 2017/06/14
Re: [Qemu-devel] [PATCH v1 0/3] Fixes for TCG hangs, no-reply, 2017/06/14