diff options
author | Liren Wei <lrwei@bupt.edu.cn> | 2021-07-04 22:31:27 +0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-07-09 09:38:33 -0700 |
commit | 834361efd9d52947663aa5b297693f8e352bef2a (patch) | |
tree | b2de0f16a0705c1dfc4b1bcc153594198d418e86 /accel | |
parent | f4cba756cb6c6173321c4aad2035d5a86100eef7 (diff) |
tcg: Bake tb_destroy() into tcg_region_tree
The function is called only at tcg_gen_code() when duplicated TBs
are translated by different threads, and when the tcg_region_tree
is reset. Bake it into the underlying GTree as its value destroy
function to unite these situations.
Also remove tcg_region_tree_traverse() which now becomes useless.
Signed-off-by: Liren Wei <lrwei@bupt.edu.cn>
Message-Id: <8dc352f08d038c4e7a1f5f56962398cdc700c3aa.1625404483.git.lrwei@bupt.edu.cn>
[rth: Name the new tb_tc_cmp parameter correctly.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/translate-all.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 75e4d06557..57455d8639 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -378,11 +378,6 @@ static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, return 0; } -void tb_destroy(TranslationBlock *tb) -{ - qemu_spin_destroy(&tb->jmp_lock); -} - bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit) { /* @@ -1681,7 +1676,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu, orig_aligned -= ROUND_UP(sizeof(*tb), qemu_icache_linesize); qatomic_set(&tcg_ctx->code_gen_ptr, (void *)orig_aligned); - tb_destroy(tb); tcg_tb_remove(tb); return existing_tb; } |