Add before and after hook to the control flow computing
[lttv.git] / lttv / lttv / state.c
index a2f609f52d768292ce4c66871c542adfc589bf9d..2a0717a9c43caf6997b52ccc61186f031ab4aeca 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
+#include <babeltrace/babeltrace.h>
 
 #define PREALLOCATED_EXECUTION_STACK 10
 
@@ -410,7 +411,7 @@ static void restore_init_state(LttvTraceState *self)
 
        start_time = ltt_time_from_uint64(
                            bt_trace_handle_get_timestamp_begin(self->trace->traceset->context, 
-                                                               self->trace->id));
+                                                               self->trace->id,BT_CLOCK_REAL));
 
 
        //lttv_process_trace_seek_time(&self->parent, ltt_time_zero);
@@ -2902,7 +2903,7 @@ static gboolean process_fork(void *hook_data, void *call_data)
        /* Skip Parent PID param */
 
        /* Child PID */
-       child_pid = lttv_event_get_long_unsigned(event, "child_tid");
+       child_pid = lttv_event_get_long(event, "child_tid");
        //ts->target_pid = child_pid;
 
        /* Child TGID */
@@ -3462,7 +3463,8 @@ void lttv_state_add_event_hooks(LttvTraceset *traceset)
        lttv_hooks_add(event_hook,schedchange , NULL, LTTV_PRIO_STATE); 
        lttv_hooks_add(event_hook,sched_try_wakeup , NULL, LTTV_PRIO_STATE);    
        lttv_hooks_add(event_hook,process_exit , NULL, LTTV_PRIO_STATE);        
-       lttv_hooks_add(event_hook,process_free , NULL, LTTV_PRIO_STATE);        
+       lttv_hooks_add(event_hook,process_free , NULL, LTTV_PRIO_STATE);
+       lttv_hooks_add(event_hook,process_fork , NULL, LTTV_PRIO_STATE);        
        lttv_hooks_add(event_hook,process_exec , NULL, LTTV_PRIO_STATE);        
        lttv_hooks_add(event_hook,enum_process_state , NULL, LTTV_PRIO_STATE);  
        lttv_hooks_add(event_hook,statedump_end , NULL, LTTV_PRIO_STATE);       
This page took 0.023425 seconds and 4 git commands to generate.