- g_array_add(hooks, find_hook(ts->parent.t, "core","syscall_entry",
- "syscall_id", NULL, NULL, syscall_entry));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "syscall_exit",
- NULL, NULL, NULL, syscall_exit));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "trap_entry", "trap_id",
- NULL, NULL, trap_entry));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL,
- NULL, trap_exit));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "irq_entry", "irq_id",
- NULL, NULL, irq_entry));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "irq_exit", NULL, NULL,
- NULL, irq_exit));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "schedchange",
- "in", "out", "out_state", schedchange));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "process_fork",
- "child_pid", NULL, NULL, process_fork));
- g_array_add(hooks, find_hook(ts->parent.t, "core", "process_exit",
- NULL, NULL, NULL, process_exit));
+ hook_id = find_hook(ts->parent.t, "core","syscall_entry","syscall_id",
+ NULL, NULL, syscall_entry);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "syscall_exit",
+ NULL, NULL, NULL, syscall_exit);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "trap_entry", "trap_id",
+ NULL, NULL, trap_entry);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "trap_exit", NULL, NULL,
+ NULL, trap_exit);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "irq_entry", "irq_id",
+ NULL, NULL, irq_entry);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "irq_exit", NULL, NULL,
+ NULL, irq_exit);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "schedchange",
+ "in", "out", "out_state", schedchange);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "process_fork",
+ "child_pid", NULL, NULL, process_fork);
+ g_array_append_val(hooks, hook_id);
+
+ hook_id = find_hook(ts->parent.t, "core", "process_exit",
+ NULL, NULL, NULL, process_exit);
+ g_array_append_val(hooks, hook_id);