- LTTNG_EVENT_TRACEPOINTS,
- LTTNG_EVENT_KPROBES,
- LTTNG_EVENT_FUNCTION,
-};
-
-/* Kernel context possible type */
-enum lttng_kernel_context_type {
- LTTNG_KERNEL_CONTEXT_PID = 0,
- LTTNG_KERNEL_CONTEXT_PERF_COUNTER = 1,
- LTTNG_KERNEL_CONTEXT_COMM = 2,
- LTTNG_KERNEL_CONTEXT_PRIO = 3,
- LTTNG_KERNEL_CONTEXT_NICE = 4,
- LTTNG_KERNEL_CONTEXT_VPID = 5,
- LTTNG_KERNEL_CONTEXT_TID = 6,
- LTTNG_KERNEL_CONTEXT_VTID = 7,
- LTTNG_KERNEL_CONTEXT_PPID = 8,
- LTTNG_KERNEL_CONTEXT_VPPID = 9,
-};
-
-/* Perf counter attributes */
-struct lttng_kernel_perf_counter_ctx {
+ LTTNG_EVENT_ALL = -1,
+ LTTNG_EVENT_TRACEPOINT = 0,
+ LTTNG_EVENT_PROBE = 1,
+ LTTNG_EVENT_FUNCTION = 2,
+ LTTNG_EVENT_FUNCTION_ENTRY = 3,
+ LTTNG_EVENT_NOOP = 4,
+ LTTNG_EVENT_SYSCALL = 5,
+};
+
+/*
+ * Loglevel information.
+ */
+enum lttng_loglevel_type {
+ LTTNG_EVENT_LOGLEVEL_ALL = 0,
+ LTTNG_EVENT_LOGLEVEL_RANGE = 1,
+ LTTNG_EVENT_LOGLEVEL_SINGLE = 2,
+};
+
+/*
+ * Available loglevels.
+ */
+enum lttng_loglevel {
+ LTTNG_LOGLEVEL_EMERG = 0,
+ LTTNG_LOGLEVEL_ALERT = 1,
+ LTTNG_LOGLEVEL_CRIT = 2,
+ LTTNG_LOGLEVEL_ERR = 3,
+ LTTNG_LOGLEVEL_WARNING = 4,
+ LTTNG_LOGLEVEL_NOTICE = 5,
+ LTTNG_LOGLEVEL_INFO = 6,
+ LTTNG_LOGLEVEL_DEBUG_SYSTEM = 7,
+ LTTNG_LOGLEVEL_DEBUG_PROGRAM = 8,
+ LTTNG_LOGLEVEL_DEBUG_PROCESS = 9,
+ LTTNG_LOGLEVEL_DEBUG_MODULE = 10,
+ LTTNG_LOGLEVEL_DEBUG_UNIT = 11,
+ LTTNG_LOGLEVEL_DEBUG_FUNCTION = 12,
+ LTTNG_LOGLEVEL_DEBUG_LINE = 13,
+ LTTNG_LOGLEVEL_DEBUG = 14,
+};
+
+/*
+ * LTTng consumer mode
+ */
+enum lttng_event_output {
+ LTTNG_EVENT_SPLICE = 0,
+ LTTNG_EVENT_MMAP = 1,
+};
+
+/* Event context possible type */
+enum lttng_event_context_type {
+ LTTNG_EVENT_CONTEXT_PID = 0,
+ LTTNG_EVENT_CONTEXT_PERF_COUNTER = 1,
+ LTTNG_EVENT_CONTEXT_PROCNAME = 2,
+ LTTNG_EVENT_CONTEXT_PRIO = 3,
+ LTTNG_EVENT_CONTEXT_NICE = 4,
+ LTTNG_EVENT_CONTEXT_VPID = 5,
+ LTTNG_EVENT_CONTEXT_TID = 6,
+ LTTNG_EVENT_CONTEXT_VTID = 7,
+ LTTNG_EVENT_CONTEXT_PPID = 8,
+ LTTNG_EVENT_CONTEXT_VPPID = 9,
+ LTTNG_EVENT_CONTEXT_PTHREAD_ID = 10,
+ LTTNG_EVENT_CONTEXT_HOSTNAME = 11,
+};
+
+enum lttng_calibrate_type {
+ LTTNG_CALIBRATE_FUNCTION = 0,
+};
+
+/* Health component for the health check function. */
+enum lttng_health_component {
+ LTTNG_HEALTH_CMD,
+ LTTNG_HEALTH_APP_MANAGE,
+ LTTNG_HEALTH_APP_REG,
+ LTTNG_HEALTH_KERNEL,
+ LTTNG_HEALTH_CONSUMER,
+ LTTNG_HEALTH_ALL,
+};
+
+/* Buffer type for a specific domain. */
+enum lttng_buffer_type {
+ LTTNG_BUFFER_PER_PID, /* Only supported by UST being the default. */
+ LTTNG_BUFFER_PER_UID, /* Only supported by UST. */
+ LTTNG_BUFFER_GLOBAL, /* Only supported by the Kernel. */
+};
+
+/*
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_DOMAIN_PADDING1 12
+#define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
+struct lttng_domain {
+ enum lttng_domain_type type;
+ enum lttng_buffer_type buf_type;
+ char padding[LTTNG_DOMAIN_PADDING1];
+
+ union {
+ pid_t pid;
+ char exec_name[NAME_MAX];
+ char padding[LTTNG_DOMAIN_PADDING2];
+ } attr;
+};
+
+/*
+ * Perf counter attributes
+ *
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_PERF_EVENT_PADDING1 16
+struct lttng_event_perf_counter_ctx {