- hooks = g_array_new(FALSE, FALSE, sizeof(LttvTraceHook));
- g_array_set_size(hooks, 9);
-
- lttv_trace_find_hook(ts->parent.t, "core","syscall_entry","syscall_id",
- NULL, NULL, syscall_entry, &g_array_index(hooks, LttvTraceHook, 0));
-
- lttv_trace_find_hook(ts->parent.t, "core", "syscall_exit", NULL, NULL,
- NULL, syscall_exit, &g_array_index(hooks, LttvTraceHook, 1));
-
- lttv_trace_find_hook(ts->parent.t, "core", "trap_entry", "trap_id",
- NULL, NULL, trap_entry, &g_array_index(hooks, LttvTraceHook, 2));
-
- lttv_trace_find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL, NULL,
+ hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 10);
+ g_array_set_size(hooks, 10);
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FIELD_SYSCALL_ID, 0, 0,
+ syscall_entry, &g_array_index(hooks, LttvTraceHook, 0));
+ g_assert(!ret);
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+ 0, 0, 0,
+ syscall_exit, &g_array_index(hooks, LttvTraceHook, 1));
+ g_assert(!ret);
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_TRAP_ENTRY,
+ LTT_FIELD_TRAP_ID, 0, 0,
+ trap_entry, &g_array_index(hooks, LttvTraceHook, 2));
+ g_assert(!ret);
+
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_TRAP_EXIT,
+ 0, 0, 0,