X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fbatchtest.c;h=08922fd738d8fb07a8327bbcc6ce54550edb8a8b;hb=d3e01c7a1f640d3b08fd896b29f4ad72e65033a9;hp=ec9472545cfb58be8b0d13804d17a5fa12023a11;hpb=b8eccacd05610aef895039dee41d1d2444a938db;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/batchtest.c b/ltt/branches/poly/lttv/lttv/batchtest.c index ec947254..08922fd7 100644 --- a/ltt/branches/poly/lttv/lttv/batchtest.c +++ b/ltt/branches/poly/lttv/lttv/batchtest.c @@ -253,7 +253,7 @@ static gboolean process_traceset(void *hook_data, void *call_data) LttTracefile *tracefile, *tf; - LttEvent *event; + LttEvent *event = ltt_event_new(); LttFacility *facility; @@ -300,7 +300,7 @@ static gboolean process_traceset(void *hook_data, void *call_data) ltt_tracefile_seek_time(tracefile, zero_time); previous_time = zero_time; nb_equal = 0; - while((event = ltt_tracefile_read(tracefile)) != NULL) { + while((ltt_tracefile_read(tracefile, event)) != NULL) { facility = ltt_event_facility(event); event_type = ltt_event_eventtype(event); time = ltt_event_time(event); @@ -539,6 +539,7 @@ static gboolean process_traceset(void *hook_data, void *call_data) g_free(a_event_position); lttv_context_fini(tc); g_object_unref(tscs); + ltt_event_destroy(event); if(lttv_profile_memory) { g_message("Memory summary at the end of batchtest"); @@ -673,7 +674,7 @@ static void init() //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/event_hook", + g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event", LTTV_POINTER, &value)); *(value.v_pointer) = event_hook; g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before", @@ -722,6 +723,7 @@ static void destroy() nb = lttv_traceset_number(traceset); for(i = 0 ; i < nb ; i++) { trace = lttv_traceset_get(traceset, i); + lttv_traceset_remove(traceset,i); ltt_trace_close(lttv_trace(trace)); lttv_trace_destroy(trace); }