Initial import of the new binary lttng-relayd
[lttng-tools.git] / src / common / lttng-kernel.h
index e8bc626262a674fc76c5f18332a257bb1b4a76ab..cbeed1b1982c057d944d64c5ba2496a4f411e492 100644 (file)
@@ -3,19 +3,18 @@
  *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *                      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
- * 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 <stdint.h>
 
-#define LTTNG_SYM_NAME_LEN  256
+#define LTTNG_KERNEL_SYM_NAME_LEN  256
 
 /*
  * LTTng DebugFS ABI structures.
@@ -44,7 +43,7 @@ enum lttng_kernel_instrumentation {
 enum lttng_kernel_context_type {
        LTTNG_KERNEL_CONTEXT_PID            = 0,
        LTTNG_KERNEL_CONTEXT_PERF_COUNTER   = 1,
-       LTTNG_KERNEL_CONTEXT_COMM           = 2,
+       LTTNG_KERNEL_CONTEXT_PROCNAME       = 2,
        LTTNG_KERNEL_CONTEXT_PRIO           = 3,
        LTTNG_KERNEL_CONTEXT_NICE           = 4,
        LTTNG_KERNEL_CONTEXT_VPID           = 5,
@@ -58,14 +57,19 @@ enum lttng_kernel_context_type {
 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 +77,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 +87,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 {
This page took 0.024247 seconds and 4 git commands to generate.