/*
- * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
- * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 Julien Desfossez <julien.desfossez@polymtl.ca>
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _LTTNG_KERNEL_H
LTTNG_KERNEL_CONTEXT_VGID = 34,
LTTNG_KERNEL_CONTEXT_VEGID = 35,
LTTNG_KERNEL_CONTEXT_VSGID = 36,
+ LTTNG_KERNEL_CONTEXT_TIME_NS = 37,
};
/* Perf counter attributes */
} u;
} LTTNG_PACKED;
+#define LTTNG_KERNEL_TRIGGER_PADDING1 16
+#define LTTNG_KERNEL_TRIGGER_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_trigger {
+ uint64_t id;
+ uint64_t error_counter_idx;
+ char name[LTTNG_KERNEL_SYM_NAME_LEN]; /* event name */
+ enum lttng_kernel_instrumentation instrumentation;
+ char padding[LTTNG_KERNEL_TRIGGER_PADDING1];
+
+ /* Per instrumentation type configuration */
+ union {
+ struct lttng_kernel_kretprobe kretprobe;
+ struct lttng_kernel_kprobe kprobe;
+ struct lttng_kernel_uprobe uprobe;
+ struct lttng_kernel_function ftrace;
+ char padding[LTTNG_KERNEL_TRIGGER_PADDING2];
+ } u;
+} LTTNG_PACKED;
+
+enum lttng_kernel_counter_arithmetic {
+ LTTNG_KERNEL_COUNTER_ARITHMETIC_MODULAR = 1,
+};
+
+enum lttng_kernel_counter_bitness {
+ LTTNG_KERNEL_COUNTER_BITNESS_32BITS = 1,
+ LTTNG_KERNEL_COUNTER_BITNESS_64BITS = 2,
+};
+
+struct lttng_kernel_counter_dimension {
+ uint64_t size;
+ uint64_t underflow_index;
+ uint64_t overflow_index;
+ uint8_t has_underflow;
+ uint8_t has_overflow;
+} LTTNG_PACKED;
+
+#define LTTNG_KERNEL_COUNTER_DIMENSION_MAX 8
+struct lttng_kernel_counter_conf {
+ uint32_t arithmetic; /* enum lttng_kernel_counter_arithmetic */
+ uint32_t bitness; /* enum lttng_kernel_counter_bitness */
+ uint32_t number_dimensions;
+ int64_t global_sum_step;
+ struct lttng_kernel_counter_dimension dimensions[LTTNG_KERNEL_COUNTER_DIMENSION_MAX];
+} LTTNG_PACKED;
+
+struct lttng_kernel_counter_value {
+ uint32_t number_dimensions;
+ uint64_t dimension_indexes[LTTNG_KERNEL_COUNTER_DIMENSION_MAX];
+ int64_t value;
+} LTTNG_PACKED;
+
+#define LTTNG_KERNEL_TRIGGER_NOTIFICATION_PADDING 32
+struct lttng_kernel_trigger_notification {
+ uint64_t id;
+ uint16_t capture_buf_size;
+ char padding[LTTNG_KERNEL_TRIGGER_NOTIFICATION_PADDING];
+} LTTNG_PACKED;
+
+#define LTTNG_KERNEL_CAPTURE_BYTECODE_MAX_LEN 65536
+struct lttng_kernel_capture_bytecode {
+ uint32_t len;
+ uint32_t reloc_offset;
+ uint64_t seqnum;
+ char data[0];
+} LTTNG_PACKED;
+
struct lttng_kernel_tracer_version {
uint32_t major;
uint32_t minor;