aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-03-11 10:42:29 +1100
committerAmit Shah <amit.shah@redhat.com>2014-03-27 15:19:00 +0530
commit9013dca5539186ddca018bebcf2d5da63d061365 (patch)
treeb101429b2b6bdcdf14348606a4d45329ea8d821a /savevm.c
parent4297c8ee6f0ef70e5a71e3387a0fccaa20b04f94 (diff)
downloadqemu-9013dca5539186ddca018bebcf2d5da63d061365.zip
qemu-9013dca5539186ddca018bebcf2d5da63d061365.tar.gz
qemu-9013dca5539186ddca018bebcf2d5da63d061365.tar.bz2
migration: add more traces
This replaces DPRINTF macro with tracepoints. This moves some messages from migration.c to savevm.c. This adds tracepoint to signal about fileds failed to migrate. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index d094fbb..22123be 100644
--- a/savevm.c
+++ b/savevm.c
@@ -81,6 +81,7 @@ static void qemu_announce_self_iter(NICState *nic, void *opaque)
uint8_t buf[60];
int len;
+ trace_qemu_announce_self_iter(qemu_ether_ntoa(&nic->conf->macaddr));
len = announce_self_create(buf, nic->conf->macaddr.a);
qemu_send_packet_raw(qemu_get_queue(nic), buf, len);
@@ -429,6 +430,7 @@ void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
static int vmstate_load(QEMUFile *f, SaveStateEntry *se, int version_id)
{
+ trace_vmstate_load(se->idstr, se->vmsd ? se->vmsd->name : "(old)");
if (!se->vmsd) { /* Old style */
return se->ops->load_state(f, se->opaque, version_id);
}
@@ -437,6 +439,7 @@ static int vmstate_load(QEMUFile *f, SaveStateEntry *se, int version_id)
static void vmstate_save(QEMUFile *f, SaveStateEntry *se)
{
+ trace_vmstate_save(se->idstr, se->vmsd ? se->vmsd->name : "(old)");
if (!se->vmsd) { /* Old style */
se->ops->save_state(f, se->opaque);
return;
@@ -463,6 +466,7 @@ void qemu_savevm_state_begin(QEMUFile *f,
SaveStateEntry *se;
int ret;
+ trace_savevm_state_begin();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
if (!se->ops || !se->ops->set_params) {
continue;
@@ -515,6 +519,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
SaveStateEntry *se;
int ret = 1;
+ trace_savevm_state_iterate();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
if (!se->ops || !se->ops->save_live_iterate) {
continue;
@@ -554,6 +559,8 @@ void qemu_savevm_state_complete(QEMUFile *f)
SaveStateEntry *se;
int ret;
+ trace_savevm_state_complete();
+
cpu_synchronize_all_states();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
@@ -628,6 +635,7 @@ void qemu_savevm_state_cancel(void)
{
SaveStateEntry *se;
+ trace_savevm_state_cancel();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
if (se->ops && se->ops->cancel) {
se->ops->cancel(se->opaque);