static void bdevstate_free(LttvBdevState *);
static void bdevstate_free_cb(gpointer key, gpointer value, gpointer user_data);
static LttvBdevState *bdevstate_copy(LttvBdevState *bds);
-static LttvBdevState *bdev_state_get(LttvTraceState *ts, guint16 devcode);
void lttv_state_save(LttvTraceState *self, LttvAttribute *container)
static void
create_name_tables(LttvTraceState *tcs)
{
- int i, nb;
+ int i;
LttvTraceHook th;
- LttType *t;
-
GString *fe_name = g_string_new("");
LttvNameTables *name_tables = g_new(LttvNameTables, 1);
LTT_FIELD_SYSCALL_ID, 0, 0,
NULL, NULL, &th)) {
- th = lttv_trace_hook_get_first(&th);
-
- t = ltt_field_type(th->f1);
- nb = ltt_type_element_number(t);
-
+// th = lttv_trace_hook_get_first(&th);
+//
+// t = ltt_field_type(th->f1);
+// nb = ltt_type_element_number(t);
+//
lttv_trace_hook_destroy(&th);
-
- name_tables->syscall_names = g_new(GQuark, nb);
- name_tables->nb_syscalls = nb;
-
- for(i = 0 ; i < nb ; i++) {
- name_tables->syscall_names[i] = ltt_enum_string_get(t, i);
- if(!name_tables->syscall_names[i]) {
- GString *string = g_string_new("");
- g_string_printf(string, "syscall %u", i);
- name_tables->syscall_names[i] = g_quark_from_string(string->str);
- g_string_free(string, TRUE);
- }
+//
+// name_tables->syscall_names = g_new(GQuark, nb);
+// name_tables->nb_syscalls = nb;
+//
+// for(i = 0 ; i < nb ; i++) {
+// name_tables->syscall_names[i] = ltt_enum_string_get(t, i);
+// if(!name_tables->syscall_names[i]) {
+// GString *string = g_string_new("");
+// g_string_printf(string, "syscall %u", i);
+// name_tables->syscall_names[i] = g_quark_from_string(string->str);
+// g_string_free(string, TRUE);
+// }
+// }
+
+ name_tables->syscall_names = g_new(GQuark, 256);
+ for(i = 0 ; i < 256 ; i++) {
+ g_string_printf(fe_name, "syscall %d", i);
+ name_tables->syscall_names[i] = g_quark_from_string(fe_name->str);
}
-
- //name_tables->syscall_names = g_new(GQuark, 256);
- //for(i = 0 ; i < 256 ; i++) {
- // g_string_printf(fe_name, "syscall %d", i);
- // name_tables->syscall_names[i] = g_quark_from_string(fe_name->str);
- //}
} else {
name_tables->syscall_names = NULL;
name_tables->nb_syscalls = 0;
LTT_FIELD_TRAP_ID, 0, 0,
NULL, NULL, &th)) {
- th = lttv_trace_hook_get_first(&th);
-
- t = ltt_field_type(th->f1);
- //nb = ltt_type_element_number(t);
+// th = lttv_trace_hook_get_first(&th);
+//
+// t = ltt_field_type(th->f1);
+// //nb = ltt_type_element_number(t);
+//
+ lttv_trace_hook_destroy(&th);
- lttv_trace_hook_destroy(&h);
+// name_tables->trap_names = g_new(GQuark, nb);
+// for(i = 0 ; i < nb ; i++) {
+// name_tables->trap_names[i] = g_quark_from_string(
+// ltt_enum_string_get(t, i));
+// }
- /*
- name_tables->trap_names = g_new(GQuark, nb);
- for(i = 0 ; i < nb ; i++) {
- name_tables->trap_names[i] = g_quark_from_string(
- ltt_enum_string_get(t, i));
- }
- */
name_tables->nb_traps = 256;
name_tables->trap_names = g_new(GQuark, 256);
for(i = 0 ; i < 256 ; i++) {
if(!lttv_trace_find_hook(tcs->parent.t,
LTT_EVENT_IRQ_ENTRY,
LTT_FIELD_IRQ_ID, 0, 0,
- NULL, NULL, &h)) {
-
- th = lttv_trace_hook_get_first(&h);
+ NULL, NULL, &th)) {
- t = ltt_field_type(th->f1);
- //nb = ltt_type_element_number(t);
-
- lttv_trace_hook_destroy(&h);
+ lttv_trace_hook_destroy(&th);
/*
name_tables->irq_names = g_new(GQuark, nb);
{
LttvTraceset *traceset = self->parent.ts;
- guint i, j, k, l, nb_trace, nb_tracefile;
+ guint i, j, k, nb_trace, nb_tracefile;
LttvTraceState *ts;
LttvTraceHook *th;
- LttvTraceHook *hook;
-
LttvAttributeValue val;
gint ret;
LttvTracefileContext*, j));
for(k = 0 ; k < hooks->len ; k++) {
- hook = &g_array_index(hooks, LttvTraceHook, k);
- for(l=0;l<hook->fac_list->len;l++) {
- th = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
+ th = &g_array_index(hooks, LttvTraceHook, k);
lttv_hooks_add(
lttv_hooks_by_id_find(tfs->parent.event_by_id, th->id),
th->h,
th,
LTTV_PRIO_STATE);
- }
}
}
lttv_attribute_find(ts->parent.a, LTTV_STATE_HOOKS, LTTV_POINTER, &val);
{
LttvTraceset *traceset = self->parent.ts;
- guint i, j, k, l, nb_trace, nb_tracefile;
+ guint i, j, k, nb_trace, nb_tracefile;
LttvTraceState *ts;
GArray *hooks;
- LttvTraceHook *hook;
-
LttvTraceHook *th;
LttvAttributeValue val;
LttvTracefileContext*, j));
for(k = 0 ; k < hooks->len ; k++) {
- hook = &g_array_index(hooks, LttvTraceHook, k);
- for(l=0;l<hook->fac_list->len;l++) {
- th = g_array_index(hook->fac_list, LttvTraceHook*, l);
-
+ th = &g_array_index(hooks, LttvTraceHook, k);
lttv_hooks_remove_data(
lttv_hooks_by_id_find(tfs->parent.event_by_id, th->id),
th->h,
th);
- }
}
}
for(k = 0 ; k < hooks->len ; k++)