Tests: Fix abi conflict test when building with clang
[lttng-ust.git] / include / lttng / ust-ctl.h
index 42b30ea9f06ae5565801d26b87ad7785ec4b6203..0bae1eac68affcdd8c7b58b801d10b06716736c1 100644 (file)
@@ -1,9 +1,7 @@
-/*
- * SPDX-License-Identifier: GPL-2.0-only
- *
- * Copyright (C) 2011 EfficiOS Inc.
- * Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
+// SPDX-FileCopyrightText: 2011 EfficiOS Inc.
+// SPDX-FileCopyrightText: 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+//
+// SPDX-License-Identifier: GPL-2.0-only
 
 #ifndef _LTTNG_UST_CTL_H
 #define _LTTNG_UST_CTL_H
@@ -314,6 +312,7 @@ enum lttng_ust_ctl_notify_cmd {
        LTTNG_UST_CTL_NOTIFY_CMD_EVENT = 0,
        LTTNG_UST_CTL_NOTIFY_CMD_CHANNEL = 1,
        LTTNG_UST_CTL_NOTIFY_CMD_ENUM = 2,
+       LTTNG_UST_CTL_NOTIFY_CMD_KEY = 3,
 };
 
 enum lttng_ust_ctl_channel_header {
@@ -538,13 +537,49 @@ int lttng_ust_ctl_recv_register_event(int sock,
                                         */
        size_t *nr_fields,
        struct lttng_ust_ctl_field **fields,
-       char **model_emf_uri);
+       char **model_emf_uri,
+       uint64_t *user_token);
 
 /*
  * Returns 0 on success, negative error value on error.
  */
 int lttng_ust_ctl_reply_register_event(int sock,
-       uint32_t id,                    /* event id (input) */
+       uint32_t id,                    /* id (input) */
+       int ret_code);                  /* return code. 0 ok, negative error */
+
+/*
+ * Returns 0 on success, negative UST or system error value on error.
+ */
+int lttng_ust_ctl_recv_register_key(int sock,
+       int *session_objd,              /* session descriptor (output) */
+       int *map_objd,                  /* map descriptor (output) */
+       uint32_t *dimension,            /*
+                                        * Against which dimension is
+                                        * this key expressed. (output)
+                                        */
+       uint64_t **dimension_indexes,   /*
+                                        * Indexes (output,
+                                        * dynamically
+                                        * allocated, must be
+                                        * free(3)'d by the
+                                        * caller if function
+                                        * returns success.)
+                                        * Contains @dimension
+                                        * elements.
+                                        */
+       char **key_string,              /*
+                                        * key string (output,
+                                        * dynamically allocated, must
+                                        * be free(3)'d by the caller if
+                                        * function returns success.)
+                                        */
+       uint64_t *user_token);
+
+/*
+ * Returns 0 on success, negative error value on error.
+ */
+int lttng_ust_ctl_reply_register_key(int sock,
+       uint64_t index,                 /* Index within dimension (input) */
        int ret_code);                  /* return code. 0 ok, negative error */
 
 /*
@@ -594,6 +629,11 @@ enum lttng_ust_ctl_counter_arithmetic {
        LTTNG_UST_CTL_COUNTER_ARITHMETIC_SATURATION     = 1,
 };
 
+enum lttng_ust_ctl_key_type {
+       LTTNG_UST_CTL_KEY_TYPE_TOKENS = 0,
+       LTTNG_UST_CTL_KEY_TYPE_INTEGER = 1,
+};
+
 /* Used as alloc flags. */
 enum lttng_ust_ctl_counter_alloc {
        LTTNG_UST_CTL_COUNTER_ALLOC_PER_CPU = (1 << 0),
@@ -608,6 +648,7 @@ struct lttng_ust_ctl_counter_dimension {
        uint64_t size;
        uint64_t underflow_index;
        uint64_t overflow_index;
+       enum lttng_ust_ctl_key_type key_type;
        uint8_t has_underflow;
        uint8_t has_overflow;
 };
@@ -658,6 +699,12 @@ int lttng_ust_ctl_counter_aggregate(struct lttng_ust_ctl_daemon_counter *counter
 int lttng_ust_ctl_counter_clear(struct lttng_ust_ctl_daemon_counter *counter,
                const size_t *dimension_indexes);
 
+int lttng_ust_ctl_counter_create_event(int sock,
+               struct lttng_ust_abi_counter_event *counter_event,
+               size_t counter_event_len,
+               struct lttng_ust_abi_object_data *counter_data,
+               struct lttng_ust_abi_object_data **counter_event_data);
+
 void lttng_ust_ctl_sigbus_handle(void *addr);
 
 int lttng_ust_ctl_get_version(uint32_t *major, uint32_t *minor, uint32_t *patchlevel);
This page took 0.025383 seconds and 4 git commands to generate.