[lttng-dev] [PATCH lttng-tools 2/4] RFC: Add userspace namespace contexts

Michael Jeanson mjeanson at efficios.com
Tue Mar 6 15:53:50 EST 2018


Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 src/bin/lttng-sessiond/save.c      | 21 +++++++++++++++++++++
 src/bin/lttng-sessiond/trace-ust.c | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c
index 3bfeaab..cf8c830 100644
--- a/src/bin/lttng-sessiond/save.c
+++ b/src/bin/lttng-sessiond/save.c
@@ -338,6 +338,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
diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c
index bcb04fe..33aec26 100644
--- a/src/bin/lttng-sessiond/trace-ust.c
+++ b/src/bin/lttng-sessiond/trace-ust.c
@@ -555,6 +555,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;
-- 
2.7.4



More information about the lttng-dev mailing list