[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 7/9] Improve debug logging of migration APIs



2011/5/24 Daniel P. Berrange <berrange redhat com>:
> * src/libvirt.c: Add further debug lines in helper APIs for
>  migration
> * src/qemu/qemu_migration.c: Add debug lines for all internal
>  migration API parameters
> ---
>  src/libvirt.c             |   19 ++++++++++++++++-
>  src/qemu/qemu_migration.c |   47 ++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 63 insertions(+), 3 deletions(-)

> @@ -1292,6 +1304,10 @@ static int doNativeMigrate(struct qemud_driver *driver,
>     qemuDomainObjPrivatePtr priv = vm->privateData;
>     unsigned int background_flags = QEMU_MONITOR_MIGRATE_BACKGROUND;
>     qemuMigrationCookiePtr mig = NULL;
> +    VIR_DEBUG("driver=%p, vm=%p, uri=%s, cookiein=%s, cookieinlen=%d, "
> +              "cookieout=%p, cookieoutlen=%p, flags=%u, dname=%s, resource=%lu",
> +              driver, vm, uri, NULLSTR(cookiein), cookieinlen,
> +              cookieout, cookieoutlen, flags, dname, resource);

dname can be NULL, needs to be NULLSTR(dname).

> @@ -1685,6 +1705,10 @@ static int doPeer2PeerMigrate2(struct qemud_driver *driver,
>     virErrorPtr orig_err = NULL;
>     int cancelled;
>     virStreamPtr st = NULL;
> +    VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, vm=%p, dconnuri=%s, "
> +              "flags=%lu, dname=%s, resource=%lu",
> +              driver, sconn, dconn, vm, NULLSTR(dconnuri),
> +              flags, dname, resource);

dname can be NULL, needs to be NULLSTR(dname).

> @@ -1824,8 +1848,11 @@ static int doPeer2PeerMigrate3(struct qemud_driver *driver,
>     virErrorPtr orig_err = NULL;
>     int cancelled;
>     virStreamPtr st = NULL;
> +    VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, vm=%p, xmlin=%s, "
> +              "dconnuri=%s, uri=%s, flags=%lu, dname=%s, resource=%lu",
> +              driver, sconn, dconn, vm, NULLSTR(xmlin),
> +              NULLSTR(dconnuri), NULLSTR(uri), flags, dname, resource);

dname can be NULL, needs to be NULLSTR(dname).

> @@ -1983,6 +2010,10 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
>     virConnectPtr dconn = NULL;
>     bool p2p;
>     bool v3;
> +    VIR_DEBUG("driver=%p, sconn=%p, vm=%p, xmlin=%s, dconnuri=%s, "
> +              "uri=%s, flags=%lu, dname=%s, resource=%lu",
> +              driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
> +              NULLSTR(uri), flags, dname, resource);

And again dname.

> @@ -2053,6 +2084,12 @@ int qemuMigrationPerform(struct qemud_driver *driver,
>     int ret = -1;
>     int resume = 0;
>     qemuDomainObjPrivatePtr priv = vm->privateData;
> +    VIR_DEBUG("driver=%p, conn=%p, vm=%p, xmlin=%s, dconnuri=%s, "
> +              "uri=%s, cookiein=%s, cookieinlen=%d, cookieout=%p, "
> +              "cookieoutlen=%p, flags=%lu, dname=%s, resource=%lu, v3proto=%d",
> +              driver, conn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
> +              NULLSTR(uri), NULLSTR(cookiein), cookieinlen,
> +              cookieout, cookieoutlen, flags, dname, resource, v3proto);

And another dname.

ACK, with this dnames wrapped in NULLSTR.

Matthias


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]