LTTV_STATS_MODE_TYPES,
LTTV_STATS_MODES,
LTTV_STATS_SUBMODES,
+ LTTV_STATS_FUNCTIONS,
LTTV_STATS_EVENT_TYPES,
LTTV_STATS_CPU_TIME,
LTTV_STATS_ELAPSED_TIME,
static void update_event_tree(LttvTracefileStats *tfcs)
{
LttvTraceState *ts = (LttvTraceState *)tfcs->parent.parent.t_context;
- guint cpu = ltt_tracefile_num(tfcs->parent.parent.tf);
+ guint cpu = tfcs->parent.cpu;
LttvProcessState *process = ts->running_process[cpu];
LttvExecutionState *es = process->state;
static void mode_change(LttvTracefileStats *tfcs)
{
LttvTraceState *ts = (LttvTraceState *)tfcs->parent.parent.t_context;
- guint cpu = ltt_tracefile_num(tfcs->parent.parent.tf);
+ guint cpu = tfcs->parent.cpu;
LttvProcessState *process = ts->running_process[cpu];
LttvAttributeValue cpu_time;
static void mode_end(LttvTracefileStats *tfcs)
{
LttvTraceState *ts = (LttvTraceState *)tfcs->parent.parent.t_context;
- guint cpu = ltt_tracefile_num(tfcs->parent.parent.tf);
+ guint cpu = tfcs->parent.cpu;
LttvProcessState *process = ts->running_process[cpu];
LttvAttributeValue elapsed_time, cpu_time;
return FALSE;
}
-
gboolean after_irq_entry(void *hook_data, void *call_data)
{
update_event_tree((LttvTracefileStats *)call_data);
}
+gboolean before_soft_irq_entry(void *hook_data, void *call_data)
+{
+ mode_change((LttvTracefileStats *)call_data);
+ return FALSE;
+}
+
+gboolean after_soft_irq_entry(void *hook_data, void *call_data)
+{
+ update_event_tree((LttvTracefileStats *)call_data);
+ return FALSE;
+}
+
+
+gboolean before_soft_irq_exit(void *hook_data, void *call_data)
+{
+ mode_end((LttvTracefileStats *)call_data);
+ return FALSE;
+}
+
+
+gboolean after_soft_irq_exit(void *hook_data, void *call_data)
+{
+ update_event_tree((LttvTracefileStats *)call_data);
+ return FALSE;
+}
+
+
gboolean before_schedchange(void *hook_data, void *call_data)
{
LttvTracefileStats *tfcs = (LttvTracefileStats *)call_data;
/* Find the eventtype id for the following events and register the
associated by id hooks. */
- hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 7);
- g_array_set_size(hooks, 7);
+ hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 9);
+ g_array_set_size(hooks, 9);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
before_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
&g_array_index(hooks, LttvTraceHook, 5));
g_assert(!ret);
+ ret = lttv_trace_find_hook(ts->parent.parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+ LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+ before_soft_irq_entry, NULL,
+ &g_array_index(hooks, LttvTraceHook, 6));
+ g_assert(!ret);
+
+ ret = lttv_trace_find_hook(ts->parent.parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+ 0, 0, 0,
+ before_soft_irq_exit, NULL,
+ &g_array_index(hooks, LttvTraceHook, 7));
+ g_assert(!ret);
+
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FACILITY_PROCESS, LTT_EVENT_SCHEDCHANGE,
LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
before_schedchange, NULL,
- &g_array_index(hooks, LttvTraceHook, 6));
+ &g_array_index(hooks, LttvTraceHook, 8));
g_assert(!ret);
before_hooks = hooks;
- hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 9);
- g_array_set_size(hooks, 9);
+ hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 11);
+ g_array_set_size(hooks, 11);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
after_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
after_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
&g_array_index(hooks, LttvTraceHook, 5));
g_assert(!ret);
+ ret = lttv_trace_find_hook(ts->parent.parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+ LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+ after_irq_entry, NULL,
+ &g_array_index(hooks, LttvTraceHook, 6));
+ g_assert(!ret);
+
+ ret = lttv_trace_find_hook(ts->parent.parent.t,
+ LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+ 0, 0, 0,
+ after_soft_irq_exit, NULL,
+ &g_array_index(hooks, LttvTraceHook, 7));
+ g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FACILITY_PROCESS, LTT_EVENT_FORK,
LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
process_fork, NULL,
- &g_array_index(hooks, LttvTraceHook, 6));
+ &g_array_index(hooks, LttvTraceHook, 8));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FACILITY_PROCESS, LTT_EVENT_EXIT,
LTT_FIELD_PID, 0, 0,
process_exit, NULL,
- &g_array_index(hooks, LttvTraceHook, 7));
+ &g_array_index(hooks, LttvTraceHook, 9));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FACILITY_PROCESS, LTT_EVENT_FREE,
LTT_FIELD_PID, 0, 0,
process_free, NULL,
- &g_array_index(hooks, LttvTraceHook, 8));
+ &g_array_index(hooks, LttvTraceHook, 10));
g_assert(!ret);
LTTV_STATS_MODE_TYPES = g_quark_from_string("mode_types");
LTTV_STATS_MODES = g_quark_from_string("modes");
LTTV_STATS_SUBMODES = g_quark_from_string("submodes");
+ LTTV_STATS_SUBMODES = g_quark_from_string("functions");
LTTV_STATS_EVENT_TYPES = g_quark_from_string("event_types");
LTTV_STATS_CPU_TIME = g_quark_from_string("cpu time");
LTTV_STATS_ELAPSED_TIME = g_quark_from_string("elapsed time");