[CRIU] [PATCH] pstree: Add more debug output for prepare_pstree_kobj_ids
Pavel Emelyanov
xemul at parallels.com
Fri Mar 15 05:40:16 EDT 2013
On 03/15/2013 12:51 PM, Cyrill Gorcunov wrote:
> Quite useful for debuggin.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> pstree.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/pstree.c b/pstree.c
> index fb0b25b..0cd8fbd 100644
> --- a/pstree.c
> +++ b/pstree.c
> @@ -473,6 +473,17 @@ static unsigned long get_clone_mask(TaskKobjIdsEntry *i,
> return mask;
> }
>
> +static void __show_kobj_ids(char *prefix, TaskKobjIdsEntry *ids)
> +{
> + if (!ids)
> + return;
> +
> + pr_debug("%s: %x %x %x %x %x %x %x %x %x\n", prefix,
> + ids->vm_id, ids->files_id, ids->fs_id, ids->sighand_id,
> + ids->pid_ns_id, ids->net_ns_id, ids->ipc_ns_id,
> + ids->uts_ns_id, ids->mnt_ns_id);
> +}
This can be found out by crtoold show -f
> +
> static int prepare_pstree_kobj_ids(void)
> {
> struct pstree_item *item;
> @@ -507,6 +518,9 @@ static int prepare_pstree_kobj_ids(void)
> }
> }
>
> + __show_kobj_ids("parent ids", ids);
> + __show_kobj_ids("child ids", item->ids);
> +
> cflags = get_clone_mask(item->ids, ids);
>
> if (cflags & CLONE_FILES) {
> @@ -546,6 +560,7 @@ set_mask:
> }
> }
>
> + pr_debug("NS mask to use %lx\n", current_ns_mask);
Missing info for what pid this mask is generated
> return 0;
> }
>
>
More information about the CRIU
mailing list