From 36bc99bc789fd564facea93feb2a22e4942b84d0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 3 Apr 2024 09:20:06 -1000 Subject: plugins: Use translator_st for qemu_plugin_insn_data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the bytes that we record for the entire TB, rather than a per-insn GByteArray. Record the length of the insn in plugin_gen_insn_end rather than infering from the length of the array. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tcg') diff --git a/tcg/tcg.c b/tcg/tcg.c index d827c6d431..71daa5d268 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -765,8 +765,7 @@ static void alloc_tcg_plugin_context(TCGContext *s) { #ifdef CONFIG_PLUGIN s->plugin_tb = g_new0(struct qemu_plugin_tb, 1); - s->plugin_tb->insns = - g_ptr_array_new_with_free_func(qemu_plugin_insn_cleanup_fn); + s->plugin_tb->insns = g_ptr_array_new(); #endif } -- cgit v1.2.3