aboutsummaryrefslogtreecommitdiff
path: root/plugins/plugin.h
diff options
context:
space:
mode:
authorPierrick Bouvier <pierrick.bouvier@linaro.org>2024-05-14 18:42:49 +0100
committerAlex Bennée <alex.bennee@linaro.org>2024-05-16 08:55:02 +0100
commit7de77d37880d7267a491cb32a1b2232017d1e545 (patch)
tree70d92e3875ebf046b953d163b1999310a30865b6 /plugins/plugin.h
parenta1c9bf2514d82b757288ee61584e667ddcb19a4f (diff)
plugins: conditional callbacks
Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an immediate (op2). Callback is called if op1 |cond| op2 is true. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240502211522.346467-6-pierrick.bouvier@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> [AJB: fix re-base conflict with tb_is_mem_only()] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240514174253.694591-8-alex.bennee@linaro.org>
Diffstat (limited to 'plugins/plugin.h')
-rw-r--r--plugins/plugin.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/plugin.h b/plugins/plugin.h
index 7c34f23cfc..7d4b4e21f7 100644
--- a/plugins/plugin.h
+++ b/plugins/plugin.h
@@ -93,6 +93,14 @@ plugin_register_dyn_cb__udata(GArray **arr,
qemu_plugin_vcpu_udata_cb_t cb,
enum qemu_plugin_cb_flags flags, void *udata);
+void
+plugin_register_dyn_cond_cb__udata(GArray **arr,
+ qemu_plugin_vcpu_udata_cb_t cb,
+ enum qemu_plugin_cb_flags flags,
+ enum qemu_plugin_cond cond,
+ qemu_plugin_u64 entry,
+ uint64_t imm,
+ void *udata);
void plugin_register_vcpu_mem_cb(GArray **arr,
void *cb,