remove usage of the marker_addr section
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Thu, 7 Jan 2010 17:00:19 +0000 (12:00 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 11 Jan 2010 21:07:56 +0000 (16:07 -0500)
include/ust/marker.h
libust/marker.c

index 77605009ab3b299403102e5e3b9be140b5953ef0..27dd8fe8880d4b499363983cf10c235d07453c9f 100644 (file)
@@ -350,40 +350,18 @@ struct lib {
        struct list_head list;
 };
 
-extern int marker_register_lib(struct marker *markers_start,
-                              struct marker_addr *marker_addr_start,
-                              int markers_count);
-
-#ifdef CONFIG_UST_GDB_INTEGRATION
+extern int marker_register_lib(struct marker *markers_start, int markers_count);
 
 #define MARKER_LIB                                                     \
        extern struct marker __start___markers[] __attribute__((weak, visibility("hidden"))); \
        extern struct marker __stop___markers[] __attribute__((weak, visibility("hidden"))); \
-       extern struct marker_addr __start___marker_addr[] __attribute__((weak, visibility("hidden"))); \
-       extern struct marker_addr __stop___marker_addr[] __attribute__((weak, visibility("hidden"))); \
                                                                        \
        static void __attribute__((constructor)) __markers__init(void)  \
        {                                                               \
-               marker_register_lib(__start___markers, /*__start___marker_addr*/ NULL, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker)); \
+               marker_register_lib(__start___markers, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker)); \
        }
 
 extern void marker_set_new_marker_cb(void (*cb)(struct marker *));
 extern void init_markers(void);
 
-#else /* CONFIG_UST_GDB_INTEGRATION */
-
-#define MARKER_LIB                                                     \
-       extern struct marker __start___markers[] __attribute__((weak, visibility("hidden"))); \
-       extern struct marker __stop___markers[] __attribute__((weak, visibility("hidden"))); \
-                                                                       \
-       static void __attribute__((constructor)) __markers__init(void)  \
-       {                                                               \
-               marker_register_lib(__start___markers, NULL, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker)); \
-       }
-
-extern void marker_set_new_marker_cb(void (*cb)(struct marker *));
-extern void init_markers(void);
-
-#endif /* CONFIG_UST_GDB_INTEGRATION */
-
 #endif /* _UST_MARKER_H */
index 01a515d173c6c22be521cedafd8945c293c55498..8e2a398ef23f915b6e7e8cf7e76cba5cd9c0d2a8 100644 (file)
@@ -47,11 +47,6 @@ volatile __thread long *ust_reg_stack_ptr = (long *) 0;
 extern struct marker __start___markers[] __attribute__((visibility("hidden")));
 extern struct marker __stop___markers[] __attribute__((visibility("hidden")));
 
-#ifdef CONFIG_UST_GDB_INTEGRATION
-extern struct marker_addr __start___marker_addr[] __attribute__((visibility("hidden")));
-extern struct marker_addr __stop___marker_addr[] __attribute__((visibility("hidden")));
-#endif
-
 /* Set to 1 to enable marker debug output */
 static const int marker_debug;
 
@@ -1522,7 +1517,7 @@ static void new_markers(struct marker *start, struct marker *end)
        }
 }
 
-int marker_register_lib(struct marker *markers_start, struct marker_addr *marker_addr_start, int markers_count)
+int marker_register_lib(struct marker *markers_start, int markers_count)
 {
        struct lib *pl;
        struct marker_addr *addr;
@@ -1530,18 +1525,8 @@ int marker_register_lib(struct marker *markers_start, struct marker_addr *marker
        pl = (struct lib *) malloc(sizeof(struct lib));
 
        pl->markers_start = markers_start;
-#ifdef CONFIG_UST_GDB_INTEGRATION
-       pl->markers_addr_start = marker_addr_start;
-#endif
        pl->markers_count = markers_count;
 
-#ifdef CONFIG_UST_GDB_INTEGRATION
-       lock_markers();
-       for(addr = marker_addr_start; addr < marker_addr_start + markers_count; addr++)
-               addr->marker->location = addr->addr;
-       unlock_markers();
-#endif
-
        /* FIXME: maybe protect this with its own mutex? */
        lock_markers();
        list_add(&pl->list, &libs);
@@ -1570,11 +1555,7 @@ static int initialized = 0;
 void __attribute__((constructor)) init_markers(void)
 {
        if(!initialized) {
-#ifdef CONFIG_UST_GDB_INTEGRATION
-               marker_register_lib(__start___markers, __start___marker_addr, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
-#else
-               marker_register_lib(__start___markers, NULL, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
-#endif
+               marker_register_lib(__start___markers, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
                //DBG("markers_start: %p, markers_stop: %p\n", __start___markers, __stop___markers);
                initialized = 1;
        }
This page took 0.027242 seconds and 4 git commands to generate.