+LttvTraceset *lttv_traceset_copy(LttvTraceset *s_orig)
+{
+ int i;
+ LttvTraceset *s;
+
+ s = g_new(LttvTraceset, 1);
+ s->filename = NULL;
+ s->traces = g_ptr_array_new();
+ for(i=0;i<s_orig->traces->len;i++)
+ {
+ g_ptr_array_add(
+ s->traces,
+ ltt_trace_copy(g_ptr_array_index(s_orig->traces, i)));
+ }
+ s->attributes = g_ptr_array_new();
+ for(i=0;i<s_orig->attributes->len;i++)
+ {
+ g_ptr_array_add(
+ s->attributes,
+ lttv_iattribute_deep_copy(g_ptr_array_index(s_orig->attributes, i)));
+ }
+
+ s->a = LTTV_ATTRIBUTE(lttv_iattribute_deep_copy(LTTV_IATTRIBUTE(s_orig->a)));
+ return s;
+}