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:
Marc-André Lureau 2024-05-16 12:40:20 +04:00 committed by Fabiano Rosas
parent 3dc27fac25
commit 3f879f2f31
2 changed files with 4 additions and 3 deletions

View file

@ -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);