if(num+1 > old_len)
group = g_array_set_size(group, num+1);
g_array_index (group, LttTracefile, num) = tmp_tf;
-
+ g_array_index (group, LttTracefile, num).event.tracefile =
+ &g_array_index (group, LttTracefile, num);
}
}
int i, j;
g_printf("Event header (tracefile %s offset %llx):\n",
- g_quark_to_string(ev->tracefile->name),
+ g_quark_to_string(ev->tracefile->long_name),
((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
+ (long)start_pos - (long)ev->tracefile->buffer.head);
return;
g_printf("Event data (tracefile %s offset %llx):\n",
- g_quark_to_string(ev->tracefile->name),
+ g_quark_to_string(ev->tracefile->long_name),
((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
+ (long)ev->data - (long)ev->tracefile->buffer.head);
LttTracefile *ltt_tracefile_new()
{
- return g_new(LttTracefile, 1);
+ LttTracefile *tf;
+ tf = g_new(LttTracefile, 1);
+ tf->event.tracefile = tf;
+ return tf;
}
void ltt_tracefile_destroy(LttTracefile *tf)