Implement array and sequence bitfields
[lttng-modules.git] / lttng-events.h
index b3e94a0c60b670acd814c21010be72cc0c128b86..234d4bcb9ff01f5aa83745f925e1775fd9eb5bd4 100644 (file)
@@ -71,15 +71,16 @@ struct lttng_enum_entry {
        const char *string;
 };
 
-#define __type_integer(_type, _byte_order, _base, _encoding)   \
+#define __type_integer(_type, _size, _alignment, _signedness,  \
+               _byte_order, _base, _encoding)  \
        {                                                       \
            .atype = atype_integer,                             \
            .u.basic.integer =                                  \
                {                                               \
-                 .size = sizeof(_type) * CHAR_BIT,             \
-                 .alignment = lttng_alignof(_type) * CHAR_BIT, \
-                 .signedness = lttng_is_signed_type(_type),    \
-                 .reverse_byte_order = _byte_order != __BYTE_ORDER,    \
+                 .size = (_size) ? : sizeof(_type) * CHAR_BIT, \
+                 .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \
+                 .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \
+                 .reverse_byte_order = _byte_order != __BYTE_ORDER, \
                  .base = _base,                                \
                  .encoding = lttng_encode_##_encoding,         \
                },                                              \
@@ -118,10 +119,12 @@ struct lttng_type {
                struct {
                        struct lttng_basic_type elem_type;
                        unsigned int length;            /* num. elems. */
+                       unsigned int elem_alignment;    /* alignment override */
                } array;
                struct {
                        struct lttng_basic_type length_type;
                        struct lttng_basic_type elem_type;
+                       unsigned int elem_alignment;    /* alignment override */
                } sequence;
        } u;
 };
@@ -421,6 +424,7 @@ struct lttng_metadata_stream {
        wait_queue_head_t read_wait;    /* Reader buffer-level wait queue */
        struct list_head list;          /* Stream list */
        struct lttng_transport *transport;
+       uint64_t version;               /* Current version of the metadata cache */
 };
 
 
@@ -466,7 +470,8 @@ struct lttng_metadata_cache {
        struct kref refcount;           /* Metadata cache usage */
        struct list_head metadata_stream;       /* Metadata stream list */
        uuid_le uuid;                   /* Trace session unique ID (copy) */
-       struct mutex lock;
+       struct mutex lock;              /* Produce/consume lock */
+       uint64_t version;               /* Current version of the metadata */
 };
 
 void lttng_lock_sessions(void);
@@ -487,6 +492,7 @@ struct lttng_session *lttng_session_create(void);
 int lttng_session_enable(struct lttng_session *session);
 int lttng_session_disable(struct lttng_session *session);
 void lttng_session_destroy(struct lttng_session *session);
+int lttng_session_metadata_regenerate(struct lttng_session *session);
 void metadata_cache_destroy(struct kref *kref);
 
 struct lttng_channel *lttng_channel_create(struct lttng_session *session,
@@ -554,6 +560,9 @@ int lttng_session_untrack_pid(struct lttng_session *session, int pid);
 
 int lttng_session_list_tracker_pids(struct lttng_session *session);
 
+void lttng_clock_ref(void);
+void lttng_clock_unref(void);
+
 #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
 int lttng_syscalls_register(struct lttng_channel *chan, void *filter);
 int lttng_syscalls_unregister(struct lttng_channel *chan);
@@ -681,6 +690,8 @@ int lttng_kretprobes_register(const char *name,
                struct lttng_event *event_exit);
 void lttng_kretprobes_unregister(struct lttng_event *event);
 void lttng_kretprobes_destroy_private(struct lttng_event *event);
+int lttng_kretprobes_event_enable_state(struct lttng_event *event,
+       int enable);
 #else
 static inline
 int lttng_kretprobes_register(const char *name,
@@ -702,6 +713,13 @@ static inline
 void lttng_kretprobes_destroy_private(struct lttng_event *event)
 {
 }
+
+static inline
+int lttng_kretprobes_event_enable_state(struct lttng_event *event,
+       int enable)
+{
+       return -ENOSYS;
+}
 #endif
 
 #ifdef CONFIG_DYNAMIC_FTRACE
This page took 0.024189 seconds and 4 git commands to generate.