From: yangxx Date: Tue, 3 Feb 2004 19:43:46 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@473 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3016 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=912be9a5bd895c20a2721f7d9799917c4517e0e4;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@473 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/main/processTrace.c b/ltt/branches/poly/lttv/main/processTrace.c index bf81ffcf..9a2d457c 100644 --- a/ltt/branches/poly/lttv/main/processTrace.c +++ b/ltt/branches/poly/lttv/main/processTrace.c @@ -80,6 +80,11 @@ static void lttv_traceset_context_compute_time_span( LttvTraceContext *tc; LttTrace * trace; + Time_Span->startTime.tv_sec = 0; + Time_Span->startTime.tv_nsec = 0; + Time_Span->endTime.tv_sec = 0; + Time_Span->endTime.tv_nsec = 0; + for(i=0; itraces[i]; trace = tc->t; diff --git a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c index 7a9b0b8b..82f83500 100644 --- a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c +++ b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c @@ -805,6 +805,12 @@ gboolean show_event_detail(void * hook_data, void * call_data) EventViewerData *event_viewer_data = (EventViewerData*) hook_data; LttvTracesetContext * tsc = get_traceset_context(event_viewer_data->mw); + if(event_viewer_data->raw_trace_data_queue_tmp->length == 0 && + event_viewer_data->raw_trace_data_queue->length == 0){ + event_viewer_data->shown = FALSE; + return FALSE; + } + if(event_viewer_data->shown == FALSE){ event_viewer_data->shown = TRUE; update_raw_data_array(event_viewer_data, @@ -1442,6 +1448,8 @@ gboolean update_current_time(void * hook_data, void * call_data) int i, j; LttTime t; + if(!event_viewer_data->raw_trace_data_queue->head) return FALSE; + if(event_viewer_data->current_time_updated ){ event_viewer_data->current_time_updated = FALSE; return FALSE; diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index cc6ec38b..76cd18c2 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -529,7 +529,8 @@ void remove_trace(GtkWidget * widget, gpointer user_data) g_object_unref(mw_data->current_tab->traceset_info->traceset_context); } lttv_traceset_remove(traceset, i); - lttv_trace_destroy(trace_v); + if(!lttv_trace_get_ref_number(trace_v)) + lttv_trace_destroy(trace_v); mw_data->current_tab->traceset_info->traceset_context = g_object_new(LTTV_TRACESET_STATS_TYPE, NULL); lttv_context_init( @@ -537,8 +538,16 @@ void remove_trace(GtkWidget * widget, gpointer user_data) traceset_info->traceset_context),traceset); //update current tab update_traceset(mw_data); - redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + if(nb_trace > 1){ + redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); + set_current_time(mw_data,&(mw_data->current_tab->current_time)); + }else{ + if(mw_data->current_tab){ + while(mw_data->current_tab->multi_vpaned->num_children){ + gtk_multi_vpaned_widget_delete(mw_data->current_tab->multi_vpaned); + } + } + } } break; } diff --git a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c index 04ca3a7d..fefaa307 100644 --- a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c +++ b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c @@ -425,6 +425,10 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data) if(tscs->stats == NULL) return; + ts = tscs->parent.parent.ts; + nb = lttv_traceset_number(ts); + if(nb == 0)return; + gtk_tree_store_append (store, &iter, NULL); gtk_tree_store_set (store, &iter, NAME_COLUMN, "Traceset statistics", @@ -436,9 +440,6 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data) show_tree(statistic_viewer_data, tscs->stats, &iter); //show stats for all traces - ts = tscs->parent.parent.ts; - nb = lttv_traceset_number(ts); - for(i = 0 ; i < nb ; i++) { tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]); desc = ltt_trace_system_description(tcs->parent.parent.t);