Remove has_strcpy check following probe provider version bump
[lttng-ust.git] / include / lttng / ust-events.h
index 5167ddee50a9de5f526c80545221dab32fbb3246..938e12bcd248cdd31f9352d42c88de30fed34b46 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <urcu/list.h>
 #include <urcu/hlist.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <lttng/ust-config.h>
 #include <lttng/ust-abi.h>
 #include <urcu/ref.h>
 #include <pthread.h>
 
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -51,7 +56,7 @@ extern "C" {
  * library, but the opposite is rejected: a newer tracepoint provider is
  * rejected by an older lttng-ust library.
  */
-#define LTTNG_UST_PROVIDER_MAJOR       1
+#define LTTNG_UST_PROVIDER_MAJOR       2
 #define LTTNG_UST_PROVIDER_MINOR       0
 
 struct lttng_channel;
@@ -106,11 +111,20 @@ struct lttng_enum_value {
        unsigned int signedness:1;
 };
 
+enum lttng_enum_entry_options {
+       LTTNG_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0,
+};
+
 #define LTTNG_UST_ENUM_ENTRY_PADDING   16
 struct lttng_enum_entry {
        struct lttng_enum_value start, end; /* start and end are inclusive */
        const char *string;
-       char padding[LTTNG_UST_ENUM_ENTRY_PADDING];
+       union {
+               struct {
+                       unsigned int options;
+               } LTTNG_PACKED extra;
+               char padding[LTTNG_UST_ENUM_ENTRY_PADDING];
+       } u;
 };
 
 #define __type_integer(_type, _byte_order, _base, _encoding)   \
@@ -333,7 +347,7 @@ struct lttng_probe_desc {
 /* Data structures used by the tracer. */
 
 enum lttng_enabler_type {
-       LTTNG_ENABLER_WILDCARD,
+       LTTNG_ENABLER_STAR_GLOB,
        LTTNG_ENABLER_EVENT,
 };
 
@@ -352,6 +366,10 @@ struct lttng_enabler {
 
        struct lttng_ust_event event_param;
        struct lttng_channel *chan;
+       /*
+        * Unused, but kept around to make it explicit that the tracer can do
+        * it.
+        */
        struct lttng_ctx *ctx;
        unsigned int enabled:1;
 };
@@ -480,10 +498,18 @@ struct lttng_channel_ops {
                        unsigned int read_timer_interval,
                        unsigned char *uuid,
                        uint32_t chan_id,
-                       const int *stream_fds, int nr_stream_fds);
+                       const int *stream_fds, int nr_stream_fds,
+                       int64_t blocking_timeout);
        void (*channel_destroy)(struct lttng_channel *chan);
        union {
                void *_deprecated1;
+               /*
+                * has_strcpy is needed by probe providers version 1.0 to
+                * dynamically detect whether the LTTng-UST tracepoint
+                * provider ABI implements event_strcpy. Starting from
+                * probe providers version 2.0, the check is not needed,
+                * but backward compatibility is provided for older versions.
+                */
                unsigned long has_strcpy:1;             /* ABI has strcpy */
        } u;
        void *_deprecated2;
@@ -646,6 +672,7 @@ void synchronize_trace(void);
 
 int lttng_probe_register(struct lttng_probe_desc *desc);
 void lttng_probe_unregister(struct lttng_probe_desc *desc);
+void lttng_probe_provider_unregister_events(struct lttng_probe_desc *desc);
 int lttng_fix_pending_events(void);
 int lttng_probes_init(void);
 void lttng_probes_exit(void);
@@ -663,8 +690,35 @@ int lttng_add_procname_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_ip_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_dyntest_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_veuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vsuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vgid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vegid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vsgid_to_ctx(struct lttng_ctx **ctx);
 void lttng_context_vtid_reset(void);
 void lttng_context_vpid_reset(void);
+void lttng_context_procname_reset(void);
+void lttng_context_cgroup_ns_reset(void);
+void lttng_context_ipc_ns_reset(void);
+void lttng_context_mnt_ns_reset(void);
+void lttng_context_net_ns_reset(void);
+void lttng_context_pid_ns_reset(void);
+void lttng_context_user_ns_reset(void);
+void lttng_context_uts_ns_reset(void);
+void lttng_context_vuid_reset(void);
+void lttng_context_veuid_reset(void);
+void lttng_context_vsuid_reset(void);
+void lttng_context_vgid_reset(void);
+void lttng_context_vegid_reset(void);
+void lttng_context_vsgid_reset(void);
 
 #ifdef LTTNG_UST_HAVE_PERF_EVENT
 int lttng_add_perf_counter_to_ctx(uint32_t type,
@@ -708,7 +762,6 @@ void lttng_probes_prune_field_list(struct lttng_ust_field_list *list);
 struct lttng_ust_field_iter *
        lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list);
 
-void lttng_filter_event_link_bytecode(struct lttng_event *event);
 void lttng_enabler_event_link_bytecode(struct lttng_event *event,
                struct lttng_enabler *enabler);
 void lttng_free_event_filter_runtime(struct lttng_event *event);
@@ -720,15 +773,18 @@ int lttng_session_active(void);
 typedef int (*t_statedump_func_ptr)(struct lttng_session *session);
 void lttng_handle_pending_statedump(void *owner);
 struct cds_list_head *_lttng_get_sessions(void);
-struct lttng_enum *lttng_ust_enum_get(struct lttng_session *session,
-               const char *enum_name);
+
+struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_session *session,
+               const struct lttng_enum_desc *enum_desc);
 
 void lttng_ust_dl_update(void *ip);
+void lttng_ust_fixup_fd_tracker_tls(void);
 
 /* For backward compatibility. Leave those exported symbols in place. */
 extern struct lttng_ctx *lttng_static_ctx;
 void lttng_context_init(void);
 void lttng_context_exit(void);
+void lttng_filter_event_link_bytecode(struct lttng_event *event);
 
 #ifdef __cplusplus
 }
This page took 0.024248 seconds and 4 git commands to generate.