*after_trace,
*before_tracefile,
*after_tracefile,
- *before_event,
- *after_event,
+ *event_hook,
*main_hooks;
static char *a_trace;
lttv_state_add_event_hooks(&tscs->parent);
if(a_stats) lttv_stats_add_event_hooks(tscs);
- lttv_traceset_context_add_hooks(tc,
- before_traceset, after_traceset, NULL, before_trace, after_trace,
- NULL, before_tracefile, after_tracefile, NULL, before_event, after_event);
+ //lttv_traceset_context_add_hooks(tc,
+ //before_traceset, after_traceset, NULL, before_trace, after_trace,
+ //NULL, before_tracefile, after_tracefile, NULL, before_event, after_event);
+ lttv_process_traceset_begin(tc,
+ before_traceset,
+ before_trace,
+ before_tracefile,
+ event_hook,
+ NULL);
start.tv_sec = 0;
start.tv_nsec = 0;
g_info("BatchAnalysis process traceset");
lttv_process_traceset_seek_time(tc, start);
- lttv_process_traceset(tc, end, G_MAXULONG);
+ lttv_process_traceset_middle(tc,
+ end,
+ G_MAXULONG,
+ NULL);
g_info("BatchAnalysis destroy context");
- lttv_traceset_context_remove_hooks(tc,
- before_traceset, after_traceset, NULL, before_trace, after_trace,
- NULL, before_tracefile, after_tracefile, NULL, before_event, after_event);
+ //lttv_traceset_context_remove_hooks(tc,
+ //before_traceset, after_traceset, NULL, before_trace, after_trace,
+ //NULL, before_tracefile, after_tracefile, NULL, before_event, after_event);
+ lttv_process_traceset_end(tc,
+ after_traceset,
+ after_trace,
+ after_tracefile,
+ event_hook,
+ NULL);
+
lttv_state_remove_event_hooks(&tscs->parent);
if(a_stats) lttv_stats_remove_event_hooks(tscs);
lttv_context_fini(tc);
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();
+ //before_event = lttv_hooks_new();
+ //after_event = lttv_hooks_new();
+ event_hook = lttv_hooks_new();
g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
LTTV_POINTER, &value));
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",
+ //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/event",
LTTV_POINTER, &value));
- *(value.v_pointer) = after_event;
+ *(value.v_pointer) = event_hook;
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);
+ lttv_hooks_add(main_hooks, process_traceset, NULL, LTTV_PRIO_DEFAULT);
}
lttv_hooks_destroy(after_trace);
lttv_hooks_destroy(before_tracefile);
lttv_hooks_destroy(after_tracefile);
- lttv_hooks_destroy(before_event);
- lttv_hooks_destroy(after_event);
+ //lttv_hooks_destroy(before_event);
+ //lttv_hooks_destroy(after_event);
+ lttv_hooks_destroy(event_hook);
lttv_hooks_remove_data(main_hooks, process_traceset, NULL);
nb = lttv_traceset_number(traceset);
*before_traceset,
*after_traceset,
*before_trace,
- *before_event;
+ *event_hook;
void print_field(LttEvent *e, LttField *f, GString *s, gboolean field_names) {
"",
LTTV_OPT_NONE, &a_process_stats, NULL, NULL);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/before",
+ g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event",
LTTV_POINTER, &value));
- g_assert((before_event = *(value.v_pointer)) != NULL);
- lttv_hooks_add(before_event, write_event_content, NULL);
+ g_assert((event_hook = *(value.v_pointer)) != NULL);
+ lttv_hooks_add(event_hook, write_event_content, NULL, LTTV_PRIO_DEFAULT);
g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
LTTV_POINTER, &value));
g_assert((before_trace = *(value.v_pointer)) != NULL);
- lttv_hooks_add(before_trace, write_trace_header, NULL);
+ lttv_hooks_add(before_trace, write_trace_header, NULL, LTTV_PRIO_DEFAULT);
g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
LTTV_POINTER, &value));
g_assert((before_traceset = *(value.v_pointer)) != NULL);
- lttv_hooks_add(before_traceset, write_traceset_header, NULL);
+ lttv_hooks_add(before_traceset, write_traceset_header, NULL,
+ LTTV_PRIO_DEFAULT);
g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
LTTV_POINTER, &value));
g_assert((after_traceset = *(value.v_pointer)) != NULL);
- lttv_hooks_add(after_traceset, write_traceset_footer, NULL);
+ lttv_hooks_add(after_traceset, write_traceset_footer, NULL,
+ LTTV_PRIO_DEFAULT);
}
g_string_free(a_string, TRUE);
- lttv_hooks_remove_data(before_event, write_event_content, NULL);
+ lttv_hooks_remove_data(event_hook, write_event_content, NULL);
lttv_hooks_remove_data(before_trace, write_trace_header, NULL);