[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 28/43] exec-all: rename tb_free to tb_remove
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v3 28/43] exec-all: rename tb_free to tb_remove |
Date: |
Wed, 19 Jul 2017 23:09:14 -0400 |
We don't really free anything in this function anymore; we just remove
the TB from the binary search tree.
Suggested-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
---
include/exec/exec-all.h | 2 +-
accel/tcg/cpu-exec.c | 2 +-
accel/tcg/translate-all.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index eb3eb7b..7bc2050 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -428,7 +428,7 @@ static inline uint32_t curr_cflags(void)
return parallel_cpus ? CF_PARALLEL : 0;
}
-void tb_free(TranslationBlock *tb);
+void tb_remove(TranslationBlock *tb);
void tb_flush(CPUState *cpu);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc,
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index cb1e6d3..1963bda 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -218,7 +218,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
tb_lock();
tb_phys_invalidate(tb, -1);
- tb_free(tb);
+ tb_remove(tb);
tb_unlock();
}
#endif
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index cb71aef..448f13b 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -375,7 +375,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
if (tb->cflags & CF_NOCACHE) {
/* one-shot translation, invalidate it immediately */
tb_phys_invalidate(tb, -1);
- tb_free(tb);
+ tb_remove(tb);
}
r = true;
}
@@ -874,7 +874,7 @@ static TranslationBlock *tb_alloc(target_ulong pc)
}
/* Called with tb_lock held. */
-void tb_free(TranslationBlock *tb)
+void tb_remove(TranslationBlock *tb)
{
assert_tb_locked();
@@ -1809,7 +1809,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
* cpu_exec_nocache() */
tb_phys_invalidate(tb->orig_tb, -1);
}
- tb_free(tb);
+ tb_remove(tb);
}
/* FIXME: In theory this could raise an exception. In practice
we have already translated the block once so it's probably ok. */
--
2.7.4
- [Qemu-devel] [PATCH v3 01/43] cputlb: bring back tlb_flush_count under !TLB_DEBUG, (continued)
- [Qemu-devel] [PATCH v3 01/43] cputlb: bring back tlb_flush_count under !TLB_DEBUG, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 16/43] target/m68k: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 19/43] target/sparc: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 22/43] translate-all: define and use DEBUG_TB_FLUSH_GATE, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 32/43] tcg: take .helpers out of TCGContext, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 29/43] translate-all: report correct avg host TB size, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 25/43] translate-all: define and use DEBUG_TB_CHECK_GATE, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 24/43] translate-all: define and use DEBUG_TB_INVALIDATE_GATE, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 02/43] tcg: fix corruption of code_time profiling counter upon tb_flush, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 28/43] exec-all: rename tb_free to tb_remove,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v3 23/43] exec-all: introduce TB_PAGE_ADDR_FMT, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 26/43] exec-all: extract tb->tc_* into a separate struct tc_tb, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 17/43] target/s390x: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 34/43] gen-icount: fold exitreq_label into TCGContext, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 09/43] tcg: consolidate TB lookups in tb_lookup__cpu_state, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 11/43] tcg: define CF_PARALLEL and use it for TB hashing, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 37/43] tcg: distribute profiling counters across TCGContext's, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 10/43] exec-all: bring tb->invalid into tb->cflags, Emilio G. Cota, 2017/07/19