*/
#define tracepoint(name, args...) __trace_##name(args)
-/*
- * These weak symbols, the constructor, and destructor take care of
- * registering only _one_ instance of the tracepoints per shared-ojbect
- * (or for the whole main program).
- * The dummy tracepoint entry ensures that the start/stop pointers get
- * initialized by the linker when no tracepoints are present in a
- * shared-object (or main program).
- */
-extern struct tracepoint * const __start___tracepoints_ptrs[]
- __attribute__((weak, visibility("hidden")));
-extern struct tracepoint * const __stop___tracepoints_ptrs[]
- __attribute__((weak, visibility("hidden")));
-int __tracepoint_registered
- __attribute__((weak, visibility("hidden")));
-
-static void __attribute__((constructor)) __tracepoints__init(void)
-{
- if (__tracepoint_registered++)
- return;
- tracepoint_register_lib(__start___tracepoints_ptrs,
- __stop___tracepoints_ptrs -
- __start___tracepoints_ptrs);
-}
-
-static void __attribute__((destructor)) __tracepoints__destroy(void)
-{
- if (--__tracepoint_registered)
- return;
- tracepoint_unregister_lib(__start___tracepoints_ptrs);
-}
-
/*
* it_func[0] is never NULL because there is at least one element in the array
* when the array itself is non NULL.
extern
int tracepoint_unregister_lib(struct tracepoint * const *tracepoints_start);
+/*
+ * These weak symbols, the constructor, and destructor take care of
+ * registering only _one_ instance of the tracepoints per shared-ojbect
+ * (or for the whole main program).
+ * The dummy tracepoint entry ensures that the start/stop pointers get
+ * initialized by the linker when no tracepoints are present in a
+ * shared-object (or main program).
+ */
+extern struct tracepoint * const __start___tracepoints_ptrs[]
+ __attribute__((weak, visibility("hidden")));
+extern struct tracepoint * const __stop___tracepoints_ptrs[]
+ __attribute__((weak, visibility("hidden")));
+int __tracepoint_registered
+ __attribute__((weak, visibility("hidden")));
+
+static void __attribute__((constructor)) __tracepoints__init(void)
+{
+ if (__tracepoint_registered++)
+ return;
+ tracepoint_register_lib(__start___tracepoints_ptrs,
+ __stop___tracepoints_ptrs -
+ __start___tracepoints_ptrs);
+}
+
+static void __attribute__((destructor)) __tracepoints__destroy(void)
+{
+ if (--__tracepoint_registered)
+ return;
+ tracepoint_unregister_lib(__start___tracepoints_ptrs);
+}
#ifndef TRACEPOINT_EVENT
/*