ltt_event_create should return error values
[lttng-ust.git] / include / lttng / ust-events.h
index 5c649e73969b3aa6a978f889d829e3e3583db9c1..0ccef46ab33fa8769c0b3fd09424bfd81c4187a0 100644 (file)
@@ -8,7 +8,14 @@
  *
  * Holds LTTng per-session event registry.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
  */
 
 #include <urcu/list.h>
@@ -18,7 +25,6 @@
 #include <lttng/ust-tracer.h>
 #include <endian.h>
 #include <float.h>
-#include <lttng/tracepoint-internal.h>
 
 struct ltt_channel;
 struct ltt_session;
@@ -189,6 +195,7 @@ struct lttng_probe_desc {
        const struct lttng_event_desc *event_desc;
        unsigned int nr_events;
        struct cds_list_head head;              /* chain registered probes */
+       struct tracepoint_loglevel *loglevels;
 };
 
 struct ust_pending_probe;
@@ -296,9 +303,15 @@ struct ltt_transport {
        struct ltt_channel_ops ops;
 };
 
-struct ltt_tracepoint_list {
-       struct tracepoint_iter iter;
-       int got_first;
+struct tracepoint_loglevel_enum_entry  {
+       const char *identifier;
+       long value;
+};
+
+/* mapping between tracepoint and loglevel */
+struct tracepoint_loglevel {
+       const char *name;
+       const struct tracepoint_loglevel_enum_entry *loglevel;
 };
 
 struct ltt_session *ltt_session_create(void);
@@ -323,9 +336,10 @@ struct ltt_channel *ltt_global_channel_create(struct ltt_session *session,
                                       int *shm_fd, int *wait_fd,
                                       uint64_t *memory_map_size);
 
-struct ltt_event *ltt_event_create(struct ltt_channel *chan,
-                                  struct lttng_ust_event *event_param,
-                                  void *filter);
+int ltt_event_create(struct ltt_channel *chan,
+               struct lttng_ust_event *event_param,
+               void *filter,
+               struct ltt_event **event);
 
 int ltt_channel_enable(struct ltt_channel *channel);
 int ltt_channel_disable(struct ltt_channel *channel);
@@ -360,7 +374,6 @@ const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_metadat
 const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_discard;
 const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_overwrite;
 
-struct cds_list_head ltt_transport_list;
 struct ltt_transport *ltt_transport_find(const char *name);
 
 #endif /* _LTTNG_UST_EVENTS_H */
This page took 0.024668 seconds and 4 git commands to generate.