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

Re: [Xen-devel] [PATCH 2 of 2] libxc: Print domain ID in save restore messages

On Fri, 2012-03-09 at 12:29 -0500, George Dunlap wrote:
> XenServer redirects all libxc output to /var/log/messages, so when a
> large stress test is running, it's hard to tell which message belongs
> to which domain.
> This patch adds the domain ID to output made by the save/restore
> functions.
> To do this, we introduce a layer of indirection in the libxc print
> macros, so that they can be "interposed on" by individual functions.
> We then add the domain ID to the context structs in the save and restore
> paths, and replace the toplevel macros with ones which add the domain to the
> output.
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
> --- a/tools/libxc/xc_domain_restore.c
> +++ b/tools/libxc/xc_domain_restore.c
> @@ -33,7 +33,20 @@
>  #include <xen/hvm/ioreq.h>
>  #include <xen/hvm/params.h>
> +/* Override default output f'ns with functions that include the domain id */
> +#undef IPRINTF
> +#define IPRINTF(_F, _A...) _IPRINTF("d%d:" _F, ctx->dom, ## _A)

I think

#define DIPRINTF(_F, _A...) IPRINTF("d%s:" _F, ctx->dom, ## _A)

(or DOMIPRINTF etc) would end up looking nicer than these undef and the
_IPRINTFs you've had to scatter around the place.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.