[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/62] accel/tcg: Use more accurate max_insns for tb_overflow
From: |
Richard Henderson |
Subject: |
[PULL 34/62] accel/tcg: Use more accurate max_insns for tb_overflow |
Date: |
Tue, 28 Feb 2023 16:56:15 -1000 |
Write back the number of insns that we attempt to translate,
so that if we longjmp out we have a more accurate limit for
the next attempt. This results in fewer restarts when some
limit is consumed by few instructions.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/translator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index f56da8ea30..d0babfea88 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -78,7 +78,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int
*max_insns,
plugin_enabled = plugin_gen_tb_start(cpu, db, cflags & CF_MEMI_ONLY);
while (true) {
- db->num_insns++;
+ *max_insns = ++db->num_insns;
ops->insn_start(db, cpu);
tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */
--
2.34.1
- [PULL 22/62] target/openrisc: Replace `tb_pc()` with `tb->pc`, (continued)
- [PULL 22/62] target/openrisc: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 23/62] target/mips: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 24/62] target/microblaze: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 28/62] target/hexagon: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 30/62] target/arm: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 32/62] tcg: Adjust TCGContext.temps_in_use check, Richard Henderson, 2023/02/28
- [PULL 25/62] target/loongarch: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 31/62] include/exec: Remove `tb_pc()`, Richard Henderson, 2023/02/28
- [PULL 33/62] accel/tcg: Pass max_insn to gen_intermediate_code by pointer, Richard Henderson, 2023/02/28
- [PULL 29/62] target/avr: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 34/62] accel/tcg: Use more accurate max_insns for tb_overflow,
Richard Henderson <=
- [PULL 35/62] tcg: Remove branch-to-next regardless of reference count, Richard Henderson, 2023/02/28
- [PULL 26/62] target/i386: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 27/62] target/hppa: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 36/62] tcg: Rename TEMP_LOCAL to TEMP_TB, Richard Henderson, 2023/02/28
- [PULL 37/62] tcg: Use noinline for major tcg_gen_code subroutines, Richard Henderson, 2023/02/28
- [PULL 38/62] tcg: Add liveness_pass_0, Richard Henderson, 2023/02/28
- [PULL 39/62] tcg: Remove TEMP_NORMAL, Richard Henderson, 2023/02/28
- [PULL 47/62] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers, Richard Henderson, 2023/02/28
- [PULL 58/62] target/ppc: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/28
- [PULL 46/62] accel/tcg/plugin: Use tcg_temp_ebb_*, Richard Henderson, 2023/02/28