Add kernel namespace contexts
[lttng-tools.git] / src / common / config / session-config.c
index 78d0c8b73357fa91a01fcc3cacbe26a119800da2..2c9f692669246a09256bf818e176d1ee5b45c461 100644 (file)
@@ -205,6 +205,13 @@ LTTNG_HIDDEN const char * const config_event_context_need_reschedule = "NEED_RES
 LTTNG_HIDDEN const char * const config_event_context_migratable = "MIGRATABLE";
 LTTNG_HIDDEN const char * const config_event_context_callstack_user= "CALLSTACK_USER";
 LTTNG_HIDDEN const char * const config_event_context_callstack_kernel = "CALLSTACK_KERNEL";
+LTTNG_HIDDEN const char * const config_event_context_cgroup_ns = "CGROUP_NS";
+LTTNG_HIDDEN const char * const config_event_context_ipc_ns = "IPC_NS";
+LTTNG_HIDDEN const char * const config_event_context_mnt_ns = "MNT_NS";
+LTTNG_HIDDEN const char * const config_event_context_net_ns = "NET_NS";
+LTTNG_HIDDEN const char * const config_event_context_pid_ns = "PID_NS";
+LTTNG_HIDDEN const char * const config_event_context_user_ns = "USER_NS";
+LTTNG_HIDDEN const char * const config_event_context_uts_ns = "UTS_NS";
 
 /* Deprecated symbols */
 const char * const config_element_perf;
@@ -1047,6 +1054,27 @@ int get_context_type(xmlChar *context_type)
        } else if (!strcmp((char *) context_type,
                config_event_context_callstack_kernel)) {
                ret = LTTNG_EVENT_CONTEXT_CALLSTACK_KERNEL;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_cgroup_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_CGROUP_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_ipc_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_IPC_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_mnt_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_MNT_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_net_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_NET_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_pid_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_PID_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_user_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_USER_NS;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_uts_ns)) {
+               ret = LTTNG_EVENT_CONTEXT_UTS_NS;
        } else {
                goto error;
        }
@@ -1633,6 +1661,7 @@ process_userspace_probe_tracepoint_attribute_node(
                                lttng_userspace_probe_location_tracepoint_create(
                                                binary_path, provider_name,
                                                probe_name, lookup_method);
+                       lookup_method = NULL;
                        goto error;
                }
        }
@@ -2052,6 +2081,7 @@ end:
                free(exclusions[i]);
        }
 
+       lttng_event_destroy(event);
        free(exclusions);
        free(filter_expression);
        return ret;
This page took 0.027207 seconds and 5 git commands to generate.