*/
/*
- * This test is aimed at testing tracepoint *with* trace_mark :
+ * This test is aimed at testing tracepoint *with* ust_marker :
*
* 1) tracepoint named : "ust_event"
* -) Probe 1 registered and recording the value 13 (x5)
#include <ust/marker.h>
#include "tracepoint_test.h"
-DEFINE_TRACE(ust_event);
-DEFINE_TRACE(ust_event2);
+DEFINE_TRACEPOINT(ust_event);
+DEFINE_TRACEPOINT(ust_event2);
static struct message msg_probe3 = {
.payload = "probe3",
{
int i;
for (i = 0; i < 100; i++) {
- trace_mark_tp(event2, ust_event2, tp_probe4, "probe4 %u", p4);
+ ust_marker_tp(event2, ust_event2, tp_probe4, "probe4 %u", p4);
}
}
{
struct message *msg;
msg = (struct message*) data;
- trace_mark_tp(event_msg, ust_event_msg,
+ ust_marker_tp(event_msg, ust_event_msg,
tp_probe3, "probe %s", msg->payload);
}
{
int i;
for (i = 0; i < 5; i++) {
- trace_mark_tp(event, ust_event, tp_probe2, "probe %u", 13);
+ ust_marker_tp(event, ust_event, tp_probe2, "probe %u", 13);
}
}
{
int i;
for (i = 0; i < 5; i++) {
- trace_mark_tp(event, ust_event, tp_probe, "probe %u", p1);
+ ust_marker_tp(event, ust_event, tp_probe, "probe %u", p1);
}
}
static void __attribute__((constructor)) init()
{
- register_trace_ust_event(tp_probe, NULL);
- register_trace_ust_event(tp_probe2, NULL);
- register_trace_ust_event(tp_probe3, &msg_probe3);
- register_trace_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) {
unsigned int v = 42;
/* Tracepoint 1 : ust_event */
- trace_ust_event(v);
+ tracepoint(ust_event, v);
/* Tracepoint 2 : ust_event2 */
- trace_ust_event2(v);
+ tracepoint(ust_event2, v);
return 0;
}