Clean debug statements
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Wed, 25 Nov 2009 20:14:41 +0000 (15:14 -0500)
committerBenjamin Poirier <benjamin.poirier@polymtl.ca>
Fri, 18 Dec 2009 19:04:17 +0000 (14:04 -0500)
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/sync/data_structures.c
lttv/lttv/sync/event_analysis_linreg.c
lttv/lttv/sync/event_processing_lttng_standard.c
lttv/lttv/sync/sync_chain_lttv.c

index 6bdf0b257a697aea73b2b9536d4e09df895f91ad..7a9b16d42486f3219d1c7474bf35cf59cc245d77 100644 (file)
@@ -234,8 +234,6 @@ void gdnTCPSegmentListDestroy(gpointer data)
 
        list= (GQueue*) data;
 
-       g_debug("XXXX gdnTCPSegmentListDestroy\n");
-
        g_queue_foreach(list, &gfTCPSegmentDestroy, NULL);
        g_queue_free(list);
 }
@@ -250,7 +248,6 @@ void gdnTCPSegmentListDestroy(gpointer data)
  */
 void gfTCPSegmentDestroy(gpointer data, gpointer user_data)
 {
-       g_debug("XXXX gfTCPSegmentDestroy\n");
        destroyTCPSegment((Message*) data);
 }
 
@@ -266,7 +263,6 @@ void destroyTCPSegment(Message* const segment)
 {
        TCPEvent* inE, *outE;
 
-       g_debug("XXXX destroyTCPSegment");
        segment->print(segment);
 
        g_assert(segment->inE != NULL && segment->outE != NULL);
index 2ceecf3e13eed80a850664e92b06f92ed0d49827..07537780bcb8ae4ced81d91622c5bbad2920be3b 100644 (file)
@@ -178,8 +178,8 @@ static void analyzeExchangeLinReg(SyncState* const syncState, Exchange* const ex
        Message* ackedMessage;
        AnalysisDataLinReg* analysisData;
 
-       g_debug("Synchronization calculation, ");
-       g_debug("%d acked packets - using last one, ",
+       g_debug("Synchronization calculation, "
+               "%d acked packets - using last one,",
                g_queue_get_length(exchange->acks));
 
        analysisData= (AnalysisDataLinReg*) syncState->analysisData;
@@ -357,11 +357,11 @@ static void finalizeLSA(SyncState* const syncState)
                                                        pow(fit->sd, 2) * fit->st2 - 2 * fit->st * fit->sd
                                                        * fit->std) / delta) / (fit->n - 2));
 
-                               g_debug("[i= %u j= %u]\n", i, j);
-                               g_debug("n= %d st= %g st2= %g sd= %g sd2= %g std= %g\n",
+                               g_debug("[i= %u j= %u]", i, j);
+                               g_debug("n= %d st= %g st2= %g sd= %g sd2= %g std= %g",
                                        fit->n, fit->st, fit->st2, fit->sd, fit->sd2, fit->std);
-                               g_debug("xij= %g d0ij= %g e= %g\n", fit->x, fit->d0, fit->e);
-                               g_debug("(xji= %g d0ji= %g)\n", -fit->x / (1 + fit->x),
+                               g_debug("xij= %g d0ij= %g e= %g", fit->x, fit->d0, fit->e);
+                               g_debug("(xji= %g d0ji= %g)", -fit->x / (1 + fit->x),
                                        -fit->d0 / (1 + fit->x));
                        }
                }
@@ -398,7 +398,7 @@ static void doGraphProcessing(SyncState* const syncState)
                GList* result;
 
                // Perform shortest path search
-               g_debug("shortest path trace %d\ndistances: ", i);
+               g_debug("shortest path trace %ddistances: ", i);
                shortestPath(analysisData->fitArray, i, syncState->traceNb, distances,
                        previousVertex);
 
@@ -406,12 +406,11 @@ static void doGraphProcessing(SyncState* const syncState)
                {
                        g_debug("%g, ", distances[j]);
                }
-               g_debug("\npreviousVertex: ");
+               g_debug("previousVertex: ");
                for (j= 0; j < syncState->traceNb; j++)
                {
                        g_debug("%u, ", previousVertex[j]);
                }
-               g_debug("\n");
 
                // Group in graphs nodes that have exchanges
                errorSum= sumDistances(distances, syncState->traceNb);
