-/*
- * 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
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 {
*/
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 */
/*
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),
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;
};
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);