From: Benjamin Poirier Date: Mon, 16 Nov 2009 16:17:24 +0000 (-0500) Subject: Use a timescale without correction in the graphs X-Git-Tag: v0.12.26~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1633c5a57a93a17f02858032c68f98f3d37890bc;p=lttv.git Use a timescale without correction in the graphs ... since graphs present timestamp data without correction. Signed-off-by: Benjamin Poirier --- diff --git a/lttv/lttv/sync/event_processing_lttng_standard.c b/lttv/lttv/sync/event_processing_lttng_standard.c index 414d3ebb..0f1bda73 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.c +++ b/lttv/lttv/sync/event_processing_lttng_standard.c @@ -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); } diff --git a/lttv/lttv/sync/event_processing_lttng_standard.h b/lttv/lttv/sync/event_processing_lttng_standard.h index 95c4be06..e43f4254 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.h +++ b/lttv/lttv/sync/event_processing_lttng_standard.h @@ -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