[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 39/50] exec-all: rename tb_free to tb_remove
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v6 39/50] exec-all: rename tb_free to tb_remove |
Date: |
Mon, 16 Oct 2017 10:25:58 -0700 |
From: "Emilio G. Cota" <address@hidden>
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 4c4242a1d8..746f4be71e 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -389,7 +389,7 @@ static inline uint32_t curr_cflags(void)
| (use_icount ? CF_USE_ICOUNT : 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 59fd784436..6a4a33235b 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -220,7 +220,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 083e1c7336..76db9c775a 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();
@@ -1816,7 +1816,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.13.6
- [Qemu-devel] [PATCH v6 31/50] target/s390x: check CF_PARALLEL instead of parallel_cpus, (continued)
- [Qemu-devel] [PATCH v6 31/50] target/s390x: check CF_PARALLEL instead of parallel_cpus, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 32/50] target/sh4: check CF_PARALLEL instead of parallel_cpus, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 35/50] cpu-exec: lookup/generate TB outside exclusive region during step_atomic, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 36/50] tcg: Add CF_LAST_IO + CF_USE_ICOUNT to CF_HASH_MASK, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 37/50] tcg: Remove CF_IGNORE_ICOUNT, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 34/50] tcg: check CF_PARALLEL instead of parallel_cpus, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 38/50] translate-all: use a binary search tree to track TBs in TBContext, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 40/50] translate-all: report correct avg host TB size, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 39/50] exec-all: rename tb_free to tb_remove,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 41/50] tcg: take tb_ctx out of TCGContext, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 43/50] gen-icount: fold exitreq_label into TCGContext, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 44/50] tcg: introduce **tcg_ctxs to keep track of all TCGContext's, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 47/50] osdep: introduce qemu_mprotect_rwx/none, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 45/50] tcg: distribute profiling counters across TCGContext's, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 48/50] translate-all: use qemu_protect_rwx/none helpers, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 46/50] tcg: allocate optimizer temps with tcg_malloc, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 42/50] tcg: define tcg_init_ctx and make tcg_ctx a pointer, Richard Henderson, 2017/10/16