/* Events processing algorithm implementation */
+ /* Warning : the gtk_events_pending takes a LOT of cpu time. So what we do
+ * instead is to leave the control to GTK and take it back.
+ */
/* A. Servicing loop */
- while( (g_slist_length(list_in) != 0 || g_slist_length(list_out) != 0)) {
- /* && !gtk_events_pending() ) */
-
+ //while( (g_slist_length(list_in) != 0 || g_slist_length(list_out) != 0)) {
+ if((g_slist_length(list_in) != 0 || g_slist_length(list_out) != 0)) {
+ /* Servicing */
/* 1. If list_in is empty (need a seek) */
if( g_slist_length(list_in) == 0 ) {
events_request->event,
events_request->event_by_id);
}
-
+
/* Go to next */
if(remove)
{
count = lttv_process_traceset_middle(tsc, end_time, end_nb_events, end_position);
tfc = lttv_traceset_context_get_current_tfc(tsc);
- g_debug("Context time after middle : %lu, %lu", tfc->timestamp.tv_sec,
+ if(tfc != NULL)
+ g_debug("Context time after middle : %lu, %lu", tfc->timestamp.tv_sec,
tfc->timestamp.tv_nsec);
+ else
+ g_debug("End of trace reached after middle.");
}
{
}
}
}
-
- if(gtk_events_pending()) break;
}
+ /* End of removed servicing loop : leave control to GTK instead. */
+ // if(gtk_events_pending()) break;
+ //}
/* B. When interrupted between chunks */