X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Flttng-kernel.h;h=dbeb6aa0a9a7a4489fcc5d91adbdaf9d635f44e5;hp=6451c9638db4c007bc5fc5b5b11ac48496e1b3a8;hb=32dd26fbc3c69fe677a7917535e10ace066e674c;hpb=9197c5c48e2d1db4c2f9318bbf0af0af9918fdc8 diff --git a/src/common/lttng-kernel.h b/src/common/lttng-kernel.h index 6451c9638..dbeb6aa0a 100644 --- a/src/common/lttng-kernel.h +++ b/src/common/lttng-kernel.h @@ -3,19 +3,18 @@ * Mathieu Desnoyers * David Goulet * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; only version 2 - * of the License. + * 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. * - * 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. + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 @@ -23,7 +22,7 @@ #include -#define LTTNG_SYM_NAME_LEN 256 +#define LTTNG_KERNEL_SYM_NAME_LEN 256 /* * LTTng DebugFS ABI structures. @@ -52,20 +51,26 @@ enum lttng_kernel_context_type { LTTNG_KERNEL_CONTEXT_VTID = 7, LTTNG_KERNEL_CONTEXT_PPID = 8, LTTNG_KERNEL_CONTEXT_VPPID = 9, + LTTNG_KERNEL_CONTEXT_HOSTNAME = 10, }; /* Perf counter attributes */ struct lttng_kernel_perf_counter_ctx { uint32_t type; uint64_t config; - char name[LTTNG_SYM_NAME_LEN]; + char name[LTTNG_KERNEL_SYM_NAME_LEN]; }; /* Event/Channel context */ +#define LTTNG_KERNEL_CONTEXT_PADDING1 16 +#define LTTNG_KERNEL_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32 struct lttng_kernel_context { enum lttng_kernel_context_type ctx; + char padding[LTTNG_KERNEL_CONTEXT_PADDING1]; + union { struct lttng_kernel_perf_counter_ctx perf_counter; + char padding[LTTNG_KERNEL_CONTEXT_PADDING2]; } u; }; @@ -73,7 +78,7 @@ struct lttng_kernel_kretprobe { uint64_t addr; uint64_t offset; - char symbol_name[LTTNG_SYM_NAME_LEN]; + char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN]; }; /* @@ -83,29 +88,34 @@ struct lttng_kernel_kprobe { uint64_t addr; uint64_t offset; - char symbol_name[LTTNG_SYM_NAME_LEN]; + char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN]; }; /* Function tracer */ struct lttng_kernel_function { - char symbol_name[LTTNG_SYM_NAME_LEN]; + char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN]; }; +#define LTTNG_KERNEL_EVENT_PADDING1 16 +#define LTTNG_KERNEL_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32 struct lttng_kernel_event { - char name[LTTNG_SYM_NAME_LEN]; + char name[LTTNG_KERNEL_SYM_NAME_LEN]; enum lttng_kernel_instrumentation instrumentation; + char padding[LTTNG_KERNEL_EVENT_PADDING1]; + /* Per instrumentation type configuration */ union { struct lttng_kernel_kretprobe kretprobe; struct lttng_kernel_kprobe kprobe; struct lttng_kernel_function ftrace; + char padding[LTTNG_KERNEL_EVENT_PADDING2]; } u; }; struct lttng_kernel_tracer_version { - uint32_t version; + uint32_t major; + uint32_t minor; uint32_t patchlevel; - uint32_t sublevel; }; enum lttng_kernel_calibrate_type {