From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH] Improve debug output from ckpt_notify_error()
Date: Tue, 18 Aug 2009 15:03:01 -0400 [thread overview]
Message-ID: <4A8AFAE5.6040404@librato.com> (raw)
In-Reply-To: <20090817203423.GA12194-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
Matt Helsley wrote:
> Make ckpt_debug() report a more useful location than the
> line of some generic debug/error wrapper.
>
> Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Nice, and pushed to ckpt-v17-dev.
Oren.
>
> diff --git a/checkpoint/restart.c b/checkpoint/restart.c
> index 3d3d4ed..febc9b7 100644
> --- a/checkpoint/restart.c
> +++ b/checkpoint/restart.c
> @@ -485,13 +485,20 @@ static inline int is_task_active(struct ckpt_ctx *ctx, pid_t pid)
> return get_active_pid(ctx) == pid;
> }
>
> -static inline void ckpt_notify_error(struct ckpt_ctx *ctx)
> +static inline void _ckpt_notify_error(struct ckpt_ctx *ctx)
> {
> - ckpt_debug("ctx with root pid %d (%p)", ctx->root_pid, ctx);
> ckpt_set_ctx_error(ctx);
> complete(&ctx->complete);
> }
>
> +/* Need to call ckpt_debug such that it will get the correct source location */
> +#define ckpt_notify_error(ctx) \
> +do { \
> + ckpt_debug("ctx with root pid %d (%p)", ctx->root_pid, ctx); \
> + _ckpt_notify_error(ctx); \
> +} while(0)
> +
> +
> int ckpt_activate_next(struct ckpt_ctx *ctx)
> {
> struct task_struct *task;
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
prev parent reply other threads:[~2009-08-18 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 20:34 [PATCH] Improve debug output from ckpt_notify_error() Matt Helsley
[not found] ` <20090817203423.GA12194-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-08-18 19:03 ` Oren Laadan [this message]
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=4A8AFAE5.6040404@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/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