Do not use __attribute__((constructor))
[lttv.git] / lttv / lttv / sync / sync_chain_lttv.c
index dc207babfb6bb949c46764c0fb4dce53787c874b..7fd0c6e435666300fa646cdddf90b692af97629e 100644 (file)
 #include <lttv/module.h>
 #include <lttv/option.h>
 
+
+#include "event_processing_lttng_standard.h"
+#include "event_processing_lttng_null.h"
+#include "event_matching_tcp.h"
+#include "event_matching_broadcast.h"
+#include "event_matching_distributor.h"
+#include "event_analysis_chull.h"
+#include "event_analysis_linreg.h"
+#include "event_analysis_eval.h"
 #include "sync_chain.h"
 #include "sync_chain_lttv.h"
 
@@ -80,13 +89,7 @@ static ModuleOption optionSyncGraphsDir= {
 /*
  * Module init function
  *
- * This function is declared to be the module initialization function. Event
- * modules are registered with a "constructor (102)" attribute except one in
- * each class (processing, matching, analysis) which is chosen to be the
- * default and which is registered with a "constructor (101)" attribute.
- * Constructors with no priority are called after constructors with
- * priorities. The result is that the list of event modules is known when this
- * function is executed.
+ * This function is declared to be the module initialization function.
  */
 static void init()
 {
@@ -94,6 +97,24 @@ static void init()
 
        g_debug("Sync init");
 
+       /*
+        * Initialize event modules
+        * Call the "constructor" or initialization function of each event module
+        * so it can register itself. This must be done before elements in
+        * processingModules, matchingModules, analysisModules or moduleOptions
+        * are accessed.
+        */
+       registerProcessingLTTVStandard();
+       registerProcessingLTTVNull();
+
+       registerMatchingTCP();
+       registerMatchingBroadcast();
+       registerMatchingDistributor();
+
+       registerAnalysisCHull();
+       registerAnalysisLinReg();
+       registerAnalysisEval();
+
        g_assert(g_queue_get_length(&analysisModules) > 0);
        optionSyncAnalysis.arg= ((AnalysisModule*)
                g_queue_peek_head(&analysisModules))->name;
This page took 0.023698 seconds and 4 git commands to generate.