+ LttvAttributeValue value;
+
+ LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+
+ g_info("Init batchAnalysis.c");
+
+ lttv_option_add("trace", 't',
+ "add a trace to the trace set to analyse",
+ "pathname of the directory containing the trace",
+ LTTV_OPT_STRING, &a_trace, lttv_trace_option, NULL);
+
+ a_stats = FALSE;
+ lttv_option_add("stats", 's',
+ "write the traceset and trace statistics",
+ "",
+ LTTV_OPT_NONE, &a_stats, NULL, NULL);
+
+
+ traceset = lttv_traceset_new();
+
+ before_traceset = lttv_hooks_new();
+ after_traceset = lttv_hooks_new();
+ before_trace = lttv_hooks_new();
+ after_trace = lttv_hooks_new();
+ before_tracefile = lttv_hooks_new();
+ after_tracefile = lttv_hooks_new();
+ before_event = lttv_hooks_new();
+ after_event = lttv_hooks_new();
+
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = before_traceset;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = after_traceset;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = before_trace;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = after_trace;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/before",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = before_tracefile;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/after",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = after_tracefile;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/before",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = before_event;
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/after",
+ LTTV_POINTER, &value));
+ *(value.v_pointer) = after_event;
+
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before",
+ LTTV_POINTER, &value));
+ g_assert((main_hooks = *(value.v_pointer)) != NULL);
+ lttv_hooks_add(main_hooks, process_traceset, NULL);