aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-03 12:16:27 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-04 12:08:13 +0200
commita472390e800825f8544b7aa7a3503b6a4ae4bec2 (patch)
tree28487252b9dae852d2ec2228fcb3e859aacb4649
parent04fbbeb7655372f500a7e1d610202a08a50cc364 (diff)
downloadqemu-a472390e800825f8544b7aa7a3503b6a4ae4bec2.zip
qemu-a472390e800825f8544b7aa7a3503b6a4ae4bec2.tar.gz
qemu-a472390e800825f8544b7aa7a3503b6a4ae4bec2.tar.bz2
accel/tcg: Factor tcg_dump_stats() out for re-use
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250703173248.44995-11-philmd@linaro.org>
-rw-r--r--accel/tcg/internal-common.h2
-rw-r--r--accel/tcg/monitor.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h
index 1dbc45d..77a3a06 100644
--- a/accel/tcg/internal-common.h
+++ b/accel/tcg/internal-common.h
@@ -139,4 +139,6 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr);
+void tcg_dump_stats(GString *buf);
+
#endif
diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c
index 6d9cc11..e7ed728 100644
--- a/accel/tcg/monitor.c
+++ b/accel/tcg/monitor.c
@@ -200,6 +200,13 @@ static void dump_exec_info(GString *buf)
tcg_dump_flush_info(buf);
}
+void tcg_dump_stats(GString *buf)
+{
+ dump_accel_info(buf);
+ dump_exec_info(buf);
+ dump_drift_info(buf);
+}
+
HumanReadableText *qmp_x_query_jit(Error **errp)
{
g_autoptr(GString) buf = g_string_new("");
@@ -209,9 +216,7 @@ HumanReadableText *qmp_x_query_jit(Error **errp)
return NULL;
}
- dump_accel_info(buf);
- dump_exec_info(buf);
- dump_drift_info(buf);
+ tcg_dump_stats(buf);
return human_readable_text_from_str(buf);
}