X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftrace_event%2Ftrace_event_test.h;h=72528b8260eb86f3d702e6afc8ed045c8c823026;hb=702d1b7d91bc75f4fc01415fc625af1b834ddec4;hp=b9843bfe19f77e78883c00a00632f8e7ffd2ea2b;hpb=6749958301e384d8491fb3509e3b089ef662d66a;p=lttng-ust.git diff --git a/tests/trace_event/trace_event_test.h b/tests/trace_event/trace_event_test.h index b9843bfe..72528b82 100644 --- a/tests/trace_event/trace_event_test.h +++ b/tests/trace_event/trace_event_test.h @@ -1,4 +1,12 @@ -/* Copyright (C) 2010 Nils Carlson +#undef TRACE_SYSTEM +#define TRACE_SYSTEM trace_event_test + +#if !defined(_TRACEPOINT_EVENT_TEST_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACEPOINT_EVENT_TEST_H + +/* + * Copyright (C) 2010 Nils Carlson + * Copyright (C) 2011 Mathieu Desnoyers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,37 +22,25 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM trace_event_test - -#if !defined(_TRACE_EVENT_TEST_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_EVENT_TEST_H #include -TRACE_EVENT(test, +TRACEPOINT_EVENT(test, TP_PROTO(unsigned long time, unsigned long count), - TP_ARGS(time, count), - - TP_STRUCT__entry( - __field( unsigned long, time ) - __field( unsigned long, count ) - ), - - TP_fast_assign( - __entry->time = time; - __entry->count = count; - ), + TP_VARS(time, count), - TP_printf("time=%lu count=%lu", __entry->time, __entry->count) + TP_FIELDS( + tp_field(unsigned long, time, time) + tp_field(unsigned long, count, count) + ) ); -#endif /* _TRACE_EVENT_TEST_H */ +#endif /* _TRACEPOINT_EVENT_TEST_H */ /* This part must be outside protection */ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #define TRACE_INCLUDE_FILE trace_event_test -#include +#include