From e6c9172170e03c7af5016aed8fd44033c8e54164 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 15 Feb 2013 13:32:13 +0000 Subject: tools/xc: log pid in xc_save/xc_restore output If several migrations log their output to xend.log its not clear which line belongs to a which guest. Print entry/exit of xc_save and xc_restore and also request to print pid with each log call. Signed-off-by: Olaf Hering Acked-by: Ian Campbell Committed-by: Ian Campbell --- tools/libxc/xc_domain_restore.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/libxc/xc_domain_restore.c') diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index 92ad3346f9..5ef2fa3e8a 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1456,6 +1456,8 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, struct restore_ctx *ctx = &_ctx; struct domain_info_context *dinfo = &ctx->dinfo; + DPRINTF("%s: starting restore of new domid %u", __func__, dom); + pagebuf_init(&pagebuf); memset(&tailbuf, 0, sizeof(tailbuf)); tailbuf.ishvm = hvm; @@ -1485,7 +1487,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, PERROR("read: p2m_size"); goto out; } - DPRINTF("xc_domain_restore start: p2m_size = %lx\n", dinfo->p2m_size); + DPRINTF("%s: p2m_size = %lx\n", __func__, dinfo->p2m_size); if ( !get_platform_info(xch, dom, &ctx->max_mfn, &ctx->hvirt_start, &ctx->pt_levels, &dinfo->guest_width) ) @@ -2300,7 +2302,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, fcntl(io_fd, F_SETFL, orig_io_fd_flags); - DPRINTF("Restore exit with rc=%d\n", rc); + DPRINTF("Restore exit of domid %u with rc=%d\n", dom, rc); return rc; } -- cgit v1.2.3