Commit 62703478 authored by Xing Lin's avatar Xing Lin

print vm->name in timestamp

Signed-off-by: Xing Lin's avatarXing Lin <xinglin@cs.utah.edu>
parent 6259623b
......@@ -13185,7 +13185,8 @@ static double getSeconds(struct timespec time) {
}
static int
qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
qemuDomainSnapshotCreateActiveExternal(virDomainPtr domain,
virConnectPtr conn,
virQEMUDriverPtr driver,
virDomainObjPtr *vmptr,
virDomainSnapshotObjPtr snap,
......@@ -13307,8 +13308,8 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
QEMU_ASYNC_JOB_SNAPSHOT)) < 0)
goto endjob;
clock_gettime(clock_id, &end);
VIR_INFO("[SNAPSHOT]: SaveMemory starts at %.3f s, ends at %.3f s, takes %.3f s \n",
getSeconds(start), getSeconds(end), getTimeDiff(start,end));
VIR_INFO("[SNAPSHOT]: VM %s SaveMemory starts at %.3f s, ends at %.3f s, takes %.3f s \n",
domain->name, getSeconds(start), getSeconds(end), getTimeDiff(start,end));
/* the memory image was created, remove it on errors */
memory_unlink = true;
......@@ -13331,8 +13332,8 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
QEMU_ASYNC_JOB_SNAPSHOT)) < 0)
goto endjob;
clock_gettime(clock_id, &end);
VIR_INFO("[SNAPSHOT]: CreateDiskSnapshot starts at %.3f s, ends at %.3f s, takes %.3f s \n",
getSeconds(start), getSeconds(end), getTimeDiff(start,end));
VIR_INFO("[SNAPSHOT]: VM %s CreateDiskSnapshot starts at %.3f s, ends at %.3f s, takes %.3f s \n",
domain->name, getSeconds(start), getSeconds(end), getTimeDiff(start,end));
/* the snapshot is complete now */
if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_HALT) {
virObjectEventPtr event;
......@@ -13398,7 +13399,7 @@ endjob:
}
clock_gettime(clock_id, &snapComplete);
VIR_INFO("[SNAPSHOT]: VM resume at %.3f \n", getSeconds(snapComplete));
VIR_INFO("[SNAPSHOT]: VM %s resume at %.3f \n", domain->name, getSeconds(snapComplete));
if (vm && thaw != 0 &&
qemuDomainSnapshotFSThaw(vm, thaw > 0) < 0) {
......@@ -13694,7 +13695,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY ||
snap->def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) {
/* external checkpoint or disk snapshot */
if (qemuDomainSnapshotCreateActiveExternal(domain->conn, driver,
if (qemuDomainSnapshotCreateActiveExternal(domain, domain->conn, driver,
&vm, snap, flags) < 0)
goto cleanup;
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment