aboutsummaryrefslogtreecommitdiff
path: root/contrib/plugins/execlog.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2022-09-29 12:42:19 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-10-06 11:53:40 +0100
commit8c1f1020d6e7dd329f5cf0cd8fd108dfb224eaec (patch)
tree20536928c22ad6f777dd8ca544cbf3bf559f0a42 /contrib/plugins/execlog.c
parent7f522743dfcea095fe77755386e980cbb5db4ef4 (diff)
downloadqemu-8c1f1020d6e7dd329f5cf0cd8fd108dfb224eaec.zip
qemu-8c1f1020d6e7dd329f5cf0cd8fd108dfb224eaec.tar.gz
qemu-8c1f1020d6e7dd329f5cf0cd8fd108dfb224eaec.tar.bz2
contrib/plugins: reset skip when matching in execlog
The purpose of the matches was to only track the execution of instructions we care about. Without resetting skip to the value at the start of the block we end up dumping all instructions after the match with the consequent load on the instrumentation. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Alexandre Iooss <erdnaxe@crans.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220929114231.583801-40-alex.bennee@linaro.org>
Diffstat (limited to 'contrib/plugins/execlog.c')
-rw-r--r--contrib/plugins/execlog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index e659ac9..1b3bb7e 100644
--- a/contrib/plugins/execlog.c
+++ b/contrib/plugins/execlog.c
@@ -88,7 +88,7 @@ static void vcpu_insn_exec(unsigned int cpu_index, void *udata)
static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
{
struct qemu_plugin_insn *insn;
- bool skip = (imatches || amatches) ? true : false;
+ bool skip = (imatches || amatches);
size_t n = qemu_plugin_tb_n_insns(tb);
for (size_t i = 0; i < n; i++) {
@@ -147,6 +147,9 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
/* Register callback on instruction */
qemu_plugin_register_vcpu_insn_exec_cb(insn, vcpu_insn_exec,
QEMU_PLUGIN_CB_NO_REGS, output);
+
+ /* reset skip */
+ skip = (imatches || amatches);
}
}