} __attribute__((packed));
#define LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX 4
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
+struct lttng_kernel_abi_event_notifier_notification {
+ uint64_t token;
+ uint16_t capture_buf_size;
+ char padding[LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
+} __attribute__((packed));
+
+enum lttng_kernel_abi_key_token_type {
+ LTTNG_KERNEL_ABI_KEY_TOKEN_STRING = 0, /* arg: string_ptr. */
+ LTTNG_KERNEL_ABI_KEY_TOKEN_EVENT_NAME = 1, /* no arg. */
+ LTTNG_KERNEL_ABI_KEY_TOKEN_PROVIDER_NAME = 2, /* no arg. */
+};
+
+#define LTTNG_KERNEL_ABI_KEY_ARG_PADDING1 60
+#define LTTNG_KERNEL_ABI_KEY_TOKEN_STRING_LEN_MAX 256
+struct lttng_kernel_abi_key_token {
+ uint32_t type; /* enum lttng_kernel_abi_key_token_type */
+ union {
+ uint64_t string_ptr;
+ char padding[LTTNG_KERNEL_ABI_KEY_ARG_PADDING1];
+ } arg;
+} __attribute__((packed));
+
+#define LTTNG_KERNEL_ABI_NR_KEY_TOKEN 4
+struct lttng_kernel_abi_counter_key_dimension {
+ uint32_t nr_key_tokens;
+ struct lttng_kernel_abi_key_token key_tokens[LTTNG_KERNEL_ABI_NR_KEY_TOKEN];
+} __attribute__((packed));
+
+struct lttng_kernel_abi_counter_key {
+ uint32_t nr_dimensions;
+ struct lttng_kernel_abi_counter_key_dimension key_dimensions[LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX];
+} __attribute__((packed));
+
+#define LTTNG_KERNEL_ABI_COUNTER_EVENT_PADDING1 16
+struct lttng_kernel_abi_counter_event {
+ struct lttng_kernel_abi_event event;
+ struct lttng_kernel_abi_counter_key key;
+ char padding[LTTNG_KERNEL_ABI_COUNTER_EVENT_PADDING1];
+} __attribute__((packed));
enum lttng_kernel_abi_counter_arithmetic {
LTTNG_KERNEL_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
char padding[LTTNG_KERNEL_ABI_COUNTER_CLEAR_PADDING];
} __attribute__((packed));
-#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
-struct lttng_kernel_abi_event_notifier_notification {
- uint64_t token;
- uint16_t capture_buf_size;
- char padding[LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
+#define LTTNG_KERNEL_ABI_COUNTER_KEY_LEN 256
+#define LTTNG_KERNEL_ABI_COUNTER_MAP_DESCRIPTOR_PADDING 32
+struct lttng_kernel_abi_counter_map_descriptor {
+ uint64_t descriptor_index; /* input. [ 0 .. nr_descriptors - 1 ] */
+
+ uint32_t dimension; /* outputs */
+ uint64_t array_index;
+ uint64_t user_token;
+ char key[LTTNG_KERNEL_ABI_COUNTER_KEY_LEN];
+
+ char padding[LTTNG_KERNEL_ABI_COUNTER_MAP_DESCRIPTOR_PADDING];
} __attribute__((packed));
struct lttng_kernel_abi_tracer_version {
#define LTTNG_KERNEL_ABI_STREAM _IO(0xF6, 0x62)
#define LTTNG_KERNEL_ABI_EVENT \
_IOW(0xF6, 0x63, struct lttng_kernel_abi_event)
+/* LTTNG_KERNEL_ABI_SYSCALL_MASK applies to both channel and counter fds. */
#define LTTNG_KERNEL_ABI_SYSCALL_MASK \
_IOWR(0xF6, 0x64, struct lttng_kernel_abi_syscall_mask)
_IOWR(0xF6, 0xC1, struct lttng_kernel_abi_counter_aggregate)
#define LTTNG_KERNEL_ABI_COUNTER_CLEAR \
_IOW(0xF6, 0xC2, struct lttng_kernel_abi_counter_clear)
-
+#define LTTNG_KERNEL_ABI_COUNTER_MAP_NR_DESCRIPTORS \
+ _IOR(0xF6, 0xC3, uint64_t)
+#define LTTNG_KERNEL_ABI_COUNTER_MAP_DESCRIPTOR \
+ _IOWR(0xF6, 0xC4, struct lttng_kernel_abi_counter_map_descriptor)
+#define LTTNG_KERNEL_ABI_COUNTER_EVENT \
+ _IOW(0xF6, 0xC5, struct lttng_kernel_abi_counter_event)
/*
* LTTng-specific ioctls for the lib ringbuffer.