X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftracefile.c;h=f3ee2e20b8252c42cde495b4ae29250871ff5f6e;hb=4a6c8e36527c06c846bcd076c90b5935cf370477;hp=9f66cc8032639736813cb204a9435c6ccf958775;hpb=99ff36b168f59dc3865d984e218693f41a585c5b;p=lttv.git diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index 9f66cc80..f3ee2e20 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -130,6 +130,7 @@ void ltt_tracefile_open_cpu(LttTrace *t, char * tracefile_name) { LttTracefile * tf; tf = ltt_tracefile_open(t,tracefile_name); + if(!tf) return; t->per_cpu_tracefile_number++; g_ptr_array_add(t->per_cpu_tracefiles, tf); } @@ -150,7 +151,7 @@ void ltt_tracefile_open_control(LttTrace *t, char * control_name) g_ptr_array_add(t->control_tracefiles,tf); //parse facilities tracefile to get base_id - if(strcmp(control_name,"facilities") ==0){ + if(strcmp(&control_name[strlen(control_name)-10],"facilities") ==0){ while(1){ ev = ltt_tracefile_read(tf); if(!ev)return; // end of file @@ -477,15 +478,15 @@ LttTrace *ltt_trace_open(char *pathname) strcat(tmp,"system.xml"); getSystemInfo(sys_description, tmp); + //get facilities info + getFacilityInfo(t,eventdefs); + //get control tracefile info getControlFileInfo(t,control); //get cpu tracefile info getCpuFileInfo(t,cpu); - //get facilities info - getFacilityInfo(t,eventdefs); - return t; }