[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/46] qemu_loadvm debug
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH 13/46] qemu_loadvm debug |
Date: |
Fri, 4 Jul 2014 18:41:24 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Add lots of DPRINTF debug in qemu_loadvm*
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
savevm.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/savevm.c b/savevm.c
index 16b672b..662a910 100644
--- a/savevm.c
+++ b/savevm.c
@@ -719,6 +719,8 @@ int qemu_savevm_state_iterate(QEMUFile *f)
trace_savevm_section_end(se->idstr, se->section_id);
if (ret < 0) {
+ DPRINTF("%s: setting error state after iterate on id=%d/%s",
+ __func__, se->section_id, se->idstr);
qemu_file_set_error(f, ret);
}
if (ret <= 0) {
@@ -1018,6 +1020,7 @@ int qemu_loadvm_state(QEMUFile *f)
SaveStateEntry *se;
char idstr[256];
+ DPRINTF("qemu_loadvm_state loop: section_type=%d", section_type);
switch (section_type) {
case QEMU_VM_SECTION_START:
case QEMU_VM_SECTION_FULL:
@@ -1031,6 +1034,9 @@ int qemu_loadvm_state(QEMUFile *f)
instance_id = qemu_get_be32(f);
version_id = qemu_get_be32(f);
+ DPRINTF("qemu_loadvm_state loop START/FULL: id=%d(%s)",
+ section_id, idstr);
+
/* Find savevm section */
se = find_se(idstr, instance_id);
if (se == NULL) {
@@ -1058,8 +1064,9 @@ int qemu_loadvm_state(QEMUFile *f)
ret = vmstate_load(f, le->se, le->version_id);
if (ret < 0) {
- fprintf(stderr, "qemu: warning: error while loading state for
instance 0x%x of device '%s'\n",
- instance_id, idstr);
+ error_report("qemu: error while loading state for"
+ "instance 0x%x of device '%s'",
+ instance_id, idstr);
goto out;
}
break;
@@ -1067,23 +1074,25 @@ int qemu_loadvm_state(QEMUFile *f)
case QEMU_VM_SECTION_END:
section_id = qemu_get_be32(f);
+ DPRINTF("QEMU_VM_SECTION_PART/END entry for id=%d", section_id);
QLIST_FOREACH(le, &loadvm_handlers, entry) {
if (le->section_id == section_id) {
break;
}
}
if (le == NULL) {
- fprintf(stderr, "Unknown savevm section %d\n", section_id);
+ error_report("Unknown savevm section %d", section_id);
ret = -EINVAL;
goto out;
}
ret = vmstate_load(f, le->se, le->version_id);
if (ret < 0) {
- fprintf(stderr, "qemu: warning: error while loading state
section id %d\n",
- section_id);
+ error_report("qemu: error while loading state section"
+ " id %d (%s)", section_id, le->se->idstr);
goto out;
}
+ DPRINTF("QEMU_VM_SECTION_PART/END done for id=%d", section_id);
break;
case QEMU_VM_COMMAND:
ret = loadvm_process_command(f);
@@ -1092,11 +1101,12 @@ int qemu_loadvm_state(QEMUFile *f)
}
break;
default:
- fprintf(stderr, "Unknown savevm section type %d\n", section_type);
+ error_report("Unknown savevm section type %d", section_type);
ret = -EINVAL;
goto out;
}
}
+ DPRINTF("qemu_loadvm_state loop: exited loop");
cpu_synchronize_all_post_init();
@@ -1112,6 +1122,7 @@ out:
ret = qemu_file_get_error(f);
}
+ DPRINTF("qemu_loadvm_state out: ret=%d", ret);
return ret;
}
--
1.9.3
- Re: [Qemu-devel] [PATCH 15/46] Rework loadvm path for subloops, (continued)
[Qemu-devel] [PATCH 40/46] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 21/46] postcopy: OS support test, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 22/46] Migration parameters: Add qmp/hmp commands for setting/viewing, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 19/46] migrate_init: Call from savevm, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 20/46] Allow savevm handlers to state whether they could go into postcopy, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 41/46] Handle userfault requests (although userfaultfd not done yet), Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 13/46] qemu_loadvm debug,
Dr. David Alan Gilbert (git) <=
[Qemu-devel] [PATCH 14/46] ram_debug_dump_bitmap: Dump a migration bitmap as text, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 18/46] QEMU_VM_CMD_PACKAGED: Send a packaged chunk of migration stream, Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 42/46] Start up a postcopy/listener thread ready for incoming page data, Dr. David Alan Gilbert (git), 2014/07/04
Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Paolo Bonzini, 2014/07/05
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Dr. David Alan Gilbert, 2014/07/07
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Paolo Bonzini, 2014/07/07
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Dr. David Alan Gilbert, 2014/07/07
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Dr. David Alan Gilbert, 2014/07/10
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Eric Blake, 2014/07/10
- Re: [Qemu-devel] [PATCH 00/46] Postcopy implementation, Dr. David Alan Gilbert, 2014/07/10