X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fevent_analysis_chull.c;h=6f098b6d0890cefa1af477c2f9038c36307117bf;hb=2f961b65e3422f23019286e9531b0a40070278ea;hp=0e583791cedd7d8a3a67ec4c5099afd48213adcf;hpb=6ce8ceacae04955f2ccaf93f14c086b72bc14f09;p=lttv.git diff --git a/lttv/lttv/sync/event_analysis_chull.c b/lttv/lttv/sync/event_analysis_chull.c index 0e583791..6f098b6d 100644 --- a/lttv/lttv/sync/event_analysis_chull.c +++ b/lttv/lttv/sync/event_analysis_chull.c @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -60,8 +61,6 @@ static void writeAnalysisGraphsPlotsCHull(SyncState* const syncState, const unsigned int i, const unsigned int j); // Functions specific to this module -static void registerAnalysisCHull() __attribute__((constructor (101))); - static void openGraphFiles(SyncState* const syncState); static void closeGraphFiles(SyncState* const syncState); static void writeGraphFiles(SyncState* const syncState); @@ -120,7 +119,7 @@ const char* const approxNames[]= { /* * Analysis module registering function */ -static void registerAnalysisCHull() +void registerAnalysisCHull() { g_queue_push_tail(&analysisModules, &analysisModuleCHull); } @@ -270,7 +269,7 @@ static void gfDumpHullToFile(gpointer data, gpointer userData) Point* point; point= (Point*) data; - fprintf((FILE*) userData, "%20llu %20llu\n", point->x, point->y); + fprintf((FILE*) userData, "%20" PRIu64 " %20" PRIu64 "\n", point->x, point->y); } @@ -401,7 +400,8 @@ static void analyzeMessageCHull(SyncState* const syncState, Message* const messa newPoint->x= message->inE->cpuTime; newPoint->y= message->outE->cpuTime; hullType= UPPER; - g_debug("Reception point hullArray[%lu][%lu] x= inE->time= %llu y= outE->time= %llu", + g_debug("Reception point hullArray[%lu][%lu] " + "x= inE->time= %" PRIu64 " y= outE->time= %" PRIu64, message->inE->traceNum, message->outE->traceNum, newPoint->x, newPoint->y); } @@ -411,7 +411,8 @@ static void analyzeMessageCHull(SyncState* const syncState, Message* const messa newPoint->x= message->outE->cpuTime; newPoint->y= message->inE->cpuTime; hullType= LOWER; - g_debug("Send point hullArray[%lu][%lu] x= inE->time= %llu y= outE->time= %llu", + g_debug("Send point hullArray[%lu][%lu] " + "x= inE->time= %" PRIu64 " y= outE->time= %" PRIu64, message->inE->traceNum, message->outE->traceNum, newPoint->x, newPoint->y); } @@ -703,7 +704,9 @@ static int jointCmp(const Point const* p1, const Point const* p2, const const double fuzzFactor= 0.; result= crossProductK(p1, p2, p1, p3); - g_debug("crossProductK(p1= (%llu, %llu), p2= (%llu, %llu), p1= (%llu, %llu), p3= (%llu, %llu))= %g", + g_debug("crossProductK(p1= (%" PRIu64 ", %" PRIu64 "), " + "p2= (%" PRIu64 ", %" PRIu64 "), p1= (%" PRIu64 ", %" PRIu64 "), " + "p3= (%" PRIu64 ", %" PRIu64 "))= %g", p1->x, p1->y, p2->x, p2->y, p1->x, p1->y, p3->x, p3->y, result); if (result < fuzzFactor) { @@ -1075,14 +1078,15 @@ static Factors* calculateFactorsExact(GQueue* const cu, GQueue* const cl, const p1= g_queue_peek_nth(c1, i1); p2= g_queue_peek_nth(c2, i2); - g_debug("Resulting points are: c1[i1]: x= %llu y= %llu c2[i2]: x= %llu y= %llu", - p1->x, p1->y, p2->x, p2->y); + g_debug("Resulting points are: c1[i1]: x= %" PRIu64 " y= %" PRIu64 + " c2[i2]: x= %" PRIu64 " y= %" PRIu64 "", p1->x, p1->y, p2->x, p2->y); result= malloc(sizeof(Factors)); result->drift= slope(p1, p2); result->offset= intercept(p1, p2); - g_debug("Resulting factors are: drift= %g offset= %g", result->drift, result->offset); + g_debug("Resulting factors are: drift= %g offset= %g", result->drift, + result->offset); return result; }