aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-02 15:03:12 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-15 19:34:33 +0200
commit1861993f1fc13e42afed6a618c45a5a95a1457ea (patch)
tree2a7e391e7fbe61988ce5e03138dfc0b8a5c20b48 /include
parent8cc04fd9df3b9775eaf0fb1b17d82a1a075aa3ec (diff)
downloadqemu-1861993f1fc13e42afed6a618c45a5a95a1457ea.zip
qemu-1861993f1fc13e42afed6a618c45a5a95a1457ea.tar.gz
qemu-1861993f1fc13e42afed6a618c45a5a95a1457ea.tar.bz2
accel/system: Introduce @x-accel-stats QMP command
Unstable QMP 'x-accel-stats' dispatches to the AccelOpsClass::get_stats() and get_vcpu_stats() handlers. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250715140048.84942-4-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/accel/accel-cpu-ops.h3
-rw-r--r--include/accel/accel-ops.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/accel/accel-cpu-ops.h b/include/accel/accel-cpu-ops.h
index a9191dd..0674764 100644
--- a/include/accel/accel-cpu-ops.h
+++ b/include/accel/accel-cpu-ops.h
@@ -65,6 +65,9 @@ struct AccelOpsClass {
/* handle_interrupt is mandatory. */
void (*handle_interrupt)(CPUState *cpu, int mask);
+ /* get_vcpu_stats: Append statistics of this @cpu to @buf */
+ void (*get_vcpu_stats)(CPUState *cpu, GString *buf);
+
/**
* @get_virtual_clock: fetch virtual clock
* @set_virtual_clock: set virtual clock
diff --git a/include/accel/accel-ops.h b/include/accel/accel-ops.h
index 86a27c3..23a8c24 100644
--- a/include/accel/accel-ops.h
+++ b/include/accel/accel-ops.h
@@ -25,6 +25,8 @@ struct AccelClass {
int (*init_machine)(AccelState *as, MachineState *ms);
bool (*cpu_common_realize)(CPUState *cpu, Error **errp);
void (*cpu_common_unrealize)(CPUState *cpu);
+ /* get_stats: Append statistics to @buf */
+ void (*get_stats)(AccelState *as, GString *buf);
/* system related hooks */
void (*setup_post)(AccelState *as);