Add dummy marker and tracepoint to libust-initializer
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 14 Dec 2009 07:10:01 +0000 (02:10 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 14 Dec 2009 07:10:01 +0000 (02:10 -0500)
Without these, the __start... and __stop... symbols are
not defined, and compilation fails with an obscure relocation
message. A more elegant solution should be found.

libust-initializer.c

index 7c474659e5702353a33e79126666bc979596a9a1..1bf709e3f5e7b16cc04519859f85c7bdf6c9548c 100644 (file)
 #include <ust/marker.h>
 #include <ust/tracepoint.h>
 
+/* FIXME: We have to define at least one trace_mark and
+ * one tracepoint here. If we don't, the __start... and
+ * __stop... symbols won't be defined and the constructors
+ * won't be compilable. We should find a linker trick to
+ * avoid this.
+ */
+
+DECLARE_TRACE(ust_dummytp, TPPROTO(void), TPARGS());
+DEFINE_TRACE(ust_dummytp);
+
+void dummy_libust_initializer_func(void)
+{
+       trace_mark(ust, dummymark, MARK_NOARGS);
+       trace_ust_dummytp();
+}
+
 MARKER_LIB;
 TRACEPOINT_LIB;
This page took 0.025452 seconds and 4 git commands to generate.