From: Ian Campbell <Ian.Campbell@citrix.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 2 of 2] libxc: Print domain ID in save restore messages
Date: Fri, 9 Mar 2012 10:19:35 -0800 [thread overview]
Message-ID: <1331317175.3560.41.camel@cthulhu.hellion.org.uk> (raw)
In-Reply-To: <948cd3f4d40f28f15d89.1331314178@drall.uk.xensource.com>
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@eu.citrix.com>
>
> 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.
Ian.
next prev parent reply other threads:[~2012-03-09 18:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 17:29 [PATCH 0 of 2] libxc: Print domain ID with libxc save/restore messages George Dunlap
2012-03-09 17:29 ` [PATCH 1 of 2] libxc: Pass the save_ctx struct to more functions George Dunlap
2012-03-13 16:15 ` Ian Jackson
2012-03-09 17:29 ` [PATCH 2 of 2] libxc: Print domain ID in save restore messages George Dunlap
2012-03-09 18:19 ` Ian Campbell [this message]
2012-03-09 18:25 ` George Dunlap
2012-03-09 18:33 ` Ian Campbell
2012-03-12 10:37 ` George Dunlap
2012-03-12 10:41 ` Ian Campbell
2012-03-13 16:15 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331317175.3560.41.camel@cthulhu.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).