From 41aaf8a5de3c7c3570e0fe063f1565385b4a4dbd Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 10 Aug 2011 14:17:33 -0400 Subject: [PATCH] Tracepoint event test update Signed-off-by: Mathieu Desnoyers --- include/ust/lttng-tracepoint-event.h | 6 +++--- tests/hello/hello.c | 7 +++---- tests/hello/tp.c | 2 +- tests/hello/{tp.h => ust_tests_hello.h} | 14 +++++++------- 4 files changed, 14 insertions(+), 15 deletions(-) rename tests/hello/{tp.h => ust_tests_hello.h} (78%) diff --git a/include/ust/lttng-tracepoint-event.h b/include/ust/lttng-tracepoint-event.h index 70d7c653..010a54dc 100644 --- a/include/ust/lttng-tracepoint-event.h +++ b/include/ust/lttng-tracepoint-event.h @@ -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); diff --git a/tests/hello/hello.c b/tests/hello/hello.c index d30901a5..afa4a713 100644 --- a/tests/hello/hello.c +++ b/tests/hello/hello.c @@ -26,8 +26,7 @@ #include #include -#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; } diff --git a/tests/hello/tp.c b/tests/hello/tp.c index a9ea5dc5..509f5a49 100644 --- a/tests/hello/tp.c +++ b/tests/hello/tp.c @@ -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/ust_tests_hello.h similarity index 78% rename from tests/hello/tp.h rename to tests/hello/ust_tests_hello.h index b6b3ff23..a4e32964 100644 --- a/tests/hello/tp.h +++ b/tests/hello/ust_tests_hello.h @@ -1,8 +1,8 @@ #undef TRACEPOINT_SYSTEM -#define TRACEPOINT_SYSTEM tp +#define TRACEPOINT_SYSTEM ust_tests_hello -#if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_TP_H +#if !defined(_TRACEPOINT_UST_TESTS_HELLO_H) || defined(TRACEPOINT_HEADER_MULTI_READ) +#define _TRACEPOINT_UST_TESTS_HELLO_H /* * Copyright (C) 2011 Mathieu Desnoyers @@ -29,9 +29,9 @@ TRACEPOINT_EVENT(ust_tests_hello_tptest, 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) + 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, @@ -42,7 +42,7 @@ TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler, #undef TRACEPOINT_INCLUDE_PATH #define TRACEPOINT_INCLUDE_PATH . #undef TRACEPOINT_INCLUDE_FILE -#define TRACEPOINT_INCLUDE_FILE tp +#define TRACEPOINT_INCLUDE_FILE ust_tests_hello /* This part must be outside protection */ #include -- 2.34.1