aboutsummaryrefslogtreecommitdiff
path: root/host-common
diff options
context:
space:
mode:
authorYahan Zhou <yahan@google.com>2024-06-14 16:19:57 -0700
committerYahan Zhou <yahan@google.com>2024-06-18 15:52:55 -0700
commitce859edf4aad8886e515c1858eab5855b878a588 (patch)
tree46491681b455a87cbb57c7399dc65c75634154a0 /host-common
parent2b015bde68c49d089393e561fa06b69b1913de34 (diff)
downloadaemu-master.tar.gz
Add stats for Vulkan snapshotHEADmastermain
Bug: 330212543 Change-Id: Idc95659a4189d4214fd2ae095f4403db0321ff8e
Diffstat (limited to 'host-common')
-rw-r--r--host-common/include/host-common/vm_operations.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/host-common/include/host-common/vm_operations.h b/host-common/include/host-common/vm_operations.h
index 5dcd6c1..9d46f57 100644
--- a/host-common/include/host-common/vm_operations.h
+++ b/host-common/include/host-common/vm_operations.h
@@ -159,6 +159,12 @@ typedef enum EmuRunState {
QEMU_RUN_STATE__MAX = 16,
} EmuRunState;
+typedef enum SnapshotSkipReason {
+ SNAPSHOT_SKIP_UNKNOWN = 0,
+ SNAPSHOT_SKIP_UNSUPPORTED_VK_APP = 1,
+ SNAPSHOT_SKIP_UNSUPPORTED_VK_API = 2,
+} SnapshotSkipReason;
+
// C interface to expose Qemu implementations of common VM related operations.
typedef struct QAndroidVmOperations {
bool (*vmStop)(void);
@@ -251,5 +257,17 @@ typedef struct QAndroidVmOperations {
// Reset the machine
void (*system_shutdown_request)(QemuShutdownCause reason);
+
+ // Set the reason to skip snapshotting on exit.
+ void (*setSkipSnapshotSaveReason)(SnapshotSkipReason reason);
+
+ // Get the reason to skip snapshotting on exit.
+ SnapshotSkipReason (*getSkipSnapshotSaveReason)();
+
+ // Set Vulkan snapshot is actively used, for stats.
+ void (*setStatSnapshotUseVulkan)(void);
+
+ // Check if Vulkan snapshot is actively used, for stats.
+ bool (*snapshotUseVulkan)();
} QAndroidVmOperations;
ANDROID_END_HEADER