mirror of
https://github.com/mborgerson/xemu.git
synced 2026-03-12 22:44:49 +00:00
Declare tcg_dump_stats() in "tcg/tcg.h" so it can be used out of
accel/tcg/, like by {bsd,linux}-user.
Next commit will register the TCG AccelClass::get_stats handler,
which expects a AccelState, so propagate it to dump_accel_info().
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250715140048.84942-6-philmd@linaro.org>
38 lines
782 B
C
38 lines
782 B
C
/*
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
*
|
|
* QEMU TCG monitor
|
|
*
|
|
* Copyright (c) 2003-2005 Fabrice Bellard
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "qapi/error.h"
|
|
#include "qapi/type-helpers.h"
|
|
#include "qapi/qapi-commands-machine.h"
|
|
#include "monitor/monitor.h"
|
|
#include "system/tcg.h"
|
|
#include "tcg/tcg.h"
|
|
#include "internal-common.h"
|
|
|
|
HumanReadableText *qmp_x_query_jit(Error **errp)
|
|
{
|
|
g_autoptr(GString) buf = g_string_new("");
|
|
|
|
if (!tcg_enabled()) {
|
|
error_setg(errp, "JIT information is only available with accel=tcg");
|
|
return NULL;
|
|
}
|
|
|
|
tcg_dump_stats(buf);
|
|
|
|
return human_readable_text_from_str(buf);
|
|
}
|
|
|
|
static void hmp_tcg_register(void)
|
|
{
|
|
monitor_register_hmp_info_hrt("jit", qmp_x_query_jit);
|
|
}
|
|
|
|
type_init(hmp_tcg_register);
|