Add userspace namespace contexts
[lttng-ust.git] / liblttng-ust / lttng-tracer-core.h
index 44aca749c6c04553702e2ecd54313657bd27b777..52315a8de001227fecd02ae50749581b9a16edf9 100644 (file)
 #include <lttng/ringbuffer-config.h>
 #include <usterr-signal-safe.h>
 
+/*
+ * The longuest possible namespace proc path is with the cgroup ns
+ * and the maximum theoretical linux pid of 536870912 :
+ *
+ *  /proc/self/task/536870912/ns/cgroup
+ */
+#define LTTNG_PROC_NS_PATH_MAX 40
+
 struct lttng_session;
 struct lttng_channel;
 struct lttng_event;
@@ -44,6 +52,10 @@ void ust_unlock(void);
 void lttng_fixup_event_tls(void);
 void lttng_fixup_vtid_tls(void);
 void lttng_fixup_procname_tls(void);
+void lttng_fixup_cgroup_ns_tls(void);
+void lttng_fixup_ipc_ns_tls(void);
+void lttng_fixup_net_ns_tls(void);
+void lttng_fixup_uts_ns_tls(void);
 
 const char *lttng_ust_obj_get_name(int id);
 
@@ -62,5 +74,25 @@ void lttng_ust_dummy_record(struct lttng_ctx_field *field,
 void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
                struct lttng_ctx_value *value);
 int lttng_context_is_app(const char *name);
+void lttng_ust_fixup_tls(void);
+
+#ifdef LTTNG_UST_HAVE_PERF_EVENT
+void lttng_ust_fixup_perf_counter_tls(void);
+void lttng_perf_lock(void);
+void lttng_perf_unlock(void);
+#else /* #ifdef LTTNG_UST_HAVE_PERF_EVENT */
+static inline
+void lttng_ust_fixup_perf_counter_tls(void)
+{
+}
+static inline
+void lttng_perf_lock(void)
+{
+}
+static inline
+void lttng_perf_unlock(void)
+{
+}
+#endif /* #else #ifdef LTTNG_UST_HAVE_PERF_EVENT */
 
 #endif /* _LTTNG_TRACER_CORE_H */
This page took 0.022891 seconds and 4 git commands to generate.