[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/28] accel/tcg: Use more accurate max_insns for tb_overflow
From: |
Richard Henderson |
Subject: |
[PATCH v2 03/28] accel/tcg: Use more accurate max_insns for tb_overflow |
Date: |
Wed, 22 Feb 2023 13:26:50 -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.
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 fac1e8c465..62e8f28025 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
- [PATCH v2 00/28] tcg: Simplify temporary usage, Richard Henderson, 2023/02/22
- [PATCH v2 01/28] tcg: Adjust TCGContext.temps_in_use check, Richard Henderson, 2023/02/22
- [PATCH v2 02/28] accel/tcg: Pass max_insn to gen_intermediate_code by pointer, Richard Henderson, 2023/02/22
- [PATCH v2 03/28] accel/tcg: Use more accurate max_insns for tb_overflow,
Richard Henderson <=
- [PATCH v2 04/28] tcg: Remove branch-to-next regardless of reference count, Richard Henderson, 2023/02/22
- [PATCH v2 05/28] tcg: Rename TEMP_LOCAL to TEMP_TB, Richard Henderson, 2023/02/22
- [PATCH v2 06/28] tcg: Add liveness_pass_0, Richard Henderson, 2023/02/22
- [PATCH v2 07/28] tcg: Remove TEMP_NORMAL, Richard Henderson, 2023/02/22
- [PATCH v2 08/28] tcg: Pass TCGTempKind to tcg_temp_new_internal, Richard Henderson, 2023/02/22
- [PATCH v2 09/28] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr}, Richard Henderson, 2023/02/22
- [PATCH v2 10/28] tcg: Add tcg_gen_movi_ptr, Richard Henderson, 2023/02/22
- [PATCH v2 12/28] accel/tcg/plugin: Use tcg_temp_ebb_*, Richard Henderson, 2023/02/22