Tracepoints: refer to new section name
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 17 Feb 2011 19:34:55 +0000 (14:34 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 17 Feb 2011 19:34:55 +0000 (14:34 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/tracepoint.h

index 8be8697942f567c6890735ae4dc93bfb62df6bf7..2f89c1566c419bb3f85b61e55189e715768347b4 100644 (file)
@@ -220,17 +220,18 @@ extern int tracepoint_register_lib(struct tracepoint * const *tracepoints_start,
 extern int tracepoint_unregister_lib(struct tracepoint * const *tracepoints_start);
 
 #define TRACEPOINT_LIB                                                 \
-       extern struct tracepoint * const __start___tracepoints[] __attribute__((weak, visibility("hidden"))); \
-       extern struct tracepoint * const __stop___tracepoints[] __attribute__((weak, visibility("hidden"))); \
-       static void __attribute__((constructor)) __tracepoints__init(void) \
-       {                                                               \
-               tracepoint_register_lib(__start___tracepoints,          \
-                                       (((long)__stop___tracepoints)-((long)__start___tracepoints)) / sizeof(*__start___tracepoints)); \
-       } \
-       \
-       static void __attribute__((destructor)) __tracepoints__destroy(void) \
-       {                                                               \
-               tracepoint_unregister_lib(__start___tracepoints); \
+       extern struct tracepoint * const __start___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \
+       extern struct tracepoint * const __stop___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \
+       static void __attribute__((constructor)) __tracepoints__init(void)      \
+       {                                                                       \
+               tracepoint_register_lib(__start___tracepoints,                  \
+                                       __stop___tracepoints -                  \
+                                       __start___tracepoints);                 \
+       }                                                                       \
+                                                                               \
+       static void __attribute__((destructor)) __tracepoints__destroy(void)    \
+       {                                                                       \
+               tracepoint_unregister_lib(__start___tracepoints);               \
        }
 
 
This page took 0.024507 seconds and 4 git commands to generate.