X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftracefile.c;h=8edeb54cb44c692848b66848139c89f69c809118;hb=d25b4e2b09d3704b52522f8d75b34885b2a83c80;hp=d4a4706729086d77ef70bd87effdbaf18a00f14e;hpb=1a3b8cbdda58cf6f92a17751d5a4929c07515702;p=lttv.git diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index d4a47067..8edeb54c 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -40,34 +40,6 @@ int timecmp(LttTime * t1, LttTime * t2); int getIntNumber(int size1, void *evD); -/* Time operation macros for LttTime (struct timespec) */ -/* (T3 = T2 - T1) */ -#define TimeSub(T3, T2, T1) \ -do \ -{\ - (T3).tv_sec = (T2).tv_sec - (T1).tv_sec; \ - (T3).tv_nsec = (T2).tv_nsec - (T1).tv_nsec; \ - if((T3).tv_nsec < 0)\ - {\ - (T3).tv_sec--;\ - (T3).tv_nsec += 1000000000;\ - }\ -} while(0) - -/* (T3 = T2 + T1) */ -#define TimeAdd(T3, T2, T1) \ -do \ -{\ - (T3).tv_sec = (T2).tv_sec + (T1).tv_sec; \ - (T3).tv_nsec = (T2).tv_nsec + (T1).tv_nsec; \ - if((T3).tv_nsec >= 1000000000)\ - {\ - (T3).tv_sec += (T3).tv_nsec / 1000000000;\ - (T3).tv_nsec = (T3).tv_nsec % 1000000000;\ - }\ -} while(0) - - /***************************************************************************** *Function name @@ -521,23 +493,25 @@ void ltt_trace_close(LttTrace *t) tf = (LttTracefile*)g_ptr_array_index(t->control_tracefiles,i); ltt_tracefile_close(tf); } - g_ptr_array_free(t->control_tracefiles, FALSE); + g_ptr_array_free(t->control_tracefiles, TRUE); //free per_cpu_tracefiles for(i=0;iper_cpu_tracefile_number;i++){ tf = (LttTracefile*)g_ptr_array_index(t->per_cpu_tracefiles,i); ltt_tracefile_close(tf); } - g_ptr_array_free(t->per_cpu_tracefiles, FALSE); + g_ptr_array_free(t->per_cpu_tracefiles, TRUE); //free facilities for(i=0;ifacility_number;i++){ f = (LttFacility*)g_ptr_array_index(t->facilities,i); ltt_facility_close(f); } - g_ptr_array_free(t->facilities, FALSE); + g_ptr_array_free(t->facilities, TRUE); g_free(t); + + g_blow_chunks(); }