projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rebuild traceset contexts after performing synchronization
[lttv.git]
/
lttv
/
lttv
/
sync
/
sync_chain_lttv.c
diff --git
a/lttv/lttv/sync/sync_chain_lttv.c
b/lttv/lttv/sync/sync_chain_lttv.c
index bbd2b3aacb9b9d70b65f363722b15bfc40687406..dc207babfb6bb949c46764c0fb4dce53787c874b 100644
(file)
--- a/
lttv/lttv/sync/sync_chain_lttv.c
+++ b/
lttv/lttv/sync/sync_chain_lttv.c
@@
-147,8
+147,11
@@
static void destroy()
*
* Args:
* traceSetContext: traceset
*
* 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;
{
SyncState* syncState;
struct timeval startTime, endTime;
@@
-160,7
+163,7
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
if (!optionSync.present)
{
g_debug("Not synchronizing traceset because option is disabled");
if (!optionSync.present)
{
g_debug("Not synchronizing traceset because option is disabled");
- return;
+ return
false
;
}
if (optionSyncStats.present)
}
if (optionSyncStats.present)
@@
-171,7
+174,6
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
// Initialize data structures
syncState= malloc(sizeof(SyncState));
// Initialize data structures
syncState= malloc(sizeof(SyncState));
- syncState->traceNb= lttv_traceset_number(traceSetContext->ts);
if (optionSyncStats.present)
{
if (optionSyncStats.present)
{
@@
-182,7
+184,7
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
syncState->stats= false;
}
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.
{
// Create the graph directory right away in case the module initialization
// functions have something to write in it.
@@
-227,12
+229,12
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
g_error("Analysis module '%s' not found", optionSyncAnalysis.arg);
}
g_error("Analysis module '%s' not found", optionSyncAnalysis.arg);
}
+ syncState->processingModule->initProcessing(syncState, traceSetContext);
if (!optionSyncNull.present)
{
if (!optionSyncNull.present)
{
- syncState->analysisModule->initAnalysis(syncState);
syncState->matchingModule->initMatching(syncState);
syncState->matchingModule->initMatching(syncState);
+ syncState->analysisModule->initAnalysis(syncState);
}
}
- syncState->processingModule->initProcessing(syncState, traceSetContext);
// Process traceset
lttv_process_traceset_seek_time(traceSetContext, ltt_time_zero);
// Process traceset
lttv_process_traceset_seek_time(traceSetContext, ltt_time_zero);
@@
-243,7
+245,7
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
syncState->processingModule->finalizeProcessing(syncState);
// Write graphs file
syncState->processingModule->finalizeProcessing(syncState);
// Write graphs file
- if (optionSyncGraphs.present)
+ if (
!optionSyncNull.present &&
optionSyncGraphs.present)
{
writeGraphsScript(syncState);
{
writeGraphsScript(syncState);
@@
-253,21
+255,10
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
}
}
}
}
- if (syncState->processingModule->printProcessingStats != NULL)
- {
- syncState->processingModule->printProcessingStats(syncState);
- }
- if (syncState->matchingModule->printMatchingStats != NULL)
+ if (!optionSyncNull.present && optionSyncStats.present)
{
{
- 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++)
{
printf("Resulting synchronization factors:\n");
for (i= 0; i < syncState->traceNb; i++)
{
@@
-311,6
+302,8
@@
void syncTraceset(LttvTracesetContext* const traceSetContext)
printf("\tsystem time: %ld.%06ld\n", endUsage.ru_stime.tv_sec,
endUsage.ru_stime.tv_usec);
}
printf("\tsystem time: %ld.%06ld\n", endUsage.ru_stime.tv_sec,
endUsage.ru_stime.tv_usec);
}
+
+ return true;
}
}
This page took
0.024205 seconds
and
4
git commands to generate.