1 /* 2 * SPDX-License-Identifier: LGPL-2.1-or-later 3 * 4 * QEMU TCG monitor 5 * 6 * Copyright (c) 2003-2005 Fabrice Bellard 7 */ 8 9 #include "qemu/osdep.h" 10 #include "qapi/error.h" 11 #include "qapi/type-helpers.h" 12 #include "qapi/qapi-commands-machine.h" 13 #include "monitor/monitor.h" 14 #include "system/tcg.h" 15 #include "tcg/tcg.h" 16 #include "internal-common.h" 17 qmp_x_query_jit(Error ** errp)18HumanReadableText *qmp_x_query_jit(Error **errp) 19 { 20 g_autoptr(GString) buf = g_string_new(""); 21 22 if (!tcg_enabled()) { 23 error_setg(errp, "JIT information is only available with accel=tcg"); 24 return NULL; 25 } 26 27 tcg_dump_stats(buf); 28 29 return human_readable_text_from_str(buf); 30 } 31 hmp_tcg_register(void)32static void hmp_tcg_register(void) 33 { 34 monitor_register_hmp_info_hrt("jit", qmp_x_query_jit); 35 } 36 37 type_init(hmp_tcg_register); 38