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>
This commit is contained in:
parent
3a247368e6
commit
36bc99bc78
5 changed files with 14 additions and 48 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue