Tracepoint event test update
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Aug 2011 18:17:33 +0000 (14:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Aug 2011 18:17:33 +0000 (14:17 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/lttng-tracepoint-event.h
tests/hello/hello.c
tests/hello/tp.c
tests/hello/tp.h [deleted file]
tests/hello/ust_tests_hello.h [new file with mode: 0644]

index 70d7c653263c0edc43ef1a69ea101a4cb3600855..010a54dc01565c71594a8e69118c647ee5438904 100644 (file)
@@ -279,7 +279,7 @@ static struct lttng_probe_desc TP_ID(__probe_desc___, TRACEPOINT_SYSTEM) = {
        __event_len += sizeof(_type);
 
 #undef ctf_array_encoded
-#define ctf_array_encoded(_type, _item, _src, _length)                        \
+#define ctf_array_encoded(_type, _item, _src, _length, _encoding)             \
        __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
        __event_len += sizeof(_type) * (_length);
 
@@ -351,7 +351,7 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len)             \
        __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
 
 #undef ctf_array_encoded
-#define ctf_array_encoded(_type, _item, _src, _length)                        \
+#define ctf_array_encoded(_type, _item, _src, _length, _encoding)             \
        __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
 
 #undef ctf_sequence_encoded
@@ -421,7 +421,7 @@ static inline size_t __event_get_align__##_name(void)                             \
        }
 
 #undef ctf_array_encoded
-#define ctf_array_encoded(_type, _item, _src, _length)                 \
+#define ctf_array_encoded(_type, _item, _src, _length, _encoding)       \
        lib_ring_buffer_align_ctx(&ctx, lttng_alignof(_type));          \
        __chan->ops->event_write(&ctx, _src, _length);
 
index d30901a5517108a5e6c67135e2b279a25a9e181b..afa4a713bf2569b536404c77cf322fbfe9f1a486 100644 (file)
@@ -26,8 +26,7 @@
 #include <fcntl.h>
 #include <signal.h>
 
-#include "usterr.h"
-#include "tp.h"
+#include "ust_tests_hello.h"
 
 void inthandler(int sig)
 {
@@ -42,7 +41,7 @@ int init_int_handler(void)
 
        result = sigemptyset(&act.sa_mask);
        if (result == -1) {
-               PERROR("sigemptyset");
+               perror("sigemptyset");
                return -1;
        }
 
@@ -54,7 +53,7 @@ int init_int_handler(void)
         */
        result = sigaction(SIGUSR1, &act, NULL);
        if (result == -1) {
-               PERROR("sigaction");
+               perror("sigaction");
                return -1;
        }
 
index a9ea5dc518a13b4d77fffd411fd7bb38f396861e..509f5a4912d625b687846403f185404a4ac1255e 100644 (file)
@@ -19,4 +19,4 @@
  */
 
 #define TRACEPOINT_CREATE_PROBES
-#include "tp.h"
+#include "ust_tests_hello.h"
diff --git a/tests/hello/tp.h b/tests/hello/tp.h
deleted file mode 100644 (file)
index b6b3ff2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM tp
-
-#if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_TP_H
-
-/*
- * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#include <ust/tracepoint.h>
-
-TRACEPOINT_EVENT(ust_tests_hello_tptest,
-                       TP_PROTO(int anint),
-                       TP_ARGS(anint),
-                       TP_FIELDS(
-                               ctf_integer(int, intfield, anint)
-                               ctf_integer_hex(int, intfield, anint)
-                               ctf_integer_network(int, intfield, anint)
-                               ctf_integer_network_hex(int, intfield, anint)
-                       ))
-
-TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler,
-                       TP_FIELDS())
-
-#endif /* _TRACEPOINT_TP_H */
-
-#undef TRACEPOINT_INCLUDE_PATH
-#define TRACEPOINT_INCLUDE_PATH .
-#undef TRACEPOINT_INCLUDE_FILE
-#define TRACEPOINT_INCLUDE_FILE tp
-
-/* This part must be outside protection */
-#include <ust/tracepoint-event.h>
diff --git a/tests/hello/ust_tests_hello.h b/tests/hello/ust_tests_hello.h
new file mode 100644 (file)
index 0000000..a4e3296
--- /dev/null
@@ -0,0 +1,48 @@
+#undef TRACEPOINT_SYSTEM
+#define TRACEPOINT_SYSTEM ust_tests_hello
+
+#if !defined(_TRACEPOINT_UST_TESTS_HELLO_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_UST_TESTS_HELLO_H
+
+/*
+ * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <ust/tracepoint.h>
+
+TRACEPOINT_EVENT(ust_tests_hello_tptest,
+                       TP_PROTO(int anint),
+                       TP_ARGS(anint),
+                       TP_FIELDS(
+                               ctf_integer(int, intfield, anint)
+                               ctf_integer_hex(int, intfield2, anint)
+                               ctf_integer_network(int, intfield3, anint)
+                               ctf_integer_network_hex(int, intfield4, anint)
+                       ))
+
+TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler,
+                       TP_FIELDS())
+
+#endif /* _TRACEPOINT_TP_H */
+
+#undef TRACEPOINT_INCLUDE_PATH
+#define TRACEPOINT_INCLUDE_PATH .
+#undef TRACEPOINT_INCLUDE_FILE
+#define TRACEPOINT_INCLUDE_FILE ust_tests_hello
+
+/* This part must be outside protection */
+#include <ust/tracepoint-event.h>
This page took 0.031123 seconds and 4 git commands to generate.