X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Flttng-kernel.h;h=e8647f439fcdd0dc7c638899504b8978179a750f;hp=151137004e2f026e15b04c84f5c9e1ff72c94dbb;hb=989a08449dcb82204cd8caeb7841d5c20d32b475;hpb=d01c0e5606d656a1118348f693b3593554b1e58f diff --git a/src/common/lttng-kernel.h b/src/common/lttng-kernel.h index 151137004..e8647f439 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 */ @@ -138,28 +129,76 @@ struct lttng_kernel_event_callsite { } u; } LTTNG_PACKED; +enum lttng_kernel_syscall_entryexit { + LTTNG_KERNEL_SYSCALL_ENTRYEXIT = 0, + LTTNG_KERNEL_SYSCALL_ENTRY = 1, + LTTNG_KERNEL_SYSCALL_EXIT = 2, +}; + +enum lttng_kernel_syscall_abi { + LTTNG_KERNEL_SYSCALL_ABI_ALL = 0, + LTTNG_KERNEL_SYSCALL_ABI_NATIVE = 1, + LTTNG_KERNEL_SYSCALL_ABI_COMPAT = 2, +}; + +enum lttng_kernel_syscall_match { + LTTNG_KERNEL_SYSCALL_MATCH_NAME = 0, + LTTNG_KERNEL_SYSCALL_MATCH_NR = 1, +}; + +struct lttng_kernel_syscall { + uint8_t entryexit; /* enum lttng_kernel_syscall_entryexit */ + uint8_t abi; /* enum lttng_kernel_syscall_abi */ + uint8_t match; /* enum lttng_kernel_syscall_match */ + uint8_t padding; + uint32_t nr; /* For LTTNG_SYSCALL_MATCH_NR */ +} LTTNG_PACKED; + /* Function tracer */ struct lttng_kernel_function { char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN]; } LTTNG_PACKED; -#define LTTNG_KERNEL_EVENT_PADDING1 16 +#define LTTNG_KERNEL_EVENT_PADDING1 8 #define LTTNG_KERNEL_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32 struct lttng_kernel_event { char name[LTTNG_KERNEL_SYM_NAME_LEN]; enum lttng_kernel_instrumentation instrumentation; + uint64_t token; char padding[LTTNG_KERNEL_EVENT_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; + struct lttng_kernel_uprobe uprobe; + struct lttng_kernel_syscall syscall; char padding[LTTNG_KERNEL_EVENT_PADDING2]; } u; } LTTNG_PACKED; +#define LTTNG_KERNEL_EVENT_NOTIFIER_PADDING 40 +struct lttng_kernel_event_notifier { + struct lttng_kernel_event event; + char padding[LTTNG_KERNEL_EVENT_NOTIFIER_PADDING]; +} LTTNG_PACKED; + +#define LTTNG_KERNEL_EVENT_NOTIFIER_NOTIFICATION_PADDING 32 +struct lttng_kernel_event_notifier_notification { + uint64_t token; + uint16_t capture_buf_size; + char padding[LTTNG_KERNEL_EVENT_NOTIFIER_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;