+#if 0
+ lttv_trace_find_hook(ts->parent.t,
+ "core", "process", "event_sub_id",
+ "event_data1", "event_data2", before_process_hook,
+ &g_array_index(hooks, LttvTraceHook, hn++));
+#endif //0
+#if 0
+ lttv_trace_find_hook(ts->parent.t, "core", "process_fork", "child_pid",
+ NULL, NULL, process_fork, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ lttv_trace_find_hook(ts->parent.t, "core", "process_exit", NULL, NULL,
+ NULL, process_exit, &g_array_index(hooks, LttvTraceHook, hn++));
+#endif //0
+
+ /* after hooks */
+
+#if 0
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core","syscall_entry","syscall_id",
+ NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core", "syscall_exit", NULL, NULL,
+ NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core", "trap_entry", "trap_id",
+ NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL, NULL,
+ after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core", "irq_entry", "irq_id", NULL,
+ NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ /**** DESACTIVATED ****/
+ lttv_trace_find_hook(ts->parent.t, "core", "irq_exit", NULL, NULL, NULL,
+ after_execmode_hook, &g_array_index(hooks, LttvTraceHook, hn++));
+#endif //0
+#if 0
+ lttv_trace_find_hook(ts->parent.t, "core", "schedchange", "in", "out",
+ "out_state", after_schedchange_hook,
+ &g_array_index(hooks, LttvTraceHook, hn++));
+
+ lttv_trace_find_hook(ts->parent.t, "core", "process", "event_sub_id",
+ "event_data1", "event_data2", after_process_hook,
+ &g_array_index(hooks, LttvTraceHook, hn++));
+#endif //0
+ after_hn = before_hn;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_PROCESS, LTT_EVENT_SCHEDCHANGE,
+ LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+ after_schedchange_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_PROCESS, LTT_EVENT_FORK,
+ LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
+ after_process_fork_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_PROCESS, LTT_EVENT_EXIT,
+ LTT_FIELD_PID, 0, 0,
+ after_process_exit_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_FS, LTT_EVENT_EXEC,
+ 0, 0, 0,
+ after_fs_exec_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_USER_GENERIC, LTT_EVENT_THREAD_BRAND,
+ LTT_FIELD_NAME, 0, 0,
+ after_user_generic_thread_brand_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_STATEDUMP, LTT_EVENT_ENUM_PROCESS_STATE,
+ LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME,
+ after_event_enum_process_hook,
+ events_request,
+ &g_array_index(hooks, LttvTraceHook, after_hn++));
+ if(ret) after_hn--;
+
+ hooks = g_array_set_size(hooks, after_hn);
+
+#if 0
+ lttv_trace_find_hook(ts->parent.t, "core", "process_fork", "child_pid",
+ NULL, NULL, process_fork, &g_array_index(hooks, LttvTraceHook, hn++));
+
+ lttv_trace_find_hook(ts->parent.t, "core", "process_exit", NULL, NULL,
+ NULL, process_exit, &g_array_index(hooks, LttvTraceHook, hn++));
+#endif //0
+
+
+
+ /* Add these hooks to each event_by_id hooks list */
+ /* add before */
+ for(k = 0 ; k < before_hn ; k++) {
+ hook = &g_array_index(hooks, LttvTraceHook, k);
+ for(l=0;l<hook->fac_list->len;l++) {
+ thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
+ lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
+ thf->h,
+ thf,
+ LTTV_PRIO_STATE-5);
+ }
+ }
+
+ /* add after */
+ for(k = before_hn ; k < after_hn ; k++) {
+ hook = &g_array_index(hooks, LttvTraceHook, k);
+ for(l=0;l<hook->fac_list->len;l++) {
+ thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
+ lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
+ thf->h,
+ thf,
+ LTTV_PRIO_STATE+5);
+ }
+ }
+
+ events_request->hooks = hooks;
+
+ // Fill the events request
+ events_request->owner = control_flow_data;
+ events_request->viewer_data = control_flow_data;
+ events_request->servicing = FALSE;
+ events_request->start_time = start;
+ events_request->start_position = NULL;
+ events_request->stop_flag = FALSE;
+ events_request->end_time = time_end;
+ events_request->num_events = G_MAXUINT;
+ events_request->end_position = NULL;
+ events_request->trace = i; //fixed /* FIXME */
+ events_request->before_chunk_traceset = before_chunk_traceset;
+ events_request->before_chunk_trace = NULL;
+ events_request->before_chunk_tracefile = NULL;
+ events_request->event = NULL;
+ events_request->event_by_id = event_by_id;
+ events_request->after_chunk_tracefile = NULL;
+ events_request->after_chunk_trace = NULL;
+ events_request->after_chunk_traceset = after_chunk_traceset;
+ events_request->before_request = before_request_hook;
+ events_request->after_request = after_request_hook;
+
+ g_debug("req : start : %lu, %lu", start.tv_sec,
+ start.tv_nsec);
+
+ g_debug("req : end : %lu, %lu", time_end.tv_sec,
+ time_end.tv_nsec);
+
+ lttvwindow_events_request(tab, events_request);
+
+ }
+
+ }
+
+#if 0