[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 1/3] migration: add "exists" info to load-state-field trace
From: |
marcandre . lureau |
Subject: |
[PATCH v4 1/3] migration: add "exists" info to load-state-field trace |
Date: |
Thu, 16 May 2024 12:40:20 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
migration/vmstate.c | 5 +++--
migration/trace-events | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/migration/vmstate.c b/migration/vmstate.c
index ef26f26ccd..b51212a75b 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -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);
diff --git a/migration/trace-events b/migration/trace-events
index d0c44c3853..0b7c3324fb 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -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"
--
2.41.0.28.gd7d8841f67
- [PATCH v4 0/3] Fix "virtio-gpu: fix scanout migration post-load", marcandre . lureau, 2024/05/16
- [PATCH v4 1/3] migration: add "exists" info to load-state-field trace,
marcandre . lureau <=
- [PATCH v4 2/3] migration: fix a typo, marcandre . lureau, 2024/05/16
- [PATCH v4 3/3] virtio-gpu: fix v2 migration, marcandre . lureau, 2024/05/16
- Re: [PATCH v4 0/3] Fix "virtio-gpu: fix scanout migration post-load", Fiona Ebner, 2024/05/16
- Re: [PATCH v4 0/3] Fix "virtio-gpu: fix scanout migration post-load", Peter Xu, 2024/05/16
- Re: [PATCH v4 0/3] Fix "virtio-gpu: fix scanout migration post-load", Fabiano Rosas, 2024/05/22