X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fsync_chain.h;h=5d10a08bf6b696178351b2e7043df4b8ba8b792c;hb=b670bb7cf8ff6e781462434a2273e47e055e54db;hp=152d1321469bc0ecd9919d2781fbfa841acd1dc9;hpb=08365995afd45ea5f6f62f5d8fbc90961de5eacf;p=lttv.git diff --git a/lttv/lttv/sync/sync_chain.h b/lttv/lttv/sync/sync_chain.h index 152d1321..5d10a08b 100644 --- a/lttv/lttv/sync/sync_chain.h +++ b/lttv/lttv/sync/sync_chain.h @@ -20,6 +20,7 @@ #define SYNC_CHAIN_H #include +#include #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 +{ + 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