fix process end of life
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 1 Mar 2006 23:14:53 +0000 (23:14 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 1 Mar 2006 23:14:53 +0000 (23:14 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1569 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ChangeLog
ltt/branches/poly/configure.in
ltt/branches/poly/lttv/lttv/state.c

index 7248fb69b064926b708c88dfdf5d2008031cffed..cb342b118c559cf89c108df93e3a9245603d901d 100644 (file)
@@ -1,5 +1,7 @@
 LinuxTraceToolkit ChangeLog
 
+01/03/2006     LTTV 0.8.25
+                                               Fix process end of life in state.c
 28/02/2006     LTTV 0.8.24
                                                Fix heartbeat support
 27/02/2006     LTTV 0.8.23
index ba22463217a8e9acb660b32b2c74c6f0ed0a6255..2285bf68bf20866cd464776440ba2c889c953747 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.24-28022006)
+AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.25-01032006)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index eba65ab86c830ae37eee3de2d2097f5c5b667e9a..6c7fb339383948130069dff9ad0e9d22d4eddb03 100644 (file)
@@ -1252,6 +1252,7 @@ static gboolean schedchange(void *hook_data, void *call_data)
   guint cpu = ltt_tracefile_num(s->parent.tf);
   LttvTraceState *ts = (LttvTraceState*)s->parent.t_context;
   LttvProcessState *process = ts->running_process[cpu];
+  LttvProcessState *old_process = ts->running_process[cpu];
   
   LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
   LttvTraceHookByFacility *thf = (LttvTraceHookByFacility *)hook_data;
@@ -1271,7 +1272,8 @@ static gboolean schedchange(void *hook_data, void *call_data)
        the wrongly attributed statistics. */
 
     //This test only makes sense once the state is known and if there is no
-    //missing events.
+    //missing events. We need to silently ignore schedchange coming after a
+               //process_free, or it causes glitches. (FIXME)
     //if(unlikely(process->pid != pid_out)) {
     //  g_assert(process->pid == 0);
     //}
@@ -1284,8 +1286,8 @@ static gboolean schedchange(void *hook_data, void *call_data)
       else process->state->s = LTTV_STATE_WAIT;
       process->state->change = s->parent.timestamp;
     }
-
-    if(state_out == 32)
+               
+               if(state_out == 32)
        exit_process(s, process); /* EXIT_DEAD */
           /* see sched.h for states */
   }
@@ -1448,8 +1450,9 @@ static gboolean process_free(void *hook_data, void *call_data)
         break;
       }
     }
-    if(i == num_cpus) /* process is not scheduled */
-      exit_process(s, process);
+    //if(i == num_cpus) /* process is not scheduled */
+      //exit_process(s, process);      // do nothing : wait for the schedchange to
+                       //delete the process.
   }
 
   return FALSE;
This page took 0.027673 seconds and 4 git commands to generate.