mirror of
https://github.com/qemu/qemu.git
synced 2025-08-08 08:05:17 +00:00
accel/system: Add 'info accel' on human monitor
'info accel' dispatches to the AccelOpsClass::get_stats() and get_vcpu_stats() handlers. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250715140048.84942-5-philmd@linaro.org>
This commit is contained in:
parent
1861993f1f
commit
c10eb74010
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/accel.h"
|
#include "qemu/accel.h"
|
||||||
|
#include "qapi/qapi-commands-accelerator.h"
|
||||||
|
#include "monitor/monitor.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/core/cpu.h"
|
#include "hw/core/cpu.h"
|
||||||
#include "accel/accel-ops.h"
|
#include "accel/accel-ops.h"
|
||||||
@ -103,11 +105,17 @@ void accel_init_ops_interfaces(AccelClass *ac)
|
|||||||
cpus_register_accel(ops);
|
cpus_register_accel(ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void accel_ops_class_init(ObjectClass *oc, const void *data)
|
||||||
|
{
|
||||||
|
monitor_register_hmp_info_hrt("accel", qmp_x_accel_stats);
|
||||||
|
}
|
||||||
|
|
||||||
static const TypeInfo accel_ops_type_info = {
|
static const TypeInfo accel_ops_type_info = {
|
||||||
.name = TYPE_ACCEL_OPS,
|
.name = TYPE_ACCEL_OPS,
|
||||||
.parent = TYPE_OBJECT,
|
.parent = TYPE_OBJECT,
|
||||||
.abstract = true,
|
.abstract = true,
|
||||||
.class_size = sizeof(AccelOpsClass),
|
.class_size = sizeof(AccelOpsClass),
|
||||||
|
.class_init = accel_ops_class_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void accel_system_register_types(void)
|
static void accel_system_register_types(void)
|
||||||
|
@ -267,6 +267,18 @@ ERST
|
|||||||
.cmd = hmp_info_sync_profile,
|
.cmd = hmp_info_sync_profile,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
.name = "accel",
|
||||||
|
.args_type = "",
|
||||||
|
.params = "",
|
||||||
|
.help = "show accelerator info",
|
||||||
|
},
|
||||||
|
|
||||||
|
SRST
|
||||||
|
``info accel``
|
||||||
|
Show accelerator info.
|
||||||
|
ERST
|
||||||
|
|
||||||
SRST
|
SRST
|
||||||
``info sync-profile [-m|-n]`` [*max*]
|
``info sync-profile [-m|-n]`` [*max*]
|
||||||
Show synchronization profiling info, up to *max* entries (default: 10),
|
Show synchronization profiling info, up to *max* entries (default: 10),
|
||||||
|
Loading…
Reference in New Issue
Block a user