aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2016-02-18 13:16:53 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-02-22 18:40:28 +0100
commit2264c2c96e0a1f0913412da73e9bcaf9f8fa4427 (patch)
treef0cf19bf89e0eb79998f1036d5cc25fc18461852 /include/sysemu
parent1fbeff72c2ba17aedfbf0d57caf8945862725c54 (diff)
DumpState: adding total_size and written_size fields
Here, total_size is the size in bytes to be dumped (raw data, which means before compression), while written_size are bytes handled (raw size too). Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1455772616-8668-9-git-send-email-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/dump.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 06393c3f8f..ef931be469 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -182,6 +182,15 @@ typedef struct DumpState {
bool has_format; /* whether format is provided */
DumpGuestMemoryFormat format; /* valid only if has_format == true */
QemuThread dump_thread; /* thread for detached dump */
+
+ int64_t total_size; /* total memory size (in bytes) to
+ * be dumped. When filter is
+ * enabled, this will only count
+ * those to be written. */
+ int64_t written_size; /* written memory size (in bytes),
+ * this could be used to calculate
+ * how much work we have
+ * finished. */
} DumpState;
uint16_t cpu_to_dump16(DumpState *s, uint16_t val);