X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fhistogram%2Fhistodrawing.c;h=53addbcec1909a9cd28fbc21a6c13a057bea6715;hb=201fcc156aeee6cf7c1283c0163e47cb209cb78e;hp=39095ffbfa6565e1dfb2a4a8c7c884e04720e80c;hpb=1684ba2ed5c10d89356e2fb8122a8b3eeeb9e0af;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/histogram/histodrawing.c b/ltt/branches/poly/lttv/modules/gui/histogram/histodrawing.c index 39095ffb..53addbce 100644 --- a/ltt/branches/poly/lttv/modules/gui/histogram/histodrawing.c +++ b/ltt/branches/poly/lttv/modules/gui/histogram/histodrawing.c @@ -40,7 +40,7 @@ #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format) //FIXME -#define TRACE_NUMBER 0 +// fixed #define TRACE_NUMBER 0 #define EXTRA_ALLOC 1024 // pixels #define padding_width 50 @@ -149,21 +149,15 @@ void histo_drawing_data_request_begin(EventsRequest *events_request, LttvTracese } - void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss) +void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss) { g_debug("Begin of chunk"); HistoControlFlowData *cfd = events_request->viewer_data; LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss); - //LttTime current_time = lttv_traceset_context_get_current_tfc(tsc)->timestamp; - guint num_cpu = - ltt_trace_get_num_cpu(tss->parent.traces[TRACE_NUMBER]->t); - - /* //disabled for histogram - cfd->process_list->current_hash_data = g_new(HashedProcessData*,num_cpu); - memset(cfd->process_list->current_hash_data, 0, - sizeof(HashedProcessData*)*num_cpu);*/ - //cfd->drawing->last_start = LTT_TIME_MIN(current_time, - // events_request->end_time); + + if(cfd->chunk_has_begun) return; + + cfd->chunk_has_begun = TRUE; } @@ -716,7 +710,7 @@ void histo_drawing_destroy(histoDrawing_t *drawing) if(drawing->gc != NULL) gdk_gc_unref(drawing->gc); - g_free(drawing->pango_layout); + g_object_unref(drawing->pango_layout); if(drawing->dotted_gc != NULL) gdk_gc_unref(drawing->dotted_gc); if(drawing->ruler_gc_butt != NULL) gdk_gc_unref(drawing->ruler_gc_butt); if(drawing->ruler_gc_round != NULL) gdk_gc_unref(drawing->ruler_gc_round);