[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/7] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpe
From: |
Richard Henderson |
Subject: |
[PATCH v2 7/7] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers |
Date: |
Fri, 10 Mar 2023 11:52:52 -0800 |
Now that we've broken the include loop with cpu.h,
we can bring this inline.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/qemu/plugin.h | 6 +++++-
plugins/core.c | 11 -----------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 6bf4bce188..bc0781cab8 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -14,6 +14,7 @@
#include "qemu/option.h"
#include "qemu/plugin-event.h"
#include "exec/memopidx.h"
+#include "hw/core/cpu.h"
/*
* Option parsing/processing.
@@ -204,7 +205,10 @@ void qemu_plugin_atexit_cb(void);
void qemu_plugin_add_dyn_cb_arr(GArray *arr);
-void qemu_plugin_disable_mem_helpers(CPUState *cpu);
+static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu)
+{
+ cpu->plugin_mem_cbs = NULL;
+}
/**
* qemu_plugin_user_exit(): clean-up callbacks before calling exit callbacks
diff --git a/plugins/core.c b/plugins/core.c
index 04632886b9..9912f2cfdb 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -553,17 +553,6 @@ void qemu_plugin_user_postfork(bool is_child)
}
}
-
-/*
- * Call this function after longjmp'ing to the main loop. It's possible that
the
- * last instruction of a TB might have used helpers, and therefore the
- * "disable" instruction will never execute because it ended up as dead code.
- */
-void qemu_plugin_disable_mem_helpers(CPUState *cpu)
-{
- cpu->plugin_mem_cbs = NULL;
-}
-
static bool plugin_dyn_cb_arr_cmp(const void *ap, const void *bp)
{
return ap == bp;
--
2.34.1
- [PATCH v2 0/7] plugin: fix clearing of plugin_mem_cbs on TB exit, Richard Henderson, 2023/03/10
- [PATCH v2 1/7] tcg: Clear plugin_mem_cbs on TB exit, Richard Henderson, 2023/03/10
- [PATCH v2 2/7] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb, Richard Henderson, 2023/03/10
- [PATCH v2 3/7] include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT, Richard Henderson, 2023/03/10
- [PATCH v2 5/7] *: Add missing includes of qemu/plugin.h, Richard Henderson, 2023/03/10
- [PATCH v2 4/7] *: Add missing includes of qemu/error-report.h, Richard Henderson, 2023/03/10
- [PATCH v2 6/7] include/qemu: Split out plugin-event.h, Richard Henderson, 2023/03/10
- [PATCH v2 7/7] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers,
Richard Henderson <=
- Re: [PATCH v2 0/7] plugin: fix clearing of plugin_mem_cbs on TB exit, Alex Bennée, 2023/03/13
- Re: [PATCH v2 0/7] plugin: fix clearing of plugin_mem_cbs on TB exit, Emilio Cota, 2023/03/19