Use a timescale without correction in the graphs
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Mon, 16 Nov 2009 16:17:24 +0000 (11:17 -0500)
committerBenjamin Poirier <benjamin.poirier@polymtl.ca>
Fri, 18 Dec 2009 19:04:17 +0000 (14:04 -0500)
... since graphs present timestamp data without correction.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/sync/event_processing_lttng_standard.c
lttv/lttv/sync/event_processing_lttng_standard.h

index 414d3ebbda8e34c9d02229f1dbe0b19b19503d54..0f1bda73c65704a0ebd1f1bd8b91a9ebd9d6c32f 100644 (file)
@@ -123,6 +123,24 @@ static void initProcessingLTTVStandard(SyncState* const syncState, LttvTracesetC
                        processingData->traceSetContext->traces[i]->t, (gpointer) i);
        }
 
+       if (syncState->graphsStream)
+       {
+               processingData->graphs= malloc(syncState->traceNb *
+                       sizeof(ProcessingGraphsLTTVStandard));
+
+               for(i= 0; i < syncState->traceNb; i++)
+               {
+                       LttTrace* traceI= traceSetContext->traces[i]->t;
+
+                       processingData->graphs[i].startFreq= traceI->start_freq;
+                       processingData->graphs[i].freqScale= traceI->freq_scale;
+               }
+       }
+       else
+       {
+               processingData->graphs= NULL;
+       }
+
        for(i= 0; i < syncState->traceNb; i++)
        {
                processingData->pendingRecv[i]= g_hash_table_new_full(&g_direct_hash,
@@ -287,6 +305,11 @@ static void destroyProcessingLTTVStandard(SyncState* const syncState)
                free(processingData->stats);
        }
 
+       if (syncState->graphsStream)
+       {
+               free(processingData->graphs);
+       }
+
        free(syncState->processingData);
        syncState->processingData= NULL;
 }
@@ -660,12 +683,12 @@ static void writeProcessingGraphsOptionsLTTVStandard(SyncState* const
        syncState, const unsigned int i, const unsigned int j)
 {
        ProcessingDataLTTVStandard* processingData;
-       LttTrace* traceI, * traceJ;
+       ProcessingGraphsLTTVStandard* traceI, * traceJ;
 
        processingData= (ProcessingDataLTTVStandard*) syncState->processingData;
 
-       traceI= processingData->traceSetContext->traces[i]->t;
-       traceJ= processingData->traceSetContext->traces[j]->t;
+       traceI= &processingData->graphs[i];
+       traceJ= &processingData->graphs[j];
 
        fprintf(syncState->graphsStream,
         "set key inside right bottom\n"
@@ -678,6 +701,6 @@ static void writeProcessingGraphsOptionsLTTVStandard(SyncState* const
                "set x2tics\n"
                "set y2label \"Clock %3$d (s)\"\n"
                "set y2range [GPVAL_Y_MIN / %4$.1f : GPVAL_Y_MAX / %4$.1f]\n"
-               "set y2tics\n", i, (double) traceI->start_freq / traceI->freq_scale,
-               j, (double) traceJ->start_freq / traceJ->freq_scale);
+               "set y2tics\n", i, (double) traceI->startFreq / traceI->freqScale, j,
+               (double) traceJ->startFreq / traceJ->freqScale);
 }
index 95c4be06cf1a11f4947aaf07534296466579a42f..e43f4254b0b7721de19288fed7afd237d96ce2f2 100644 (file)
@@ -34,6 +34,12 @@ typedef struct
                totOutE;
 } ProcessingStatsLTTVStandard;
 
+typedef struct
+{
+       uint32_t freqScale;
+       uint64_t startFreq;
+} ProcessingGraphsLTTVStandard;
+
 typedef struct
 {
        LttvTracesetContext* traceSetContext;
@@ -47,10 +53,12 @@ typedef struct
        // LttvTraceHook hookListList[traceNum][hookNum]
        GArray* hookListList;
 
-       // inE* pendingRecv[traceNb]
+       // inE* pendingRecv[traceNum]
        GHashTable** pendingRecv;
 
        ProcessingStatsLTTVStandard* stats;
+       // ProcessingGraphsLTTVStandard graphs[traceNum]
+       ProcessingGraphsLTTVStandard* graphs;
 } ProcessingDataLTTVStandard;
 
 #endif
This page took 0.025285 seconds and 4 git commands to generate.