Tracepoints: add wrapper tracepoint() macro
[ust.git] / tests / register_test / register_test.c
index 90fca12edf99f3ceba67f5e82ee22aa07774079f..02225deb56fa32fc9fe780c0137d82006fce4463 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <ust/marker.h>
 #include "usterr.h"
-#include "tracer.h"
 #include "tp.h"
 
 DEFINE_TRACE(hello_tptest);
@@ -55,7 +54,7 @@ void tptest_probe(void *data, int anint)
 
 static void * register_thread_main(void *data)
 {
-       int ret, i, j = 0;
+       int i, j = 0;
 
        struct hello_trace_struct hello[HELLO_LENGTH];
 
@@ -66,30 +65,31 @@ static void * register_thread_main(void *data)
        }
 
        for (i=0; i<1000; i++) {
-               while (!register_trace_hello_tptest(tptest_probe,
+               while (!register_tracepoint(hello_tptest, tptest_probe,
                                                    &hello[j%HELLO_LENGTH])) {
                        usleep(10);
                        j++;
                }
                printf("Registered all\n");
-               while (!unregister_trace_hello_tptest(tptest_probe,
+               while (!unregister_tracepoint(hello_tptest, tptest_probe,
                                                      &hello[j%HELLO_LENGTH])) {
                        usleep(10);
                        j++;
                }
                printf("Unregistered all\n");
        }
+       return NULL;
 }
 
 
-int main()
+int main(int argc, char **argv)
 {
        pthread_t register_thread;
        int i;
 
        pthread_create(&register_thread, NULL, register_thread_main, NULL);
        for(i=0; i<1000000; i++) {
-               trace_hello_tptest(i);
+               tracepoint(hello_tptest, i);
        }
 
        return 0;
This page took 0.02325 seconds and 4 git commands to generate.