# the linker script.
SUBDIRS = snprintf libustcomm libustcmd libust . tests libustinstr-malloc libustd ustd ustctl libustfork include doc
-EXTRA_DIST = libust.ldscript.in libust-initializer.c
+EXTRA_DIST = libust.ldscript.in libust-initializer.c libust-initializer.h
dist_bin_SCRIPTS = usttrace
ldscriptsdir = $(libdir)
# It is very important to compile the initializer with PIC otherwise we
# may get obscure errors when linking to shared libraries.
libust-initializer.o: libust-initializer.c
- $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -o $@ $<
+ $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -I$(top_srcdir) -o $@ $<
DECLARE_TRACE(ust_dummytp, TP_PROTO(int anint), TP_ARGS(anint));
DEFINE_TRACE(ust_dummytp);
+#define CREATE_TRACE_POINTS
+#include "libust-initializer.h"
+
void dummy_libust_initializer_func(void)
{
int i;
trace_mark(ust, dummymark, MARK_NOARGS);
trace_ust_dummytp(i);
+ trace_ust_dummy_event(i);
}
MARKER_LIB;
TRACEPOINT_LIB;
+TRACE_EVENT_LIB;
--- /dev/null
+/* Copyright (C) 2010 Nils Carlson <nils.carlson@ericsson.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
+ */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ust_dummy
+
+#if !defined(_TRACE_EVENT_TEST_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_EVENT_TEST_H
+
+#include <ust/tracepoint.h>
+
+TRACE_EVENT(ust_dummy_event,
+
+ TP_PROTO(int dummy_int),
+
+ TP_ARGS(dummy_int),
+
+ TP_STRUCT__entry(
+ __field( int, dummy )
+ ),
+
+ TP_fast_assign(
+ __entry->dummy = dummy_int;
+ ),
+
+ TP_printf("dummy=%d", __entry->dummy)
+);
+
+#endif /* _TRACE_EVENT_TEST_H */
+
+/* This part must be outside protection */
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_FILE libust-initializer
+#include <ust/define_trace.h>