Moved to lttng-tools.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ust-consumerd/ust-consumerd
tests/daemon/daemon
-tests/demo/demo
tests/exit-fast/exit-fast
tests/fork/fork
tests/fork/fork2
tests/hello-static-lib/Makefile
tests/hello.cxx/Makefile
tests/daemon/Makefile
- tests/demo/Makefile
tests/fork/Makefile
tests/ust-basic-tracing/Makefile
tests/ust-multi-test/Makefile
-SUBDIRS = . hello hello-static-lib fork demo daemon
+SUBDIRS = . hello hello-static-lib fork daemon
#ust-basic-tracing ust-multi-test
#SUBDIRS = . hello2 basic basic_long simple_include snprintf test-nevents test-libustinstr-malloc dlopen same_line_marker trace_event register_test tracepoint libustctl_function_tests exit-fast
+++ /dev/null
-# -Wsystem-headers is needed to print warnings in the tracepoint
-# description file.
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
-
-# Set LIBS to nothing so the application does not link on useless
-# libraries.
-LIBS =
-
-if NO_SHARED
-# Do not build this test if shared libraries support was
-# explicitly disabled.
-else
-# Force the shared flag on the noinst libraries since they are
-# only built static by default
-FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
- -rpath $(abs_builddir)
-
-noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \
- liblttng-ust-provider-ust-tests-demo3.la
-
-#contains ust_tests_demo.h and ust_tests_demo2.h provider probes
-liblttng_ust_provider_ust_tests_demo_la_SOURCES = \
- tp.c ust_tests_demo.h \
- tp2.c ust_tests_demo2.h
-liblttng_ust_provider_ust_tests_demo_la_LIBADD = \
- $(top_builddir)/liblttng-ust/liblttng-ust.la
-liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = \
- $(FORCE_SHARED_LIB_OPTIONS)
-
-#contains ust_tests_demo3.h provider probes
-liblttng_ust_provider_ust_tests_demo3_la_SOURCES = \
- tp3.c ust_tests_demo3.h
-liblttng_ust_provider_ust_tests_demo3_la_LIBADD = \
- $(top_builddir)/liblttng-ust/liblttng-ust.la
-liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \
- $(FORCE_SHARED_LIB_OPTIONS)
-
-EXTRA_DIST = demo-trace
-
-noinst_PROGRAMS = demo
-demo_SOURCES = demo.c ust_tests_demo.h
-# The demo program only depends on libdl/libc for dlopen().
-if LTTNG_UST_BUILD_WITH_LIBDL
-demo_LDADD = -ldl
-endif
-if LTTNG_UST_BUILD_WITH_LIBC_DL
-demo_LDADD = -lc
-endif
-
-endif
+++ /dev/null
-This is a demo application used to test the LTTng userspace tracer.
-
-demo-trace shell script preloads the provider shared objects before
-executing the demo. Executing "demo" without the shell wrapper will not
-provide any tracing support. This ensures the demo binary can be
-distributed on distros without depending on having liblttng-ust.so in
-place. Note: the "demo" program must be compiled with "-ldl" on Linux,
-with "-lc" on BSD.
-
-The simplest command to trace the demo program are:
-lttng create
-lttng enable-event -u -a
-lttng start
-./demo-trace
-lttng destroy
-
-That will create a trace in your $HOME/lttng-traces directory.
-
-The resulting babeltrace output should look like this:
-[554297567999315] ust_tests_demo:starting: { 1 }, { value = 123 }
-[554297568020834] ust_tests_demo2:loop: { 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
-[554297568024780] ust_tests_demo2:loop: { 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
-[554297568027050] ust_tests_demo2:loop: { 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
-[554297568029014] ust_tests_demo2:loop: { 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
-[554297568030861] ust_tests_demo2:loop: { 1 }, { intfield = 4, intfield2 = 0x4, longfield = 4, netintfield = 4, netintfieldhex = 0x4, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
-[554297568033138] ust_tests_demo:done: { 1 }, { value = 456 }
-[554297568034533] ust_tests_demo3:done: { 1 }, { value = 42 }
+++ /dev/null
-#!/bin/sh
-
-LD_PRELOAD=.libs/liblttng-ust-provider-ust-tests-demo.so:.libs/liblttng-ust-provider-ust-tests-demo3.so ./demo ${*}
+++ /dev/null
-/*
- * Copyright (C) 2009 Pierre-Marc Fournier
- * 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; version 2.1 of
- * the License.
- *
- * 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 <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <stdlib.h>
-
-#define TRACEPOINT_DEFINE
-#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
-#include "ust_tests_demo.h"
-#include "ust_tests_demo2.h"
-#include "ust_tests_demo3.h"
-
-int main(int argc, char **argv)
-{
- int i, netint;
- long values[] = { 1, 2, 3 };
- char text[10] = "test";
- double dbl = 2.0;
- float flt = 2222.0;
- int delay = 0;
-
- if (argc == 2)
- delay = atoi(argv[1]);
-
- fprintf(stderr, "Demo program starting.\n");
-
- sleep(delay);
-
- fprintf(stderr, "Tracing... ");
- tracepoint(ust_tests_demo, starting, 123);
- for (i = 0; i < 5; i++) {
- netint = htonl(i);
- tracepoint(ust_tests_demo2, loop, i, netint, values,
- text, strlen(text), dbl, flt);
- }
- tracepoint(ust_tests_demo, done, 456);
- tracepoint(ust_tests_demo3, done, 42);
- fprintf(stderr, " done.\n");
- return 0;
-}
+++ /dev/null
-/*
- * tp.c
- *
- * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#define TRACEPOINT_CREATE_PROBES
-#include "ust_tests_demo.h"
+++ /dev/null
-/*
- * tp2.c
- *
- * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#define TRACEPOINT_CREATE_PROBES
-#include "ust_tests_demo2.h"
+++ /dev/null
-/*
- * tp3.c
- *
- * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#define TRACEPOINT_CREATE_PROBES
-#include "ust_tests_demo3.h"
+++ /dev/null
-#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER ust_tests_demo
-
-#if !defined(_TRACEPOINT_UST_TESTS_DEMO_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_UST_TESTS_DEMO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <lttng/tracepoint.h>
-
-TRACEPOINT_EVENT(ust_tests_demo, starting,
- TP_ARGS(int, value),
- TP_FIELDS(
- ctf_integer(int, value, value)
- )
-)
-TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, TRACE_CRIT)
-
-/*
- * Dummy model information, just for example. TODO: we should check if
- * EMF model URI have some standard format we should follow.
- */
-TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting,
- "http://example.com/path_to_model?q=ust_tests_demo:starting")
-
-TRACEPOINT_EVENT(ust_tests_demo, done,
- TP_ARGS(int, value),
- TP_FIELDS(
- ctf_integer(int, value, value)
- )
-)
-TRACEPOINT_LOGLEVEL(ust_tests_demo, done, TRACE_CRIT)
-
-TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done,
- "http://example.com/path_to_model?q=ust_tests_demo:done")
-
-#endif /* _TRACEPOINT_UST_TESTS_DEMO_H */
-
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./ust_tests_demo.h"
-
-/* This part must be outside ifdef protection */
-#include <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}
-#endif
+++ /dev/null
-#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER ust_tests_demo2
-
-#if !defined(_TRACEPOINT_UST_TESTS_DEMO2_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_UST_TESTS_DEMO2_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <lttng/tracepoint.h>
-
-TRACEPOINT_EVENT(ust_tests_demo2, loop,
- TP_ARGS(int, anint, int, netint, long *, values,
- char *, text, size_t, textlen,
- double, doublearg, float, floatarg),
- TP_FIELDS(
- ctf_integer(int, intfield, anint)
- ctf_integer_hex(int, intfield2, anint)
- ctf_integer(long, longfield, anint)
- ctf_integer_network(int, netintfield, netint)
- ctf_integer_network_hex(int, netintfieldhex, netint)
- ctf_array(long, arrfield1, values, 3)
- ctf_array_text(char, arrfield2, text, 10)
- ctf_sequence(char, seqfield1, text,
- size_t, textlen)
- ctf_sequence_text(char, seqfield2, text,
- size_t, textlen)
- ctf_string(stringfield, text)
- ctf_float(float, floatfield, floatarg)
- ctf_float(double, doublefield, doublearg)
- )
-)
-TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, TRACE_WARNING)
-
-#endif /* _TRACEPOINT_UST_TESTS_DEMO2_H */
-
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./ust_tests_demo2.h"
-
-/* This part must be outside ifdef protection */
-#include <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}
-#endif
+++ /dev/null
-#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER ust_tests_demo3
-
-#if !defined(_TRACEPOINT_UST_TESTS_DEMO3_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_UST_TESTS_DEMO3_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <lttng/tracepoint.h>
-
-TRACEPOINT_EVENT(ust_tests_demo3, done,
- TP_ARGS(int, value),
- TP_FIELDS(
- ctf_integer(int, value, value)
- )
-)
-TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, TRACE_WARNING)
-
-#endif /* _TRACEPOINT_UST_TESTS_DEMO3_H */
-
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./ust_tests_demo3.h"
-
-/* This part must be outside ifdef protection */
-#include <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}
-#endif