+
+
+/*
+ * Return the total number of elements in the "normal" bins (not underflow or
+ * overflow)
+ *
+ * Args:
+ * bins: the structure containing bins to build a histrogram
+ */
+static uint32_t normalTotal(struct Bins* const bins)
+{
+ return bins->total - bins->bin[0] - bins->bin[BIN_NB - 1];
+}
+
+
+/* Update the bounds between two traces
+ *
+ * Args:
+ * bounds: the array containing all the trace-pair bounds
+ * e1, e2: the two related events
+ */
+static void updateBounds(Bounds** const bounds, Event* const e1, Event* const
+ e2)
+{
+ unsigned int traceI, traceJ;
+ uint64_t messageTime;
+ Bounds* tpBounds;
+
+ if (e1->traceNum < e2->traceNum)
+ {
+ traceI= e2->traceNum;
+ traceJ= e1->traceNum;
+ messageTime= e1->cpuTime;
+ }
+ else
+ {
+ traceI= e1->traceNum;
+ traceJ= e2->traceNum;
+ messageTime= e2->cpuTime;
+ }
+ tpBounds= &bounds[traceI][traceJ];
+
+ if (messageTime < tpBounds->min)
+ {
+ tpBounds->min= messageTime;
+ }
+ if (messageTime > tpBounds->max)
+ {
+ tpBounds->max= messageTime;
+ }
+}
+
+
+/*
+ * Write the analysis-specific graph lines in the gnuplot script.
+ *
+ * Args:
+ * syncState: container for synchronization data
+ * i: first trace number
+ * j: second trace number, garanteed to be larger than i
+ */
+static void writeAnalysisTraceTimeBackPlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j)
+{
+ SyncState* chullSS= ((AnalysisDataEval*)
+ syncState->analysisData)->graphs->chullSS;
+ const GraphFunctions* graphFunctions=
+ &chullSS->analysisModule->graphFunctions;
+
+ if (graphFunctions->writeTraceTimeBackPlots != NULL)
+ {
+ graphFunctions->writeTraceTimeBackPlots(chullSS, i, j);
+ }
+}
+
+
+/*
+ * Write the analysis-specific graph lines in the gnuplot script.
+ *
+ * Args:
+ * syncState: container for synchronization data
+ * i: first trace number
+ * j: second trace number, garanteed to be larger than i
+ */
+static void writeAnalysisTraceTimeForePlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j)
+{
+ SyncState* chullSS= ((AnalysisDataEval*)
+ syncState->analysisData)->graphs->chullSS;
+ const GraphFunctions* graphFunctions=
+ &chullSS->analysisModule->graphFunctions;
+
+ if (graphFunctions->writeTraceTimeForePlots != NULL)
+ {
+ graphFunctions->writeTraceTimeForePlots(chullSS, i, j);
+ }
+}