X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftrace_event%2Ftrace_event_test.h;h=19fab2ffc6623857017e999c0727fdd2ec9eafb3;hb=3b402b40d669bb6d65eebb91588a2edb8214b7ce;hp=38f0b466a369c034d499acdc2a09267590b2357f;hpb=8d71973c9b5596f5732741975d4334a3abb3ba2a;p=ust.git diff --git a/tests/trace_event/trace_event_test.h b/tests/trace_event/trace_event_test.h index 38f0b46..19fab2f 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,11 +22,6 @@ * 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(_TRACEPOINT_EVENT_TEST_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACEPOINT_EVENT_TEST_H #include @@ -28,17 +31,10 @@ TRACEPOINT_EVENT(test, 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_printf("time=%lu count=%lu", __entry->time, __entry->count) + TP_FIELDS( + tp_field(unsigned long, time, time) + tp_field(unsigned long, count, count) + ) ); #endif /* _TRACEPOINT_EVENT_TEST_H */ @@ -47,4 +43,4 @@ TRACEPOINT_EVENT(test, #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #define TRACE_INCLUDE_FILE trace_event_test -#include +#include