*
* Args:
* traceSetContext: traceset
+ *
+ * Returns:
+ * false if synchronization was not performed, true otherwise
*/
-void syncTraceset(LttvTracesetContext* const traceSetContext)
+bool syncTraceset(LttvTracesetContext* const traceSetContext)
{
SyncState* syncState;
struct timeval startTime, endTime;
if (!optionSync.present)
{
g_debug("Not synchronizing traceset because option is disabled");
- return;
+ return false;
}
if (optionSyncStats.present)
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.
syncState->processingModule->finalizeProcessing(syncState);
// Write graphs file
- if (optionSyncGraphs.present)
+ if (!optionSyncNull.present && optionSyncGraphs.present)
{
writeGraphsScript(syncState);
}
}
- if (syncState->processingModule->printProcessingStats != NULL)
- {
- syncState->processingModule->printProcessingStats(syncState);
- }
- if (syncState->matchingModule->printMatchingStats != NULL)
- {
- syncState->matchingModule->printMatchingStats(syncState);
- }
- if (syncState->analysisModule->printAnalysisStats != NULL)
+ if (!optionSyncNull.present && optionSyncStats.present)
{
- syncState->analysisModule->printAnalysisStats(syncState);
- }
+ printStats(syncState);
- if (optionSyncStats.present)
- {
printf("Resulting synchronization factors:\n");
for (i= 0; i < syncState->traceNb; i++)
{
printf("\tsystem time: %ld.%06ld\n", endUsage.ru_stime.tv_sec,
endUsage.ru_stime.tv_usec);
}
+
+ return true;
}