Update loglevel selection ABI
[lttng-ust.git] / include / lttng / ust-abi.h
index 90a0822f661bb187d96f3400b44bf1f6ab3d762f..c03a4da177d44ecb5811186433ca0eb342d4efe6 100644 (file)
@@ -8,20 +8,32 @@
  *
  * LTTng-UST ABI header
  *
- * 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 <stdint.h>
 
-#define LTTNG_UST_SYM_NAME_LEN 128
+#define LTTNG_UST_SYM_NAME_LEN 256
 
 #define LTTNG_UST_COMM_VERSION_MAJOR           0
 #define LTTNG_UST_COMM_VERSION_MINOR           1
 
 enum lttng_ust_instrumentation {
-       LTTNG_UST_TRACEPOINT    = 0,
-       LTTNG_UST_PROBE         = 1,
-       LTTNG_UST_FUNCTION      = 2,
+       LTTNG_UST_TRACEPOINT            = 0,
+       LTTNG_UST_PROBE                 = 1,
+       LTTNG_UST_FUNCTION              = 2,
+};
+
+enum lttng_ust_loglevel_type {
+       LTTNG_UST_LOGLEVEL              = 0,
+       LTTNG_UST_LOGLEVEL_ONLY         = 1,
 };
 
 enum lttng_ust_output {
@@ -29,9 +41,9 @@ enum lttng_ust_output {
 };
 
 struct lttng_ust_tracer_version {
-       uint32_t version;
+       uint32_t major;
+       uint32_t minor;
        uint32_t patchlevel;
-       uint32_t sublevel;
 };
 
 struct lttng_ust_channel {
@@ -41,25 +53,18 @@ struct lttng_ust_channel {
        unsigned int switch_timer_interval;     /* usecs */
        unsigned int read_timer_interval;       /* usecs */
        enum lttng_ust_output output;           /* output mode */
-       /* The following fields are used internally within UST. */
-       int shm_fd;
-       int wait_fd;
-       uint64_t memory_map_size;
 };
 
-/*
- * This structure is only used internally within UST. It is not per-se
- * part of the communication between sessiond and UST.
- */
 struct lttng_ust_stream {
-       int shm_fd;
-       int wait_fd;
-       uint64_t memory_map_size;
 };
 
 struct lttng_ust_event {
-       char name[LTTNG_UST_SYM_NAME_LEN];      /* event name */
        enum lttng_ust_instrumentation instrumentation;
+       char name[LTTNG_UST_SYM_NAME_LEN];      /* event name */
+
+       enum lttng_ust_loglevel_type loglevel_type;
+       char loglevel[LTTNG_UST_SYM_NAME_LEN];  /* loglevel name */
+
        /* Per instrumentation type configuration */
        union {
        } u;
@@ -90,6 +95,12 @@ struct lttng_ust_channel_attr {
        enum lttng_ust_output output;           /* splice, mmap */
 };
 
+struct lttng_ust_tracepoint_iter {
+       char name[LTTNG_UST_SYM_NAME_LEN];      /* provider:name */
+       char loglevel[LTTNG_UST_SYM_NAME_LEN];  /* loglevel */
+       int64_t loglevel_value;
+};
+
 struct lttng_ust_object_data {
        int handle;
        int shm_fd;
@@ -97,6 +108,14 @@ struct lttng_ust_object_data {
        uint64_t memory_map_size;
 };
 
+enum lttng_ust_calibrate_type {
+       LTTNG_UST_CALIBRATE_TRACEPOINT,
+};
+
+struct lttng_ust_calibrate {
+       enum lttng_ust_calibrate_type type;     /* type (input) */
+};
+
 #define _UST_CMD(minor)                                (minor)
 #define _UST_CMDR(minor, type)                 (minor)
 #define _UST_CMDW(minor, type)                 (minor)
@@ -144,8 +163,22 @@ struct lttng_ust_object_data {
 
 struct lttng_ust_obj;
 
+union ust_args {
+       struct {
+               int *shm_fd;
+               int *wait_fd;
+               uint64_t *memory_map_size;
+       } channel;
+       struct {
+               int *shm_fd;
+               int *wait_fd;
+               uint64_t *memory_map_size;
+       } stream;
+};
+
 struct lttng_ust_objd_ops {
-       long (*cmd)(int objd, unsigned int cmd, unsigned long arg);
+       long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
+               union ust_args *args);
        int (*release)(int objd);
 };
 
This page took 0.024053 seconds and 4 git commands to generate.