ust: cleanup hello.c
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 18 Feb 2009 00:06:45 +0000 (19:06 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 18 Feb 2009 00:06:45 +0000 (19:06 -0500)
hello/hello.c
hello/marker-control.c
libtracing/relay.c

index b4f5216ed9bc8712ca8ff66abf774fd3063fc794..d6429f133ba339e411fb01250f96de5d0bcb3756 100644 (file)
@@ -200,26 +200,6 @@ int main()
 
        init_int_handler();
 
-       init_ustrelay_transport();
-
-       printf("page size is %d\n", sysconf(_SC_PAGE_SIZE));
-
-//     extern struct marker __start___markers[] __attribute__((visibility("hidden")));
-//     extern struct marker __stop___markers[] __attribute__((visibility("hidden")));
-//
-//     printf("the executable's markers start at %lx and end at %lx, the size of a marker is %d\n", __start___markers, __stop___markers, sizeof(struct marker));
-
-       marker_control_init();
-
-       //marker_probe_register("abc", "testmark", "", probe, NULL);
-//ust//        marker_probe_register("metadata", "core_marker_id", "channel %s name %s event_id %hu int #1u%zu long #1u%zu pointer #1u%zu size_t #1u%zu alignment #1u%u", probe, NULL);
-//ust//        result = ltt_probe_register(&default_probe);
-//ust//        if(result)
-//ust//                ERR("ltt_probe_register");
-       
-       //result = ltt_marker_connect("metadata", "testev", "default");
-       //if(result)
-       //      ERR("ltt_marker_connect");
        result = ltt_marker_connect("foo", "bar", "default");
        if(result)
                ERR("ltt_marker_connect");
@@ -253,16 +233,7 @@ int main()
 
        sleep(1);
        for(i=0; i<50; i++) {
-               //trace_mark(abc, testmark, "", MARK_NOARGS);
-               //trace_mark(metadata, testev, "", MARK_NOARGS);
                trace_mark(foo, bar, "%s", "FOOBAZ");
-               //trace_mark(metadata, core_marker_id,
-               //         "channel %s name %s event_id %hu "
-               //         "int #1u%zu long #1u%zu pointer #1u%zu "
-               //         "size_t #1u%zu alignment #1u%u",
-               //         "abc", "def", (unsigned short)1000,
-               //         sizeof(int), sizeof(long), sizeof(void *),
-               //         sizeof(size_t), ltt_get_alignment());
                usleep(100000);
        }
 
index 419147a4475710a521d1f569d803197fdad317bf..9d231d1143438b83358fdd2d5ea86f6c104c4fb3 100644 (file)
@@ -409,7 +409,7 @@ static void disconnect_all_markers(void)
        }
 }
 
-int marker_control_init(void)
+int __attribute__((constructor)) marker_control_init(void)
 {
        int ret;
 
index ad22727a5f7102e731ed7cda741f00f847fa5d66..4c8dd2a5aaa63bedf91ceba7b9b38b0113513678 100644 (file)
@@ -2344,7 +2344,7 @@ static struct ltt_transport ust_relay_transport = {
 //ust//        return 0;
 //ust// }
 
-void init_ustrelay_transport(void)
+void __attribute__((constructor)) init_ustrelay_transport(void)
 {
        ltt_transport_register(&ust_relay_transport);
 }
This page took 0.02576 seconds and 4 git commands to generate.