Use a common function to print stats of all modules
[lttv.git] / lttv / lttv / sync / sync_chain_lttv.c
index f2389bd8f54405a001d36c3aeb057a92f10f2861..640042d1c61c92e583a9972874d998ab28578357 100644 (file)
@@ -181,7 +181,7 @@ void syncTraceset(LttvTracesetContext* const traceSetContext)
                syncState->stats= false;
        }
 
-       if (optionSyncGraphs.present)
+       if (!optionSyncNull.present && optionSyncGraphs.present)
        {
                // Create the graph directory right away in case the module initialization
                // functions have something to write in it.
@@ -242,7 +242,7 @@ void syncTraceset(LttvTracesetContext* const traceSetContext)
        syncState->processingModule->finalizeProcessing(syncState);
 
        // Write graphs file
-       if (optionSyncGraphs.present)
+       if (!optionSyncNull.present && optionSyncGraphs.present)
        {
                writeGraphsScript(syncState);
 
@@ -252,21 +252,10 @@ void syncTraceset(LttvTracesetContext* const traceSetContext)
                }
        }
 
-       if (syncState->processingModule->printProcessingStats != NULL)
+       if (!optionSyncNull.present && optionSyncStats.present)
        {
-               syncState->processingModule->printProcessingStats(syncState);
-       }
-       if (syncState->matchingModule->printMatchingStats != NULL)
-       {
-               syncState->matchingModule->printMatchingStats(syncState);
-       }
-       if (syncState->analysisModule->printAnalysisStats != NULL)
-       {
-               syncState->analysisModule->printAnalysisStats(syncState);
-       }
+               printStats(syncState);
 
-       if (optionSyncStats.present)
-       {
                printf("Resulting synchronization factors:\n");
                for (i= 0; i < syncState->traceNb; i++)
                {
This page took 0.023397 seconds and 4 git commands to generate.