X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Flttng-kernel.h;h=cdf6f041bd4d563c52112019fbb4b767fe16d718;hp=151137004e2f026e15b04c84f5c9e1ff72c94dbb;hb=2463b7879c00298daa79744cdaae82ac061a4ed8;hpb=d01c0e5606d656a1118348f693b3593554b1e58f diff --git a/src/common/lttng-kernel.h b/src/common/lttng-kernel.h index 151137004..cdf6f041b 100644 --- a/src/common/lttng-kernel.h +++ b/src/common/lttng-kernel.h @@ -1,20 +1,10 @@ /* - * Copyright (C) 2011 - Julien Desfossez - * Mathieu Desnoyers - * David Goulet + * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011 Mathieu Desnoyers + * Copyright (C) 2011 David Goulet * - * 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 @@ -85,6 +75,7 @@ enum lttng_kernel_context_type { LTTNG_KERNEL_CONTEXT_VGID = 34, LTTNG_KERNEL_CONTEXT_VEGID = 35, LTTNG_KERNEL_CONTEXT_VSGID = 36, + LTTNG_KERNEL_CONTEXT_TIME_NS = 37, }; /* Perf counter attributes */ @@ -160,6 +151,72 @@ struct lttng_kernel_event { } 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;