Factor tcg_get_stats() out of tcg_dump_stats(),
passing the current accelerator argument to match
the AccelClass::get_stats() prototype.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20250715140048.84942-7-philmd@linaro.org>
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_get_stats(AccelState *accel, GString *buf);
+
#endif
ac->init_machine = tcg_init_machine;
ac->cpu_common_realize = tcg_exec_realizefn;
ac->cpu_common_unrealize = tcg_exec_unrealizefn;
+ ac->get_stats = tcg_get_stats;
ac->allowed = &tcg_allowed;
ac->gdbstub_supported_sstep_flags = tcg_gdbstub_supported_sstep_flags;
tcg_dump_flush_info(buf);
}
-void tcg_dump_stats(GString *buf)
+void tcg_get_stats(AccelState *accel, GString *buf)
{
- dump_accel_info(current_accel(), buf);
+ dump_accel_info(accel, buf);
dump_exec_info(buf);
dump_drift_info(buf);
}
+
+void tcg_dump_stats(GString *buf)
+{
+ tcg_get_stats(current_accel(), buf);
+}