projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation warnings
[lttv.git]
/
lttv
/
lttv
/
sync
/
event_matching_broadcast.c
diff --git
a/lttv/lttv/sync/event_matching_broadcast.c
b/lttv/lttv/sync/event_matching_broadcast.c
index 3006f40474fd4adf7261f1c9d03f476f9e79d08c..968856979b157496dcd6c00ac5c2d64e7740c758 100644
(file)
--- a/
lttv/lttv/sync/event_matching_broadcast.c
+++ b/
lttv/lttv/sync/event_matching_broadcast.c
@@
-21,6
+21,7
@@
#endif
#include <errno.h>
#endif
#include <errno.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@
-31,11
+32,6
@@
#include "event_matching_broadcast.h"
#include "event_matching_broadcast.h"
-#ifndef g_info
-#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
-#endif
-
-
// Functions common to all matching modules
static void initMatchingBroadcast(SyncState* const syncState);
static void destroyMatchingBroadcast(SyncState* const syncState);
// Functions common to all matching modules
static void initMatchingBroadcast(SyncState* const syncState);
static void destroyMatchingBroadcast(SyncState* const syncState);
@@
-54,7
+50,6
@@
static void partialDestroyMatchingBroadcast(SyncState* const syncState);
static void openGraphDataFiles(SyncState* const syncState);
static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const
Broadcast* const broadcast);
static void openGraphDataFiles(SyncState* const syncState);
static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const
Broadcast* const broadcast);
-void gfAddToArray(gpointer data, gpointer user_data);
static void closeGraphDataFiles(SyncState* const syncState);
static void closeGraphDataFiles(SyncState* const syncState);
@@
-68,7
+63,7
@@
static MatchingModule matchingModuleBroadcast = {
.finalizeMatching= &finalizeMatchingBroadcast,
.printMatchingStats= &printMatchingStatsBroadcast,
.graphFunctions= {
.finalizeMatching= &finalizeMatchingBroadcast,
.printMatchingStats= &printMatchingStatsBroadcast,
.graphFunctions= {
- .writeTraceTimePlots= &writeMatchingGraphsPlotsBroadcast,
+ .writeTraceTime
Fore
Plots= &writeMatchingGraphsPlotsBroadcast,
}
};
}
};
@@
-375,7
+370,7
@@
static void openGraphDataFiles(SyncState* const syncState)
MatchingGraphsBroadcast* graphs= ((MatchingDataBroadcast*)
syncState->matchingData)->graphs;
MatchingGraphsBroadcast* graphs= ((MatchingDataBroadcast*)
syncState->matchingData)->graphs;
- cwd= changeToGraphDir(syncState->graphsDir);
+ cwd= changeToGraph
s
Dir(syncState->graphsDir);
graphs->accuracyPoints= malloc(syncState->traceNb * sizeof(FILE**));
graphs->pointsNb= malloc(syncState->traceNb * sizeof(unsigned int*));
graphs->accuracyPoints= malloc(syncState->traceNb * sizeof(FILE**));
graphs->pointsNb= malloc(syncState->traceNb * sizeof(unsigned int*));
@@
-419,7
+414,7
@@
static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const
unsigned int eventNb= broadcast->events->length;
events= g_array_sized_new(FALSE, FALSE, sizeof(Event*), eventNb);
unsigned int eventNb= broadcast->events->length;
events= g_array_sized_new(FALSE, FALSE, sizeof(Event*), eventNb);
- g_queue_foreach(broadcast->events, &gfAddToArray, events);
+ g_queue_foreach(broadcast->events, &gfAdd
Event
ToArray, events);
for (i= 0; i < eventNb; i++)
{
for (i= 0; i < eventNb; i++)
{
@@
-431,25
+426,14
@@
static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const
if (eventI->traceNum < eventJ->traceNum)
{
fprintf(graphs->accuracyPoints[eventJ->traceNum][eventI->traceNum],
if (eventI->traceNum < eventJ->traceNum)
{
fprintf(graphs->accuracyPoints[eventJ->traceNum][eventI->traceNum],
- "%20
llu
%20.9f\n", eventI->cpuTime,
+ "%20
" PRIu64 "
%20.9f\n", eventI->cpuTime,
wallTimeSub(&eventJ->wallTime, &eventI->wallTime));
graphs->pointsNb[eventJ->traceNum][eventI->traceNum]++;
}
}
}
wallTimeSub(&eventJ->wallTime, &eventI->wallTime));
graphs->pointsNb[eventJ->traceNum][eventI->traceNum]++;
}
}
}
-}
-
-/*
- * A GFunc for g_queue_foreach()
- *
- * Args:
- * data Event*, event to add
- * user_data GArray*, array to add to
- */
-void gfAddToArray(gpointer data, gpointer user_data)
-{
- g_array_append_val((GArray*) user_data, data);
+ g_array_free(events, TRUE);
}
}
@@
-506,7
+490,7
@@
static void writeMatchingGraphsPlotsBroadcast(SyncState* const syncState, const
{
fprintf(syncState->graphsStream,
"\t\"matching_broadcast-%03d_and_%03d.data\" "
{
fprintf(syncState->graphsStream,
"\t\"matching_broadcast-%03d_and_%03d.data\" "
- "title \"Broadcast delays\" with points "
+ "title \"Broadcast d
ifferential d
elays\" with points "
"linecolor rgb \"black\" pointtype 6 pointsize 2, \\\n", i,
j);
}
"linecolor rgb \"black\" pointtype 6 pointsize 2, \\\n", i,
j);
}
This page took
0.023823 seconds
and
4
git commands to generate.