fix stats at end of trace
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindowtraces.c
index 76992022167afc01054e5d9ba87e151332708922..87beead611324da1cad41ae51eb60b5320159f80 100644 (file)
@@ -104,12 +104,14 @@ LttvTrace *lttvwindowtraces_get_trace(guint num)
   LttvAttributeType type;
   LttvAttributeName name;
   LttvAttributeValue value;
+       gboolean is_named;
 
   g_assert(attribute = 
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(g_attribute),
                                 LTTV_TRACES)));
   
-  type = lttv_iattribute_get(LTTV_IATTRIBUTE(attribute), num, &name, &value);
+  type = lttv_iattribute_get(LTTV_IATTRIBUTE(attribute), num, &name, &value,
+                       &is_named);
 
   if(type == LTTV_POINTER) {
     return (LttvTrace *)*(value.v_pointer);
@@ -209,7 +211,6 @@ void lttvwindowtraces_add_trace(LttvTrace *trace)
   value = lttv_attribute_add(attribute,
                      LTTV_NOTIFY_CURRENT,
                      LTTV_POINTER);
 }
 
 /* Remove a trace from the global attributes */
@@ -973,6 +974,8 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
 
   if(trace == NULL)
     return FALSE;
+
+  if(lttvwindow_preempt_count > 0) return TRUE;
    
   attribute = lttv_trace_attribute(trace);
   
@@ -1309,8 +1312,13 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
                                                &value);
             g_assert(type == LTTV_POINTER);
             LttvHooks *after_request = (LttvHooks*)*(value.v_pointer);
-
-            if(after_request != NULL) lttv_hooks_call(after_request, tsc);
+            {
+              struct sum_traceset_closure t_closure;
+             t_closure.tss = (LttvTracesetStats*)tsc;
+             t_closure.current_time = ltt_time_infinite;
+              if(after_request != NULL) lttv_hooks_call(after_request,
+               &t_closure);
+            }
             
             if(bg_req->dialog != NULL)
               gtk_widget_destroy(bg_req->dialog);
This page took 0.024175 seconds and 4 git commands to generate.