mirror of https://github.com/xemu-project/xemu.git
migration: add "exists" info to load-state-field trace
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
3dc27fac25
commit
3f879f2f31
|
@ -58,7 +58,7 @@ postcopy_page_req_sync(void *host_addr) "sync page req %p"
|
|||
vmstate_load_field_error(const char *field, int ret) "field \"%s\" load failed, ret = %d"
|
||||
vmstate_load_state(const char *name, int version_id) "%s v%d"
|
||||
vmstate_load_state_end(const char *name, const char *reason, int val) "%s %s/%d"
|
||||
vmstate_load_state_field(const char *name, const char *field) "%s:%s"
|
||||
vmstate_load_state_field(const char *name, const char *field, bool exists) "%s:%s exists=%d"
|
||||
vmstate_n_elems(const char *name, int n_elems) "%s: %d"
|
||||
vmstate_subsection_load(const char *parent) "%s"
|
||||
vmstate_subsection_load_bad(const char *parent, const char *sub, const char *sub2) "%s: %s/%s"
|
||||
|
|
|
@ -128,8 +128,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
}
|
||||
}
|
||||
while (field->name) {
|
||||
trace_vmstate_load_state_field(vmsd->name, field->name);
|
||||
if (vmstate_field_exists(vmsd, field, opaque, version_id)) {
|
||||
bool exists = vmstate_field_exists(vmsd, field, opaque, version_id);
|
||||
trace_vmstate_load_state_field(vmsd->name, field->name, exists);
|
||||
if (exists) {
|
||||
void *first_elem = opaque + field->offset;
|
||||
int i, n_elems = vmstate_n_elems(opaque, field);
|
||||
int size = vmstate_size(opaque, field);
|
||||
|
|
Loading…
Reference in New Issue