[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c
From: |
Richard Henderson |
Subject: |
[PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c |
Date: |
Fri, 15 Mar 2024 15:57:18 -1000 |
This is only used in one place, and usage requires an
out-of-line function.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/qemu/plugin.h | 12 ------------
tcg/tcg.c | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 07b1755990..201889cbee 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -116,18 +116,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;
diff --git a/tcg/tcg.c b/tcg/tcg.c
index d248c52e96..d7abc514c4 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -761,6 +761,18 @@ QEMU_BUILD_BUG_ON((int)(offsetof(CPUNegativeOffsetState,
tlb.f[0]) -
< MIN_TLB_MASK_TABLE_OFS);
#endif
+#ifdef CONFIG_PLUGIN
+/*
+ * We don't expect to cleanup many of these structures.
+ * They are reused for each fresh translation.
+ */
+static 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);
+}
+#endif
+
static void alloc_tcg_plugin_context(TCGContext *s)
{
#ifdef CONFIG_PLUGIN
--
2.34.1
- [PATCH 12/22] plugins: Remove plugin helpers, (continued)
- [PATCH 12/22] plugins: Remove plugin helpers, Richard Henderson, 2024/03/15
- [PATCH 13/22] tcg: Remove TCG_CALL_PLUGIN, Richard Henderson, 2024/03/15
- [PATCH 14/22] tcg: Remove INDEX_op_plugin_cb_{start,end}, Richard Henderson, 2024/03/15
- [PATCH 18/22] plugins: Split out common cb expanders, Richard Henderson, 2024/03/15
- [PATCH 19/22] plugins: Merge qemu_plugin_tb_insn_get to plugin-gen.c, Richard Henderson, 2024/03/15
- [PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c,
Richard Henderson <=
- [PATCH 21/22] plugins: Inline plugin_gen_empty_callback, Richard Henderson, 2024/03/15
- [PATCH 22/22] plugins: Update the documentation block for plugin-gen.c, Richard Henderson, 2024/03/15
- [PATCH 16/22] plugins: Introduce PLUGIN_CB_MEM_REGULAR, Richard Henderson, 2024/03/15
- [PATCH 17/22] plugins: Replace pr_ops with a proper debug dump flag, Richard Henderson, 2024/03/15
- [PATCH 15/22] plugins: Simplify callback queues, Richard Henderson, 2024/03/15