Change synchronization code license to LGPLv2.1
[lttv.git] / lttv / lttv / sync / event_matching_broadcast.c
index ca5375b794bb618e0c4ce90d3d98d20d8012f0d8..c50fe4a846bf4d6700981bfd015595d75dbb77ec 100644 (file)
@@ -1,19 +1,18 @@
 /* This file is part of the Linux Trace Toolkit viewer
- * Copyright (C) 2009 Benjamin Poirier <benjamin.poirier@polymtl.ca>
+ * Copyright (C) 2009, 2010 Benjamin Poirier <benjamin.poirier@polymtl.ca>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License Version 2 as
- * published by the Free Software Foundation;
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or (at
+ * your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ * License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -21,6 +20,7 @@
 #endif
 
 #include <errno.h>
+#include <inttypes.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.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);
@@ -47,8 +42,6 @@ static void writeMatchingGraphsPlotsBroadcast(SyncState* const syncState, const
        unsigned int i, const unsigned int j);
 
 // Functions specific to this module
-static void registerMatchingBroadcast() __attribute__((constructor (101)));
-
 static void partialDestroyMatchingBroadcast(SyncState* const syncState);
 
 static void openGraphDataFiles(SyncState* const syncState);
@@ -75,7 +68,7 @@ static MatchingModule matchingModuleBroadcast = {
 /*
  * Matching module registering function
  */
-static void registerMatchingBroadcast()
+void registerMatchingBroadcast()
 {
        g_queue_push_tail(&matchingModules, &matchingModuleBroadcast);
 }
@@ -374,7 +367,7 @@ static void openGraphDataFiles(SyncState* const syncState)
        MatchingGraphsBroadcast* graphs= ((MatchingDataBroadcast*)
                syncState->matchingData)->graphs;
 
-       cwd= changeToGraphDir(syncState->graphsDir);
+       cwd= changeToGraphsDir(syncState->graphsDir);
 
        graphs->accuracyPoints= malloc(syncState->traceNb * sizeof(FILE**));
        graphs->pointsNb= malloc(syncState->traceNb * sizeof(unsigned int*));
@@ -430,7 +423,7 @@ static void writeAccuracyPoints(MatchingGraphsBroadcast* graphs, const
                        if (eventI->traceNum < eventJ->traceNum)
                        {
                                fprintf(graphs->accuracyPoints[eventJ->traceNum][eventI->traceNum],
-                                       "%20llu %20.9f\n", eventI->cpuTime,
+                                       "%20" PRIu64 " %20.9f\n", eventI->cpuTime,
                                        wallTimeSub(&eventJ->wallTime, &eventI->wallTime));
                                graphs->pointsNb[eventJ->traceNum][eventI->traceNum]++;
                        }
@@ -494,7 +487,7 @@ static void writeMatchingGraphsPlotsBroadcast(SyncState* const syncState, const
        {
                fprintf(syncState->graphsStream,
                        "\t\"matching_broadcast-%03d_and_%03d.data\" "
-                               "title \"Broadcast delays\" with points "
+                               "title \"Broadcast differential delays\" with points "
                                "linecolor rgb \"black\" pointtype 6 pointsize 2, \\\n", i,
                                j);
        }
This page took 0.02369 seconds and 4 git commands to generate.