[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 39/51] contrib/plugins: reset skip when matching in execlog
From: |
Alex Bennée |
Subject: |
[PATCH v1 39/51] contrib/plugins: reset skip when matching in execlog |
Date: |
Thu, 29 Sep 2022 12:42:19 +0100 |
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: <20220921160801.1490125-10-alex.bennee@linaro.org>
---
v2
- drop the ? bool ternary for skip
---
contrib/plugins/execlog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index e659ac9cbb..1b3bb7ebba 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);
}
}
--
2.34.1
- [PATCH v1 49/51] contrib/gitdm: add WANG Xuerui to individual contributers, (continued)
- [PATCH v1 49/51] contrib/gitdm: add WANG Xuerui to individual contributers, Alex Bennée, 2022/09/29
- [PATCH v1 23/51] tests/tcg: clean up calls to run-test, Alex Bennée, 2022/09/29
- [PATCH v1 47/51] contrib/gitdm: add mapping for Loongson Technology, Alex Bennée, 2022/09/29
- [PATCH v1 18/51] configure: store container engine in config-host.mak, Alex Bennée, 2022/09/29
- [PATCH v1 20/51] tests/tcg: remove -f from Makefile invocation, Alex Bennée, 2022/09/29
- [PATCH v1 48/51] contrib/gitdm: add Paul to individual contributors, Alex Bennée, 2022/09/29
- [PATCH v1 50/51] contrib/gitdm: add ISCAS to the academics group, Alex Bennée, 2022/09/29
- [PATCH v1 44/51] gdbstub: move breakpoint logic to accel ops, Alex Bennée, 2022/09/29
- [PATCH v1 33/51] disas: generalise plugin_printf and use for monitor_disas, Alex Bennée, 2022/09/29
- [PATCH v1 42/51] gdbstub: move into its own sub directory, Alex Bennée, 2022/09/29
- [PATCH v1 39/51] contrib/plugins: reset skip when matching in execlog,
Alex Bennée <=
- [PATCH v1 35/51] plugins: extend execlog to filter matches, Alex Bennée, 2022/09/29
- [PATCH v1 26/51] configure: unify creation of cross-compilation Makefiles, Alex Bennée, 2022/09/29
- [PATCH v1 22/51] tests/tcg: unify ppc64 and ppc64le Makefiles, Alex Bennée, 2022/09/29
- [PATCH v1 32/51] monitor: expose monitor_puts to rest of code, Alex Bennée, 2022/09/29
- [PATCH v1 41/51] semihosting: update link to spec, Alex Bennée, 2022/09/29
- [PATCH v1 30/51] pc-bios/s390-ccw: Adopt meson style Make output, Alex Bennée, 2022/09/29
- [PATCH v1 51/51] contrib/gitdm: add China Telecom to the domain map, Alex Bennée, 2022/09/29
- [PATCH v1 40/51] docs/devel: document the test plugins, Alex Bennée, 2022/09/29
- [PATCH v1 46/51] accel/kvm: move kvm_update_guest_debug to inline stub, Alex Bennée, 2022/09/29
- [PATCH v1 31/51] pc-bios/vof: Adopt meson style Make output, Alex Bennée, 2022/09/29