-#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, 8));
- /**** DESACTIVATED ****/
- lttv_trace_find_hook(ts->parent.t, "core", "syscall_exit", NULL, NULL,
- NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 9));
-
- /**** DESACTIVATED ****/
- lttv_trace_find_hook(ts->parent.t, "core", "trap_entry", "trap_id",
- NULL, NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 10));
-
- /**** DESACTIVATED ****/
- lttv_trace_find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL, NULL,
- after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 11));
-
- /**** DESACTIVATED ****/
- lttv_trace_find_hook(ts->parent.t, "core", "irq_entry", "irq_id", NULL,
- NULL, after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 12));
-
- /**** DESACTIVATED ****/
- lttv_trace_find_hook(ts->parent.t, "core", "irq_exit", NULL, NULL, NULL,
- after_execmode_hook, &g_array_index(hooks, LttvTraceHook, 13));
-#endif //0
-
- lttv_trace_find_hook(ts->parent.t, "core", "schedchange", "in", "out",
- "out_state", after_schedchange_hook,
- &g_array_index(hooks, LttvTraceHook, 8));
-
- lttv_trace_find_hook(ts->parent.t, "core", "process", "event_sub_id",
- "event_data1", "event_data2", after_process_hook,
- &g_array_index(hooks, LttvTraceHook, 9));
-
-#if 0
- lttv_trace_find_hook(ts->parent.t, "core", "process_fork", "child_pid",
- NULL, NULL, process_fork, &g_array_index(hooks, LttvTraceHook, 7));
-
- lttv_trace_find_hook(ts->parent.t, "core", "process_exit", NULL, NULL,
- NULL, process_exit, &g_array_index(hooks, LttvTraceHook, 8));
-#endif //0
-
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL,
+ LTT_EVENT_PROCESS_FREE,
+ FIELD_ARRAY(LTT_FIELD_PID),
+ before_process_release_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_LIST,
+ LTT_EVENT_STATEDUMP_END,
+ NULL,
+ before_statedump_end,
+ events_request,
+ &hooks);
+
+ /* After hooks */
+ first_after = hooks->len;
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL,
+ LTT_EVENT_SCHED_SCHEDULE,
+ FIELD_ARRAY(LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE),
+ after_schedchange_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL,
+ LTT_EVENT_PROCESS_FORK,
+ FIELD_ARRAY(LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID),
+ after_process_fork_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL,
+ LTT_EVENT_PROCESS_EXIT,
+ FIELD_ARRAY(LTT_FIELD_PID),
+ after_process_exit_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_FS,
+ LTT_EVENT_EXEC,
+ NULL,
+ after_fs_exec_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_USER_GENERIC,
+ LTT_EVENT_THREAD_BRAND,
+ FIELD_ARRAY(LTT_FIELD_NAME),
+ after_user_generic_thread_brand_hook,
+ events_request,
+ &hooks);
+
+ lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_LIST,
+ LTT_EVENT_PROCESS_STATE,
+ FIELD_ARRAY(LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME),
+ after_event_enum_process_hook,
+ events_request,
+ &hooks);