From: Benjamin Poirier Date: Mon, 26 Oct 2009 20:59:42 +0000 (-0400) Subject: Processing of UDP events X-Git-Tag: v0.12.26~48 X-Git-Url: https://git.lttng.org/?p=lttv.git;a=commitdiff_plain;h=f6691532b67cb6911749118e3da8d74de876380c Processing of UDP events Signed-off-by: Benjamin Poirier --- diff --git a/lttv/lttv/sync/README b/lttv/lttv/sync/README index 78b09b59..25f9a719 100644 --- a/lttv/lttv/sync/README +++ b/lttv/lttv/sync/README @@ -135,7 +135,7 @@ Communication is done via objects specialized from Event. At the moment, all be in separate files. This way, adding a new set of modules would require shipping extra data_structures* files instead of modifying the existing one. For this to work, Event.type couldn't be an enum, it could be an int and use -#defines or constants defined the specialized data_structures* files. +#defines or constants defined in the specialized data_structures* files. Event.event could be a void*. ++ Stage 2: Event matching @@ -146,9 +146,10 @@ these can have different types of relation ("one to one", "one to many", or a mix) and it will influence the overall behavior of the module. eg. TCP, UDP, MPI -matchEvent() takes an Event pointer. An actual matching module doesn't have -to be able to process every type of event. It has to check that the passed -event is of a type it can process. +matchEvent() takes an Event pointer. An actual matching module doesn't have to +be able to process every type of event. It will only be passed events of a +type it can process (according to the .canMatch field of its MatchingModule +struct). ++ Communication between stages 2 and 3: event groups Communication consists of events grouped in Message, Exchange or Broadcast diff --git a/lttv/lttv/sync/data_structures.c b/lttv/lttv/sync/data_structures.c index 62069698..70eb22c7 100644 --- a/lttv/lttv/sync/data_structures.c +++ b/lttv/lttv/sync/data_structures.c @@ -453,3 +453,113 @@ void gdnConnectionKeyDestroy(gpointer data) { free((ConnectionKey*) data); } + + +/* + * A GHashFunc for g_hash_table_new() + * + * Args: + * key DatagramKey* + */ +guint ghfDatagramKeyHash(gconstpointer key) +{ + DatagramKey* datagramKey; + uint32_t a, b, c; + + datagramKey= (DatagramKey*) key; + + a= datagramKey->saddr; + b= datagramKey->daddr; + c= datagramKey->source + (datagramKey->dest << 16); + mix(a, b, c); + + a+= datagramKey->ulen; // 16 bits left here + b+= *((uint32_t*) datagramKey->dataKey); + c+= *((uint32_t*) ((void*) datagramKey->dataKey + 4)); + final(a, b, c); + + return c; +} + + +/* + * A GEqualFunc for g_hash_table_new() + * + * Args: + * a, b DatagramKey* + * + * Returns: + * TRUE if both values are equal + */ +gboolean gefDatagramKeyEqual(gconstpointer a, gconstpointer b) +{ + const DatagramKey* dA, * dB; + + dA= (DatagramKey*) a; + dB= (DatagramKey*) b; + + if (dA->saddr == dB->saddr && dA->daddr == dB->daddr && + dA->source == dB->source && dA->dest == dB->dest && + dA->ulen == dB->ulen && + memcmp(dA->dataKey, dB->dataKey, sizeof(dA->dataKey)) == 0) + { + return TRUE; + } + else + { + return FALSE; + } +} + + +/* + * A GDestroyNotify function for g_hash_table_new_full() + * + * Args: + * data: DatagramKey* + */ +void gdnDestroyDatagramKey(gpointer data) +{ + free((DatagramKey*) data); +} + + +/* + * A GDestroyNotify function for g_hash_table_new_full() + * + * Args: + * data: Broadcast* + */ +void gdnDestroyBroadcast(gpointer data) +{ + destroyBroadcast((Broadcast*) data); +} + + +/* + * Free a Broadcast struct and its associated ressources + * + * Args: + * broadcast: Broadcast* + */ +void destroyBroadcast(Broadcast* const broadcast) +{ + g_queue_foreach(broadcast->events, &gfDestroyEvent, NULL); + g_queue_clear(broadcast->events); + free(broadcast); +} + + +/* + * A GFunc for g_queue_foreach() + * + * Args: + * data Event* + * user_data NULL + */ +void gfDestroyEvent(gpointer data, gpointer user_data) +{ + Event* event= data; + + event->destroy(event); +} diff --git a/lttv/lttv/sync/data_structures.h b/lttv/lttv/sync/data_structures.h index 082bbdf6..765967ff 100644 --- a/lttv/lttv/sync/data_structures.h +++ b/lttv/lttv/sync/data_structures.h @@ -49,6 +49,13 @@ enum Direction IN, }; +enum EventType +{ + TCP, + UDP, + TYPE_COUNT, +}; + typedef struct { enum Direction direction; @@ -59,6 +66,8 @@ typedef struct typedef struct { uint32_t saddr, daddr; + uint16_t source, dest; + uint16_t ulen; uint8_t dataKey[8]; } DatagramKey; @@ -76,7 +85,7 @@ typedef struct _Event // specific event structures and functions could be in separate files and // type could be an int - enum {TCP, UDP} type; + enum EventType type; // event could be a void*, this union is to avoid having to cast union { TCPEvent* tcpEvent; @@ -130,6 +139,7 @@ void gdnDestroyEvent(gpointer data); void destroyEvent(Event* const event); void destroyTCPEvent(Event* const event); void destroyUDPEvent(Event* const event); +void gfDestroyEvent(gpointer data, gpointer user_data); // Message-related functions void printTCPSegment(const Message* const segment); @@ -144,4 +154,9 @@ void destroyTCPSegment(Message* const segment); // Exchange-related functions void destroyTCPExchange(Exchange* const exchange); + +// Broadcast-related functions +void gdnDestroyBroadcast(gpointer data); +void destroyBroadcast(Broadcast* const broadcast); + #endif diff --git a/lttv/lttv/sync/event_matching.h b/lttv/lttv/sync/event_matching.h index 55c42243..e30cda8e 100644 --- a/lttv/lttv/sync/event_matching.h +++ b/lttv/lttv/sync/event_matching.h @@ -29,6 +29,7 @@ struct _SyncState; typedef struct { char* name; + bool canMatch[TYPE_COUNT]; void (*initMatching)(struct _SyncState* const syncState); void (*destroyMatching)(struct _SyncState* const syncState); diff --git a/lttv/lttv/sync/event_matching_tcp.c b/lttv/lttv/sync/event_matching_tcp.c index 25e39858..6b8f538e 100644 --- a/lttv/lttv/sync/event_matching_tcp.c +++ b/lttv/lttv/sync/event_matching_tcp.c @@ -69,6 +69,8 @@ static void writeMessagePoint(FILE* stream, const Message* const message); static MatchingModule matchingModuleTCP = { .name= "TCP", + .canMatch[TCP]= true, + .canMatch[UDP]= false, .initMatching= &initMatchingTCP, .destroyMatching= &destroyMatchingTCP, .matchEvent= &matchEventTCP, @@ -231,12 +233,13 @@ static void partialDestroyMatchingTCP(SyncState* const syncState) * Args: * syncState container for synchronization data. * event new event to match - * eventType type of event to match */ static void matchEventTCP(SyncState* const syncState, Event* const event) { MatchingDataTCP* matchingData; + g_assert(event->type == TCP); + matchingData= (MatchingDataTCP*) syncState->matchingData; if (event->event.tcpEvent->direction == IN) diff --git a/lttv/lttv/sync/event_processing_lttng_common.c b/lttv/lttv/sync/event_processing_lttng_common.c index a719fd6b..8f1d2dcb 100644 --- a/lttv/lttv/sync/event_processing_lttng_common.c +++ b/lttv/lttv/sync/event_processing_lttng_common.c @@ -20,6 +20,7 @@ #include #endif +#include "data_structures.h" #include "event_processing_lttng_common.h" @@ -35,13 +36,11 @@ void createQuarks() { LTT_CHANNEL_NET= g_quark_from_static_string("net"); - LTT_CHANNEL_NETIF_STATE= g_quark_from_static_string("netif_state"); LTT_EVENT_DEV_XMIT_EXTENDED= g_quark_from_static_string("dev_xmit_extended"); LTT_EVENT_DEV_RECEIVE= g_quark_from_static_string("dev_receive"); LTT_EVENT_TCPV4_RCV_EXTENDED= g_quark_from_static_string("tcpv4_rcv_extended"); - LTT_EVENT_NETWORK_IPV4_INTERFACE= - g_quark_from_static_string("network_ipv4_interface"); + LTT_EVENT_UDPV4_RCV_EXTENDED= g_quark_from_static_string("udpv4_rcv_extended"); LTT_FIELD_SKB= g_quark_from_static_string("skb"); LTT_FIELD_PROTOCOL= g_quark_from_static_string("protocol"); @@ -62,9 +61,9 @@ void createQuarks() LTT_FIELD_RST= g_quark_from_static_string("rst"); LTT_FIELD_SYN= g_quark_from_static_string("syn"); LTT_FIELD_FIN= g_quark_from_static_string("fin"); - LTT_FIELD_NAME= g_quark_from_static_string("name"); - LTT_FIELD_ADDRESS= g_quark_from_static_string("address"); - LTT_FIELD_UP= g_quark_from_static_string("up"); + LTT_FIELD_UNICAST= g_quark_from_static_string("unicast"); + LTT_FIELD_ULEN= g_quark_from_static_string("ulen"); + LTT_FIELD_DATA_START= g_quark_from_static_string("data_start"); } @@ -79,9 +78,11 @@ void createQuarks() * hookFunction: call back function when event is encountered * hookData: data that will be made accessible to hookFunction in * arg0->hook_data + * eventTypes: types of events for which to register hooks */ void registerHooks(GArray* hookListList, LttvTracesetContext* const - traceSetContext, LttvHook hookFunction, gpointer hookData) + traceSetContext, LttvHook hookFunction, gpointer hookData, const bool + const* eventTypes) { unsigned int i, j, k; unsigned int traceNb= lttv_traceset_number(traceSetContext->ts); @@ -89,6 +90,7 @@ void registerHooks(GArray* hookListList, LttvTracesetContext* const GQuark channelName; GQuark eventName; GQuark* fields; + bool eventTypes[TYPE_COUNT]; } eventHookInfoList[] = { { .channelName= LTT_CHANNEL_NET, @@ -99,10 +101,14 @@ void registerHooks(GArray* hookListList, LttvTracesetContext* const LTT_FIELD_SOURCE, LTT_FIELD_DEST, LTT_FIELD_SEQ, LTT_FIELD_ACK_SEQ, LTT_FIELD_DOFF, LTT_FIELD_ACK, LTT_FIELD_RST, LTT_FIELD_SYN, LTT_FIELD_FIN), + .eventTypes[TCP]= true, + .eventTypes[UDP]= true, }, { .channelName= LTT_CHANNEL_NET, .eventName= LTT_EVENT_DEV_RECEIVE, .fields= FIELD_ARRAY(LTT_FIELD_SKB, LTT_FIELD_PROTOCOL), + .eventTypes[TCP]= true, + .eventTypes[UDP]= true, }, { .channelName= LTT_CHANNEL_NET, .eventName= LTT_EVENT_TCPV4_RCV_EXTENDED, @@ -111,11 +117,16 @@ void registerHooks(GArray* hookListList, LttvTracesetContext* const LTT_FIELD_SOURCE, LTT_FIELD_DEST, LTT_FIELD_SEQ, LTT_FIELD_ACK_SEQ, LTT_FIELD_DOFF, LTT_FIELD_ACK, LTT_FIELD_RST, LTT_FIELD_SYN, LTT_FIELD_FIN), + .eventTypes[TCP]= true, + .eventTypes[UDP]= false, }, { - .channelName= LTT_CHANNEL_NETIF_STATE, - .eventName= LTT_EVENT_NETWORK_IPV4_INTERFACE, - .fields= FIELD_ARRAY(LTT_FIELD_NAME, LTT_FIELD_ADDRESS, - LTT_FIELD_UP), + .channelName= LTT_CHANNEL_NET, + .eventName= LTT_EVENT_UDPV4_RCV_EXTENDED, + .fields= FIELD_ARRAY(LTT_FIELD_SKB, LTT_FIELD_SADDR, + LTT_FIELD_DADDR, LTT_FIELD_UNICAST, LTT_FIELD_ULEN, + LTT_FIELD_DATA_START), + .eventTypes[TCP]= false, + .eventTypes[UDP]= true, } }; // This is called a compound literal unsigned int hookNb= sizeof(eventHookInfoList) / sizeof(*eventHookInfoList); @@ -134,6 +145,21 @@ void registerHooks(GArray* hookListList, LttvTracesetContext* const for (j= 0; j < hookNb; j++) { guint old_len; + bool registerHook; + + registerHook= true; + for (k= 0; k < TYPE_COUNT; k++) + { + if (eventTypes[k] && eventHookInfoList[j].eventTypes[k] == false) + { + registerHook= false; + break; + } + } + if (!registerHook) + { + continue; + } old_len= hookList->len; retval= lttv_trace_find_hook(tc->t, diff --git a/lttv/lttv/sync/event_processing_lttng_common.h b/lttv/lttv/sync/event_processing_lttng_common.h index ee66058a..14ed7c15 100644 --- a/lttv/lttv/sync/event_processing_lttng_common.h +++ b/lttv/lttv/sync/event_processing_lttng_common.h @@ -25,14 +25,13 @@ GQuark - LTT_CHANNEL_NET, - LTT_CHANNEL_NETIF_STATE; + LTT_CHANNEL_NET; GQuark LTT_EVENT_DEV_XMIT_EXTENDED, LTT_EVENT_DEV_RECEIVE, LTT_EVENT_TCPV4_RCV_EXTENDED, - LTT_EVENT_NETWORK_IPV4_INTERFACE; + LTT_EVENT_UDPV4_RCV_EXTENDED; GQuark LTT_FIELD_SKB, @@ -52,15 +51,15 @@ GQuark LTT_FIELD_RST, LTT_FIELD_SYN, LTT_FIELD_FIN, - LTT_FIELD_NAME, - LTT_FIELD_ADDRESS, - LTT_FIELD_UP; + LTT_FIELD_UNICAST, + LTT_FIELD_ULEN, + LTT_FIELD_DATA_START; void createQuarks(); void registerHooks(GArray* hookListList, LttvTracesetContext* const - traceSetContext, LttvHook hookFunction, gpointer - hookData); + traceSetContext, LttvHook hookFunction, gpointer hookData, const bool + const* eventTypes); void unregisterHooks(GArray* hookListList, LttvTracesetContext* const traceSetContext); diff --git a/lttv/lttv/sync/event_processing_lttng_null.c b/lttv/lttv/sync/event_processing_lttng_null.c index 170ebf12..f251b055 100644 --- a/lttv/lttv/sync/event_processing_lttng_null.c +++ b/lttv/lttv/sync/event_processing_lttng_null.c @@ -91,7 +91,8 @@ static void initProcessingLTTVNull(SyncState* const syncState, sizeof(GArray*), syncState->traceNb); registerHooks(processingData->hookListList, traceSetContext, - &processEventLTTVNull, syncState); + &processEventLTTVNull, syncState, + syncState->matchingModule->canMatch); } diff --git a/lttv/lttv/sync/event_processing_lttng_standard.c b/lttv/lttv/sync/event_processing_lttng_standard.c index 218e7abf..a8c08aaf 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.c +++ b/lttv/lttv/sync/event_processing_lttng_standard.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "sync_chain_lttv.h" #include "event_processing_lttng_common.h" @@ -131,7 +132,8 @@ static void initProcessingLTTVStandard(SyncState* const syncState, LttvTracesetC } registerHooks(processingData->hookListList, traceSetContext, - &processEventLTTVStandard, syncState); + &processEventLTTVStandard, syncState, + syncState->matchingModule->canMatch); } @@ -244,10 +246,21 @@ static void printProcessingStatsLTTVStandard(SyncState* const syncState) printf("\treceived frames: %d\n", processingData->stats->totRecv); printf("\treceived frames that are IP: %d\n", processingData->stats->totRecvIp); - printf("\treceived and processed packets that are TCP: %d\n", - processingData->stats->totInE); - printf("\tsent packets that are TCP: %d\n", - processingData->stats->totOutE); + if (syncState->matchingModule->canMatch[TCP]) + { + printf("\treceived and processed packets that are TCP: %d\n", + processingData->stats->totRecvTCP); + } + if (syncState->matchingModule->canMatch[UDP]) + { + printf("\treceived and processed packets that are UDP: %d\n", + processingData->stats->totRecvUDP); + } + if (syncState->matchingModule->canMatch[TCP]) + { + printf("\tsent packets that are TCP: %d\n", + processingData->stats->totOutE); + } if (syncState->matchingModule->printMatchingStats != NULL) { @@ -394,6 +407,11 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData) return FALSE; } + if (!syncState->matchingModule->canMatch[TCP]) + { + return FALSE; + } + if (syncState->stats) { processingData->stats->totOutE++; @@ -498,13 +516,13 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData) if (inE == NULL) { // This should only happen in case of lost events - g_debug("No matching pending receive event found\n"); + g_warning("No matching pending receive event found"); } else { if (syncState->stats) { - processingData->stats->totInE++; + processingData->stats->totRecvTCP++; } // If it's there, remove it and proceed with a receive event @@ -557,29 +575,81 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData) syncState->matchingModule->matchEvent(syncState, inE); - g_debug("Input event %p for skb %p done\n", inE, skb); + g_debug("TCP input event %p for skb %p done\n", inE, skb); } } - else if (info->name == LTT_EVENT_NETWORK_IPV4_INTERFACE) + else if (info->name == LTT_EVENT_UDPV4_RCV_EXTENDED) { - char* name; - guint64 address; - gint64 up; - char addressString[17]; + Event* inE; + void* skb; - address= ltt_event_get_long_unsigned(event, - lttv_trace_get_hook_field(traceHook, 1)); - up= ltt_event_get_long_int(event, lttv_trace_get_hook_field(traceHook, - 2)); - /* name must be the last field to get or else copy the string, see the - * doc for ltt_event_get_string() - */ - name= ltt_event_get_string(event, lttv_trace_get_hook_field(traceHook, - 0)); + // Search pendingRecv for an event with the same skb + skb= (void*) (long) ltt_event_get_long_unsigned(event, + lttv_trace_get_hook_field(traceHook, 0)); - convertIP(addressString, address); + inE= (Event*) + g_hash_table_lookup(processingData->pendingRecv[traceNum], skb); + if (inE == NULL) + { + // This should only happen in case of lost events + g_warning("No matching pending receive event found"); + } + else + { + guint64 dataStart; - g_debug("name \"%s\" address %s up %lld\n", name, addressString, up); + if (syncState->stats) + { + processingData->stats->totRecvUDP++; + } + + // If it's there, remove it and proceed with a receive event + g_hash_table_steal(processingData->pendingRecv[traceNum], skb); + + inE->type= UDP; + inE->event.udpEvent= malloc(sizeof(UDPEvent)); + inE->destroy= &destroyUDPEvent; + inE->event.udpEvent->direction= IN; + inE->event.udpEvent->datagramKey= malloc(sizeof(DatagramKey)); + inE->event.udpEvent->datagramKey->saddr= + ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 1)); + inE->event.udpEvent->datagramKey->daddr= + ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 2)); + inE->event.udpEvent->unicast= ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 3)) == 0 ? false : true; + inE->event.udpEvent->datagramKey->ulen= + ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 4)); + inE->event.udpEvent->datagramKey->source= + ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 5)); + inE->event.udpEvent->datagramKey->dest= + ltt_event_get_unsigned(event, + lttv_trace_get_hook_field(traceHook, 6)); + dataStart= ltt_event_get_long_unsigned(event, + lttv_trace_get_hook_field(traceHook, 7)); + g_assert_cmpuint(sizeof(inE->event.udpEvent->datagramKey->dataKey), + ==, sizeof(guint64)); + if (inE->event.udpEvent->datagramKey->ulen - 8 >= + sizeof(inE->event.udpEvent->datagramKey->dataKey)) + { + memcpy(inE->event.udpEvent->datagramKey->dataKey, &dataStart, + sizeof(inE->event.udpEvent->datagramKey->dataKey)); + } + else + { + memset(inE->event.udpEvent->datagramKey->dataKey, 0, + sizeof(inE->event.udpEvent->datagramKey->dataKey)); + memcpy(inE->event.udpEvent->datagramKey->dataKey, &dataStart, + inE->event.udpEvent->datagramKey->ulen - 8); + } + + syncState->matchingModule->matchEvent(syncState, inE); + + g_debug("UDP input event %p for skb %p done\n", inE, skb); + } } else { diff --git a/lttv/lttv/sync/event_processing_lttng_standard.h b/lttv/lttv/sync/event_processing_lttng_standard.h index 15139ec6..95c4be06 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.h +++ b/lttv/lttv/sync/event_processing_lttng_standard.h @@ -29,7 +29,8 @@ typedef struct { int totRecv, totRecvIp, - totInE, + totRecvTCP, + totRecvUDP, totOutE; } ProcessingStatsLTTVStandard; diff --git a/lttv/lttv/sync/sync_chain_lttv.c b/lttv/lttv/sync/sync_chain_lttv.c index 16190c48..2479512f 100644 --- a/lttv/lttv/sync/sync_chain_lttv.c +++ b/lttv/lttv/sync/sync_chain_lttv.c @@ -210,24 +210,22 @@ void syncTraceset(LttvTracesetContext* const traceSetContext) syncState->processingModule= (ProcessingModule*) result->data; graphsStream= NULL; - if (syncState->graphs) + if (syncState->graphs && + syncState->processingModule->writeProcessingGraphsPlots != NULL) { // Create the graph directory right away in case the module initialization // functions have something to write in it. cwd= changeToGraphDir(syncState->graphs); - if (syncState->processingModule->writeProcessingGraphsPlots != NULL) + if ((graphsFp= open("graphs.gnu", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | + S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH + | S_IWOTH | S_IXOTH)) == -1) { - if ((graphsFp= open("graphs.gnu", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | - S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH - | S_IWOTH | S_IXOTH)) == -1) - { - g_error(strerror(errno)); - } - if ((graphsStream= fdopen(graphsFp, "w")) == NULL) - { - g_error(strerror(errno)); - } + g_error(strerror(errno)); + } + if ((graphsStream= fdopen(graphsFp, "w")) == NULL) + { + g_error(strerror(errno)); } retval= chdir(cwd); @@ -238,34 +236,31 @@ void syncTraceset(LttvTracesetContext* const traceSetContext) free(cwd); } - syncState->processingModule->initProcessing(syncState, traceSetContext); + // Identify matching and analysis modules + g_assert(g_queue_get_length(&matchingModules) == 1); + syncState->matchingModule= (MatchingModule*) + g_queue_peek_head(&matchingModules); - // Identify and initialize matching and analysis modules - syncState->matchingData= NULL; - syncState->analysisData= NULL; - if (optionSyncNull) + result= g_queue_find_custom(&analysisModules, optionSyncAnalysis, + &gcfCompareAnalysis); + if (result != NULL) { - syncState->matchingModule= NULL; - syncState->analysisModule= NULL; + syncState->analysisModule= (AnalysisModule*) result->data; } else { - g_assert(g_queue_get_length(&matchingModules) == 1); - syncState->matchingModule= (MatchingModule*) - g_queue_peek_head(&matchingModules); - syncState->matchingModule->initMatching(syncState); + g_error("Analysis module '%s' not found", optionSyncAnalysis); + } - result= g_queue_find_custom(&analysisModules, optionSyncAnalysis, - &gcfCompareAnalysis); - if (result != NULL) - { - syncState->analysisModule= (AnalysisModule*) result->data; - syncState->analysisModule->initAnalysis(syncState); - } - else - { - g_error("Analysis module '%s' not found", optionSyncAnalysis); - } + syncState->processingModule->initProcessing(syncState, traceSetContext); + + syncState->matchingData= NULL; + syncState->analysisData= NULL; + + if (!optionSyncNull) + { + syncState->matchingModule->initMatching(syncState); + syncState->analysisModule->initAnalysis(syncState); } // Process traceset