@@ -421,11 +420,11 @@ static void doGraphProcessing(SyncState* const syncState)
                {
                        Graph* graph;
 
-                       g_debug("found graph\n");
+                       g_debug("found graph");
                        graph= (Graph*) result->data;
                        if (errorSum < graph->errorSum)
                        {
-                               g_debug("adding to graph\n");
+                               g_debug("adding to graph");
                                graph->errorSum= errorSum;
                                free(graph->previousVertex);
                                graph->previousVertex= previousVertex;
@@ -438,7 +437,7 @@ static void doGraphProcessing(SyncState* const syncState)
                {
                        Graph* newGraph;
 
-                       g_debug("creating new graph\n");
+                       g_debug("creating new graph");
                        newGraph= malloc(sizeof(Graph));
                        newGraph->errorSum= errorSum;
                        newGraph->previousVertex= previousVertex;
@@ -542,7 +541,7 @@ static void shortestPath(Fit* const* const fitArray, const unsigned int
                visited[i]= false;
 
                fit= &fitArray[traceNum][i];
-               g_debug("fitArray[traceNum= %u][i= %u]->n = %u\n", traceNum, i, fit->n);
+               g_debug("fitArray[traceNum= %u][i= %u]->n = %u", traceNum, i, fit->n);
                if (fit->n > 0)
                {
                        distances[i]= fit->e;
@@ -560,7 +559,6 @@ static void shortestPath(Fit* const* const fitArray, const unsigned int
        {
                g_debug("(%d, %u, %g), ", visited[j], previousVertex[j], distances[j]);
        }
-       g_debug("\n");
 
        for (i= 0; i < traceNb - 2; i++)
        {
@@ -577,7 +575,7 @@ static void shortestPath(Fit* const* const fitArray, const unsigned int
                        }
                }
 
-               g_debug("v= %u dvMin= %g\n", v, dvMin);
+               g_debug("v= %u dvMin= %g", v, dvMin);
 
                if (dvMin != INFINITY)
                {
@@ -605,7 +603,6 @@ static void shortestPath(Fit* const* const fitArray, const unsigned int
                {
                        g_debug("(%d, %u, %g), ", visited[j], previousVertex[j], distances[j]);
                }
-               g_debug("\n");
        }
 
        free(visited);
index b5ec8d419ca4bd14257bc7842446c9e12bf65ec1..1bec81f0ef01058a445adb91a88f6945a3231e4b 100644 (file)
@@ -232,7 +232,7 @@ static void finalizeProcessingLTTVStandard(SyncState* const syncState)
        lttv_traceset_context_compute_time_span(processingData->traceSetContext,
                &processingData->traceSetContext->time_span);
 
-       g_debug("traceset start %ld.%09ld end %ld.%09ld\n",
+       g_debug("traceset start %ld.%09ld end %ld.%09ld",
                processingData->traceSetContext->time_span.start_time.tv_sec,
                processingData->traceSetContext->time_span.start_time.tv_nsec,
                processingData->traceSetContext->time_span.end_time.tv_sec,
@@ -347,7 +347,7 @@ static void partialDestroyProcessingLTTVStandard(SyncState* const syncState)
        for(i= 0; i < syncState->traceNb; i++)
        {
 
-               g_debug("Cleaning up pendingRecv list\n");
+               g_debug("Cleaning up pendingRecv list");
                g_hash_table_destroy(processingData->pendingRecv[i]);
        }
        free(processingData->pendingRecv);
@@ -397,7 +397,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData)
        g_assert(g_hash_table_lookup_extended(processingData->traceNumTable,
                        trace, NULL, (gpointer*) &traceNum));
 
-       g_debug("XXXX process event: time: %ld.%09ld trace: %ld (%p) name: %s ",
+       g_debug("Process event: time: %ld.%09ld trace: %ld (%p) name: %s ",
                time.tv_sec, time.tv_nsec, traceNum, trace,
                g_quark_to_string(info->name));
 
@@ -468,7 +468,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData)
 
                syncState->matchingModule->matchEvent(syncState, outE);
 
-               g_debug("Output event done\n");
+               g_debug("Output event done");
        }
        else if (info->name == LTT_EVENT_DEV_RECEIVE)
        {
@@ -505,11 +505,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData)
                        g_hash_table_replace(processingData->pendingRecv[traceNum], skb,
                                inE);
 
-                       g_debug("Adding inE %p for skb %p to pendingRecv\n", inE, skb);
-               }
-               else
-               {
-                       g_debug("\n");
+                       g_debug("Adding inE %p for skb %p to pendingRecv", inE, skb);
                }
        }
        else if (info->name == LTT_EVENT_TCPV4_RCV_EXTENDED)
@@ -586,7 +582,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData)
 
                        syncState->matchingModule->matchEvent(syncState, inE);
 
-                       g_debug("TCP input event %p for skb %p done\n", inE, skb);
+                       g_debug("TCP input event %p for skb %p done", inE, skb);
                }
        }
        else if (info->name == LTT_EVENT_UDPV4_RCV_EXTENDED)
@@ -660,7 +656,7 @@ static gboolean processEventLTTVStandard(void* hookData, void* callData)
 
                        syncState->matchingModule->matchEvent(syncState, inE);
 
-                       g_debug("UDP input event %p for skb %p done\n", inE, skb);
+                       g_debug("UDP input event %p for skb %p done", inE, skb);
                }
        }
        else
index fbbf7dfed4f59ba8a3518151a66b00a993217f56..c2ec05def08908d92221c089041a55999e9b439f 100644 (file)
@@ -101,7 +101,7 @@ static void init()
 {
        int retval;
 
-       g_debug("\t\t\tXXXX sync init\n");
+       g_debug("Sync init");
 
        g_assert(g_queue_get_length(&analysisModules) > 0);
        optionSyncAnalysis.arg = ((AnalysisModule*)
@@ -138,7 +138,7 @@ static void init()
  */
 static void destroy()
 {
-       g_debug("\t\t\tXXXX sync destroy\n");
+       g_debug("Sync destroy");
 
        g_queue_foreach(&moduleOptions, &gfRemoveModuleOption, NULL);
        g_string_free(analysisModulesNames, TRUE);
This page took 0.029197 seconds and 4 git commands to generate.