Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
simple_harness_run same_line_marker/same_line_marker.sh
# This testcase is currently broken, do not run.
simple_harness_run same_line_marker/same_line_marker.sh
# This testcase is currently broken, do not run.
-# simple_harness_run tracepoint/run
+simple_harness_run tracepoint/run
simple_harness_run libustctl_function_tests/libustctl_function_tests
simple_harness_run libustctl_function_tests/libustctl_function_tests
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = -I$(top_srcdir)/include
-#noinst_PROGRAMS = tracepoint_test
-#tracepoint_test_SOURCES = tracepoint_test.c tracepoint_test.h
-#tracepoint_test_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
+noinst_PROGRAMS = tracepoint_test
+tracepoint_test_SOURCES = tracepoint_test.c tracepoint_test.h
+tracepoint_test_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
-#FIXME: this test is broken:
-#ust/tests/tracepoint/tracepoint_test.c:64: undefined reference to
-#`register_trace_ust_event_msg'
-#CFLAGS_tracepoint_test.o = -I$(src)
+CFLAGS_tracepoint_test.o = -I$(src)
noinst_SCRIPTS = run
EXTRA_DIST = run
noinst_SCRIPTS = run
EXTRA_DIST = run
source $TESTDIR/test_functions.sh
source $TESTDIR/tap.sh
source $TESTDIR/test_functions.sh
source $TESTDIR/tap.sh
-starttest "Testing Tracepoints"
+starttest "Testing Deprecated Tracepoints"
plan_tests 6
USTTRACE="$TESTDIR/../usttrace"
plan_tests 6
USTTRACE="$TESTDIR/../usttrace"
#include <ust/marker.h>
#include "tracepoint_test.h"
#include <ust/marker.h>
#include "tracepoint_test.h"
-DEFINE_TRACEPOINT(ust_event);
-DEFINE_TRACEPOINT(ust_event2);
+DEFINE_TRACE(ust_event);
+DEFINE_TRACE(ust_event2);
static struct message msg_probe3 = {
.payload = "probe3",
static struct message msg_probe3 = {
.payload = "probe3",
{
int i;
for (i = 0; i < 100; i++) {
{
int i;
for (i = 0; i < 100; i++) {
- ust_marker_tp(event2, ust_event2, tp_probe4, "probe4 %u", p4);
+ ust_marker(event2, "probe4 %u", p4);
{
struct message *msg;
msg = (struct message*) data;
{
struct message *msg;
msg = (struct message*) data;
- ust_marker_tp(event_msg, ust_event_msg,
- tp_probe3, "probe %s", msg->payload);
+ ust_marker(event_msg,
+ "probe %s", msg->payload);
{
int i;
for (i = 0; i < 5; i++) {
{
int i;
for (i = 0; i < 5; i++) {
- ust_marker_tp(event, ust_event, tp_probe2, "probe %u", 13);
+ ust_marker(event, "probe %u", 13);
{
int i;
for (i = 0; i < 5; i++) {
{
int i;
for (i = 0; i < 5; i++) {
- ust_marker_tp(event, ust_event, tp_probe, "probe %u", p1);
+ ust_marker(event, "probe %u", p1);
}
}
static void __attribute__((constructor)) init()
{
}
}
static void __attribute__((constructor)) init()
{
- register_tracepoint(ust_event, tp_probe, NULL);
- register_tracepoint(ust_event, tp_probe2, NULL);
- register_tracepoint(ust_event, tp_probe3, &msg_probe3);
- register_tracepoint(ust_event2, tp_probe4, NULL);
+ __register_tracepoint(ust_event, tp_probe, NULL);
+ __register_tracepoint(ust_event, tp_probe2, NULL);
+ __register_tracepoint(ust_event, tp_probe3, &msg_probe3);
+ __register_tracepoint(ust_event2, tp_probe4, NULL);
}
int main(int argc, char **argv) {
}
int main(int argc, char **argv) {
#include <ust/tracepoint.h>
#include <ust/tracepoint.h>
-DECLARE_TRACEPOINT(ust_event, TP_PROTO(unsigned int v), TP_ARGS(v));
-DECLARE_TRACEPOINT(ust_event2, TP_PROTO(unsigned int v), TP_ARGS(v));
+DECLARE_TRACE(ust_event, TP_PROTO(unsigned int v), TP_ARGS(v));
+DECLARE_TRACE(ust_event2, TP_PROTO(unsigned int v), TP_ARGS(v));
struct message {
char *payload;
struct message {
char *payload;