#include <linux/utsname.h>
#include <linux/types.h>
#include <lttng/kernel-version.h>
-#include <wrapper/namespace.h>
#include <wrapper/user_namespace.h>
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0) || \
LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
TP_ARGS(session, p, cgroup_ns),
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
- ctf_integer(unsigned int, ns_inum, cgroup_ns ? cgroup_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, cgroup_ns ? cgroup_ns->ns.inum : 0)
)
)
#endif
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, ipc_ns ? ipc_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, ipc_ns ? ipc_ns->ns.inum : 0)
#endif
)
)
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, mnt_ns ? mnt_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, mnt_ns ? mnt_ns->ns.inum : 0)
#endif
)
)
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, net_ns ? net_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, net_ns ? net_ns->ns.inum : 0)
#endif
)
)
}))
ctf_integer(int, ns_level, pid_ns ? pid_ns->level : 0)
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, pid_ns ? pid_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, pid_ns ? pid_ns->ns.inum : 0)
#endif
)
)
ctf_integer(int, ns_level, user_ns ? user_ns->level : 0)
#endif
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, user_ns ? user_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, user_ns ? user_ns->ns.inum : 0)
#endif
)
)
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
- ctf_integer(unsigned int, ns_inum, uts_ns ? uts_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, uts_ns ? uts_ns->ns.inum : 0)
#endif
)
)
TP_ARGS(session, p, time_ns),
TP_FIELDS(
ctf_integer(pid_t, tid, p->pid)
- ctf_integer(unsigned int, ns_inum, time_ns ? time_ns->lttng_ns_inum : 0)
+ ctf_integer(unsigned int, ns_inum, time_ns ? time_ns->ns.inum : 0)
)
)
#endif
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
#include <linux/sched/rt.h>
#endif
-#include <wrapper/namespace.h>
#define LTTNG_MAX_PID_NS_LEVEL 32
pid_ns = task_active_pid_ns(parent);
if (pid_ns)
parent_ns_inum =
- pid_ns->lttng_ns_inum;
+ pid_ns->ns.inum;
}
parent_ns_inum;
}))
pid_ns = task_active_pid_ns(child);
if (pid_ns)
child_ns_inum =
- pid_ns->lttng_ns_inum;
+ pid_ns->ns.inum;
}
child_ns_inum;
}))
+++ /dev/null
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/namespace.h
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * 2019 Michael Jeanson <mjeanson@efficios.com>
- *
- */
-
-#ifndef _LTTNG_WRAPPER_NAMESPACE_H
-#define _LTTNG_WRAPPER_NAMESPACE_H
-
-#include <lttng/kernel-version.h>
-
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
-#define lttng_ns_inum ns.inum
-#else
-#define lttng_ns_inum proc_inum
-#endif
-
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
-#define lttng_user_ns_parent parent
-#else
-#define lttng_user_ns_parent creator->user_ns
-#endif
-
-#endif /* _LTTNG_WRAPPER_NAMESPACE_H */
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_CGROUPS) && \
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- cgroup_ns_inum = current->nsproxy->cgroup_ns->lttng_ns_inum;
+ cgroup_ns_inum = current->nsproxy->cgroup_ns->ns.inum;
chan->ops->event_write(ctx, &cgroup_ns_inum, sizeof(cgroup_ns_inum), lttng_alignof(cgroup_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- cgroup_ns_inum = current->nsproxy->cgroup_ns->lttng_ns_inum;
+ cgroup_ns_inum = current->nsproxy->cgroup_ns->ns.inum;
value->u.s64 = cgroup_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_IPC_NS) && \
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- ipc_ns_inum = current->nsproxy->ipc_ns->lttng_ns_inum;
+ ipc_ns_inum = current->nsproxy->ipc_ns->ns.inum;
chan->ops->event_write(ctx, &ipc_ns_inum, sizeof(ipc_ns_inum), lttng_alignof(ipc_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- ipc_ns_inum = current->nsproxy->ipc_ns->lttng_ns_inum;
+ ipc_ns_inum = current->nsproxy->ipc_ns->ns.inum;
value->u.s64 = ipc_ns_inum;
}
#include <linux/nsproxy.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- mnt_ns_inum = current->nsproxy->mnt_ns->lttng_ns_inum;
+ mnt_ns_inum = current->nsproxy->mnt_ns->ns.inum;
chan->ops->event_write(ctx, &mnt_ns_inum, sizeof(mnt_ns_inum), lttng_alignof(mnt_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- mnt_ns_inum = current->nsproxy->mnt_ns->lttng_ns_inum;
+ mnt_ns_inum = current->nsproxy->mnt_ns->ns.inum;
value->u.s64 = mnt_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_NET_NS) && \
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- net_ns_inum = current->nsproxy->net_ns->lttng_ns_inum;
+ net_ns_inum = current->nsproxy->net_ns->ns.inum;
chan->ops->event_write(ctx, &net_ns_inum, sizeof(net_ns_inum), lttng_alignof(net_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- net_ns_inum = current->nsproxy->net_ns->lttng_ns_inum;
+ net_ns_inum = current->nsproxy->net_ns->ns.inum;
value->u.s64 = net_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_PID_NS) && \
ns = task_active_pid_ns(current);
if (ns)
- pid_ns_inum = ns->lttng_ns_inum;
+ pid_ns_inum = ns->ns.inum;
chan->ops->event_write(ctx, &pid_ns_inum, sizeof(pid_ns_inum), lttng_alignof(pid_ns_inum));
}
ns = task_active_pid_ns(current);
if (ns)
- pid_ns_inum = ns->lttng_ns_inum;
+ pid_ns_inum = ns->ns.inum;
value->u.s64 = pid_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_TIME_NS)
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- time_ns_inum = current->nsproxy->time_ns->lttng_ns_inum;
+ time_ns_inum = current->nsproxy->time_ns->ns.inum;
chan->ops->event_write(ctx, &time_ns_inum, sizeof(time_ns_inum), lttng_alignof(time_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- time_ns_inum = current->nsproxy->time_ns->lttng_ns_inum;
+ time_ns_inum = current->nsproxy->time_ns->ns.inum;
value->u.s64 = time_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_USER_NS) && \
unsigned int user_ns_inum = 0;
if (current_user_ns())
- user_ns_inum = current_user_ns()->lttng_ns_inum;
+ user_ns_inum = current_user_ns()->ns.inum;
chan->ops->event_write(ctx, &user_ns_inum, sizeof(user_ns_inum), lttng_alignof(user_ns_inum));
}
unsigned int user_ns_inum = 0;
if (current_user_ns())
- user_ns_inum = current_user_ns()->lttng_ns_inum;
+ user_ns_inum = current_user_ns()->ns.inum;
value->u.s64 = user_ns_inum;
}
#include <lttng/events-internal.h>
#include <ringbuffer/frontend_types.h>
#include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
#include <lttng/tracer.h>
#if defined(CONFIG_UTS_NS) && \
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- uts_ns_inum = current->nsproxy->uts_ns->lttng_ns_inum;
+ uts_ns_inum = current->nsproxy->uts_ns->ns.inum;
chan->ops->event_write(ctx, &uts_ns_inum, sizeof(uts_ns_inum), lttng_alignof(uts_ns_inum));
}
* namespaces, just dereference the pointers.
*/
if (current->nsproxy)
- uts_ns_inum = current->nsproxy->uts_ns->lttng_ns_inum;
+ uts_ns_inum = current->nsproxy->uts_ns->ns.inum;
value->u.s64 = uts_ns_inum;
}
#include <wrapper/cpu.h>
#include <wrapper/irqdesc.h>
#include <wrapper/fdtable.h>
-#include <wrapper/namespace.h>
#include <wrapper/tracepoint.h>
#include <wrapper/blkdev.h>
#include <wrapper/fdtable.h>
* paranoid behavior of
* trace_lttng_statedump_process_user_ns().
*/
- user_ns = user_ns ? user_ns->lttng_user_ns_parent : NULL;
+ user_ns = user_ns ? user_ns->parent : NULL;
} while (user_ns);
/*