Use a common function to print stats of all modules
[lttv.git] / lttv / lttv / sync / sync_chain.h
index 152d1321469bc0ecd9919d2781fbfa841acd1dc9..d999c9ce4327cafd6eafb9b78e41aaec04ccb45d 100644 (file)
@@ -20,6 +20,7 @@
 #define SYNC_CHAIN_H
 
 #include <glib.h>
+#include <sys/time.h>
 
 #include "event_processing.h"
 #include "event_matching.h"
@@ -29,7 +30,8 @@ typedef struct _SyncState
 {
        unsigned int traceNb;
        bool stats;
-       char* graphs;
+       FILE* graphsStream;
+       const char* graphsDir;
 
        const ProcessingModule* processingModule;
        void* processingData;
@@ -39,13 +41,37 @@ typedef struct _SyncState
        void* analysisData;
 } SyncState;
 
+typedef struct
+{
+       const char shortName;
+       const char* longName;
+       enum {
+               NO_ARG,
+               REQUIRED_ARG,
+               OPTIONAL_ARG,
+               HAS_ARG_COUNT // This must be the last field
+       } hasArg;
+       bool present;
+       // in the case of OPTIONAL_ARG, arg can be initialized to a default value.
+       // If an argument is present, arg will be modified
+       const char* arg;
+       const char* optionHelp;
+       const char* argHelp;
+} ModuleOption;
+
+
 extern GQueue processingModules;
 extern GQueue matchingModules;
 extern GQueue analysisModules;
+extern GQueue moduleOptions;
 
+void printStats(SyncState* const syncState);
 
-void syncTraceset(LttvTracesetContext* const traceSetContext);
+void timeDiff(struct timeval* const end, const struct timeval* const start);
 
-char* changeToGraphDir(char* const graphs);
+gint gcfCompareProcessing(gconstpointer a, gconstpointer b);
+gint gcfCompareMatching(gconstpointer a, gconstpointer b);
+gint gcfCompareAnalysis(gconstpointer a, gconstpointer b);
+void gfAppendAnalysisName(gpointer data, gpointer user_data);
 
 #endif
This page took 0.023395 seconds and 4 git commands to generate.