Add UST namespace contexts
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 12 Feb 2019 16:51:21 +0000 (11:51 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 23 Oct 2019 20:35:38 +0000 (16:35 -0400)
Add the following userspace namespace contexts:
  - cgroup_ns
    Cgroup root directory namespace: inode number of the current
    cgroup namespace in the proc filesystem.

  - ipc_ns
    System V IPC, POSIX message queues namespace: inode number of the
    current IPC namespace in the proc filesystem.

  - mnt_ns
    Mount points namespace: inode number of the current mount
    namespace in the proc filesystem.

  - net_ns
    Network devices, stacks, ports namespace: inode number of the
    current network namespace in the proc filesystem.

  - pid_ns
    Process IDs namespace: inode number of the current pid namespace
    in the proc filesystem.

  - user_ns
    User and group IDs namespace: inode number of the current user
    namespace in the proc filesystem.

  - uts_ns
    Hostname and NIS domain name namespace: inode number of the
    current uts namespace in the proc filesystem.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/save.c
src/bin/lttng-sessiond/trace-ust.c

index f3cd9bca99b51cf25b6b3dd2ae68a80659b8686b..6c7ca6757ea4cf9bbf9dd936dd2e141c91fc683e 100644 (file)
@@ -347,6 +347,27 @@ const char *get_ust_context_type_string(
        case LTTNG_UST_CONTEXT_APP_CONTEXT:
                context_type_string = config_event_context_app;
                break;
+       case LTTNG_UST_CONTEXT_CGROUP_NS:
+               context_type_string = config_event_context_cgroup_ns;
+               break;
+       case LTTNG_UST_CONTEXT_IPC_NS:
+               context_type_string = config_event_context_ipc_ns;
+               break;
+       case LTTNG_UST_CONTEXT_MNT_NS:
+               context_type_string = config_event_context_mnt_ns;
+               break;
+       case LTTNG_UST_CONTEXT_NET_NS:
+               context_type_string = config_event_context_net_ns;
+               break;
+       case LTTNG_UST_CONTEXT_PID_NS:
+               context_type_string = config_event_context_pid_ns;
+               break;
+       case LTTNG_UST_CONTEXT_USER_NS:
+               context_type_string = config_event_context_user_ns;
+               break;
+       case LTTNG_UST_CONTEXT_UTS_NS:
+               context_type_string = config_event_context_uts_ns;
+               break;
        case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
                /*
                 * Error, should not be stored in the XML, perf contexts
index cc166fd6f9413824e3a22f37016f73e704560dc8..e91102a6d7d6fa27c78b55cc3844eadcae8ac7d0 100644 (file)
@@ -564,6 +564,27 @@ int trace_ust_context_type_event_to_ust(
        case LTTNG_EVENT_CONTEXT_APP_CONTEXT:
                utype = LTTNG_UST_CONTEXT_APP_CONTEXT;
                break;
+       case LTTNG_EVENT_CONTEXT_CGROUP_NS:
+               utype = LTTNG_UST_CONTEXT_CGROUP_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_IPC_NS:
+               utype = LTTNG_UST_CONTEXT_IPC_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_MNT_NS:
+               utype = LTTNG_UST_CONTEXT_MNT_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_NET_NS:
+               utype = LTTNG_UST_CONTEXT_NET_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_PID_NS:
+               utype = LTTNG_UST_CONTEXT_PID_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_USER_NS:
+               utype = LTTNG_UST_CONTEXT_USER_NS;
+               break;
+       case LTTNG_EVENT_CONTEXT_UTS_NS:
+               utype = LTTNG_UST_CONTEXT_UTS_NS;
+               break;
        default:
                utype = -1;
                break;
This page took 0.036464 seconds and 4 git commands to generate.