diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2024-04-03 09:20:06 -1000 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2024-05-15 08:55:18 +0200 |
| commit | 36bc99bc789fd564facea93feb2a22e4942b84d0 (patch) | |
| tree | 06c80475b1c2a88198d9e546ccb37b000e32ac7c /include/qemu/plugin.h | |
| parent | 3a247368e6fc12304e73451c63254313e2ebd60e (diff) | |
| download | focaccia-qemu-36bc99bc789fd564facea93feb2a22e4942b84d0.tar.gz focaccia-qemu-36bc99bc789fd564facea93feb2a22e4942b84d0.zip | |
plugins: Use translator_st for qemu_plugin_insn_data
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é <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/plugin.h')
| -rw-r--r-- | include/qemu/plugin.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index b535bfd5de..c8dd2c42fa 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -98,11 +98,11 @@ struct qemu_plugin_dyn_cb { /* Internal context for instrumenting an instruction */ struct qemu_plugin_insn { - GByteArray *data; uint64_t vaddr; void *haddr; GArray *insn_cbs; GArray *mem_cbs; + uint8_t len; bool calls_helpers; /* if set, the instruction calls helpers that might access guest memory */ @@ -117,18 +117,6 @@ struct qemu_plugin_scoreboard { QLIST_ENTRY(qemu_plugin_scoreboard) entry; }; -/* - * qemu_plugin_insn allocate and cleanup functions. We don't expect to - * cleanup many of these structures. They are reused for each fresh - * translation. - */ - -static inline void qemu_plugin_insn_cleanup_fn(gpointer data) -{ - struct qemu_plugin_insn *insn = (struct qemu_plugin_insn *) data; - g_byte_array_free(insn->data, true); -} - /* Internal context for this TranslationBlock */ struct qemu_plugin_tb { GPtrArray *insns; |