binary seek_time instead of searching sequencely
[lttv.git] / ltt / branches / poly / ltt / tracefile.c
1 #include <stdio.h>
2 #include <fcntl.h>
3 #include <sys/stat.h>
4 #include <sys/types.h>
5 #include <dirent.h>
6 #include <linux/errno.h>
7
8 #include "parser.h"
9 #include <ltt/trace.h>
10
11 #define DIR_NAME_SIZE 256
12
13 /* set the offset of the fields belonging to the event,
14 need the information of the archecture */
15 void setFieldsOffset(LttTracefile *tf,LttEventType *evT,void *evD,LttTrace *t);
16
17 /* get the size of the field type according to the archtecture's
18 size and endian type(info of the archecture) */
19 int getFieldtypeSize(LttTracefile * tf, LttEventType * evT, int offsetRoot,
20 int offsetParent, LttField *fld, void *evD, LttTrace* t);
21
22 /* read a fixed size or a block information from the file (fd) */
23 int readFile(int fd, void * buf, size_t size, char * mesg);
24 int readBlock(LttTracefile * tf, int whichBlock);
25
26 /* calculate cycles per nsec for current block */
27 void getCyclePerNsec(LttTracefile * t);
28
29 /* reinitialize the info of the block which is already in the buffer */
30 void updateTracefile(LttTracefile * tf);
31
32 /* go to the next event */
33 int skipEvent(LttTracefile * t);
34
35
36 /*****************************************************************************
37 *Function name
38 * ltt_tracefile_open : open a trace file, construct a LttTracefile
39 *Input params
40 * t : the trace containing the tracefile
41 * fileName : path name of the trace file
42 *Return value
43 * : a pointer to a tracefile
44 ****************************************************************************/
45
46 LttTracefile* ltt_tracefile_open(LttTrace * t, char * fileName)
47 {
48 LttTracefile * tf;
49 struct stat lTDFStat; /* Trace data file status */
50 BlockStart a_block_start;
51
52 tf = g_new(LttTracefile, 1);
53
54 //open the file
55 tf->name = g_strdup(fileName);
56 tf->trace = t;
57 tf->fd = open(fileName, O_RDONLY, 0);
58 if(tf->fd < 0){
59 g_error("Unable to open input data file %s\n", fileName);
60 }
61
62 // Get the file's status
63 if(fstat(tf->fd, &lTDFStat) < 0){
64 g_error("Unable to get the status of the input data file %s\n", fileName);
65 }
66
67 // Is the file large enough to contain a trace
68 if(lTDFStat.st_size < sizeof(BlockStart) + EVENT_HEADER_SIZE){
69 g_print("The input data file %s does not contain a trace\n", fileName);
70 g_free(tf->name);
71 close(tf->fd);
72 g_free(tf);
73 return NULL;
74 }
75
76 //store the size of the file
77 tf->file_size = lTDFStat.st_size;
78 tf->block_size = t->system_description->ltt_block_size;
79 tf->block_number = tf->file_size / tf->block_size;
80 tf->which_block = 0;
81
82 //allocate memory to contain the info of a block
83 tf->buffer = (void *) g_new(char, t->system_description->ltt_block_size);
84
85 //read the first block
86 if(readBlock(tf,1)) exit(1);
87
88 return tf;
89 }
90
91
92 /*****************************************************************************
93 *Open control and per cpu tracefiles
94 ****************************************************************************/
95
96 void ltt_tracefile_open_cpu(LttTrace *t, char * tracefile_name)
97 {
98 LttTracefile * tf;
99 tf = ltt_tracefile_open(t,tracefile_name);
100 if(!tf) return;
101 t->per_cpu_tracefile_number++;
102 g_ptr_array_add(t->per_cpu_tracefiles, tf);
103 }
104
105 void ltt_tracefile_open_control(LttTrace *t, char * control_name)
106 {
107 LttTracefile * tf;
108 LttEvent * ev;
109 LttFacility * f;
110 guint16 evId;
111 void * pos;
112 FacilityLoad fLoad;
113 int i;
114
115 tf = ltt_tracefile_open(t,control_name);
116 if(!tf) return;
117 t->control_tracefile_number++;
118 g_ptr_array_add(t->control_tracefiles,tf);
119
120 //parse facilities tracefile to get base_id
121 if(strcmp(&control_name[strlen(control_name)-10],"facilities") ==0){
122 while(1){
123 ev = ltt_tracefile_read(tf);
124 if(!ev)return; // end of file
125
126 if(ev->event_id == TRACE_FACILITY_LOAD){
127 pos = ev->data;
128 fLoad.name = (char*)pos;
129 fLoad.checksum = *(LttChecksum*)(pos + strlen(fLoad.name));
130 fLoad.base_code = *(guint32 *)(pos + strlen(fLoad.name) + sizeof(LttChecksum));
131
132 for(i=0;i<t->facility_number;i++){
133 f = (LttFacility*)g_ptr_array_index(t->facilities,i);
134 if(strcmp(f->name,fLoad.name)==0 && fLoad.checksum==f->checksum){
135 f->base_id = fLoad.base_code;
136 break;
137 }
138 }
139 if(i==t->facility_number)
140 g_error("Facility: %s, checksum: %d is not founded\n",
141 fLoad.name,fLoad.checksum);
142 }else if(ev->event_id == TRACE_BLOCK_START){
143 continue;
144 }else if(ev->event_id == TRACE_BLOCK_END){
145 break;
146 }else g_error("Not valid facilities trace file\n");
147 }
148 }
149 }
150
151 /*****************************************************************************
152 *Function name
153 * ltt_tracefile_close: close a trace file,
154 *Input params
155 * t : tracefile which will be closed
156 ****************************************************************************/
157
158 void ltt_tracefile_close(LttTracefile *t)
159 {
160 g_free(t->name);
161 g_free(t->buffer);
162 close(t->fd);
163 g_free(t);
164 }
165
166
167 /*****************************************************************************
168 *Get system information
169 ****************************************************************************/
170 void getSystemInfo(LttSystemDescription* des, char * pathname)
171 {
172 FILE * fp;
173 int i;
174 int entry_number = 15;
175 char buf[DIR_NAME_SIZE];
176 char description[4*DIR_NAME_SIZE];
177 char * ptr;
178
179 fp = fopen(pathname,"r");
180 if(!fp){
181 g_error("Can not open file : %s\n", pathname);
182 }
183
184 while(fgets(buf,DIR_NAME_SIZE, fp)!= NULL){
185 ptr = buf;
186 while(isspace(*ptr)) ptr++;
187 if(strlen(ptr) == 0) continue;
188 break;
189 }
190
191 if(strlen(ptr) == 0) g_error("Not a valid file: %s\n", pathname);
192 if(strncmp("<system",ptr,7) !=0)g_error("Not a valid file: %s\n", pathname);
193
194 for(i=0;i<entry_number;i++){
195 if(fgets(buf,DIR_NAME_SIZE, fp)== NULL)
196 g_error("Not a valid file: %s\n", pathname);
197 buf[strlen(buf)-1] = '\0';
198 ptr = buf;
199 while(isspace(*ptr)) ptr++;
200 switch(i){
201 case 0:
202 if(strncmp("node_name=",ptr,10)!=0)
203 g_error("Not a valid file: %s\n", pathname);
204 des->node_name = g_strdup(ptr+10);
205 break;
206 case 1:
207 if(strncmp("domainname=",ptr,11)!=0)
208 g_error("Not a valid file: %s\n", pathname);
209 des->domain_name = g_strdup(ptr+11);
210 break;
211 case 2:
212 if(strncmp("cpu=",ptr,4)!=0)
213 g_error("Not a valid file: %s\n", pathname);
214 des->nb_cpu = (unsigned)atoi(ptr+4);
215 break;
216 case 3:
217 if(strncmp("arch_size=",ptr,10)!=0)
218 g_error("Not a valid file: %s\n", pathname);
219 if(strcmp(ptr+10,"\"LP32\"") == 0) des->size = LTT_LP32;
220 else if(strcmp(ptr+10,"\"ILP32\"") == 0) des->size = LTT_ILP32;
221 else if(strcmp(ptr+10,"\"LP64\"") == 0) des->size = LTT_LP64;
222 else if(strcmp(ptr+10,"\"ILP64\"") == 0) des->size = LTT_ILP64;
223 else if(strcmp(ptr+10,"\"UNKNOWN\"") == 0) des->size = LTT_UNKNOWN;
224 break;
225 case 4:
226 if(strncmp("endian=",ptr,7)!=0)
227 g_error("Not a valid file: %s\n", pathname);
228 if(strcmp(ptr+7,"\"LITTLE_ENDIAN\"") == 0)
229 des->endian = LTT_LITTLE_ENDIAN;
230 else if(strcmp(ptr+7,"\"BIG_ENDIAN\"") == 0)
231 des->endian = LTT_BIG_ENDIAN;
232 break;
233 case 5:
234 if(strncmp("kernel_name=",ptr,12)!=0)
235 g_error("Not a valid file: %s\n", pathname);
236 des->kernel_name = g_strdup(ptr+12);
237 break;
238 case 6:
239 if(strncmp("kernel_release=",ptr,15)!=0)
240 g_error("Not a valid file: %s\n", pathname);
241 des->kernel_release = g_strdup(ptr+15);
242 break;
243 case 7:
244 if(strncmp("kernel_version=",ptr,15)!=0)
245 g_error("Not a valid file: %s\n", pathname);
246 des->kernel_version = g_strdup(ptr+15);
247 break;
248 case 8:
249 if(strncmp("machine=",ptr,8)!=0)
250 g_error("Not a valid file: %s\n", pathname);
251 des->machine = g_strdup(ptr+8);
252 break;
253 case 9:
254 if(strncmp("processor=",ptr,10)!=0)
255 g_error("Not a valid file: %s\n", pathname);
256 des->processor = g_strdup(ptr+10);
257 break;
258 case 10:
259 if(strncmp("hardware_platform=",ptr,18)!=0)
260 g_error("Not a valid file: %s\n", pathname);
261 des->hardware_platform = g_strdup(ptr+18);
262 break;
263 case 11:
264 if(strncmp("operating_system=",ptr,17)!=0)
265 g_error("Not a valid file: %s\n", pathname);
266 des->operating_system = g_strdup(ptr+17);
267 break;
268 case 12:
269 if(strncmp("ltt_major_version=",ptr,18)!=0)
270 g_error("Not a valid file: %s\n", pathname);
271 ptr += 18;
272 // ptr++;//skip begining "
273 // ptr[strlen(ptr)-1] = '\0'; //get rid of the ending "
274 des->ltt_major_version = (unsigned)atoi(ptr);
275 break;
276 case 13:
277 if(strncmp("ltt_minor_version=",ptr,18)!=0)
278 g_error("Not a valid file: %s\n", pathname);
279 ptr += 18;
280 // ptr++;//skip begining "
281 // ptr[strlen(ptr)-1] = '\0'; //get rid of the ending "
282 des->ltt_minor_version = (unsigned)atoi(ptr);
283 break;
284 case 14:
285 if(strncmp("ltt_block_size=",ptr,15)!=0)
286 g_error("Not a valid file: %s\n", pathname);
287 ptr += 15;
288 // ptr++;//skip begining "
289 // ptr[strlen(ptr)-1] = '\0'; //get rid of the ending "
290 des->ltt_block_size = (unsigned)atoi(ptr);
291 break;
292 default:
293 g_error("Not a valid file: %s\n", pathname);
294 }
295 }
296
297 //get description
298 description[0] = '\0';
299 if(fgets(buf,DIR_NAME_SIZE, fp)== NULL)
300 g_error("Not a valid file: %s\n", pathname);
301 ptr = buf;
302 while(isspace(*ptr)) ptr++;
303 if(*ptr != '>') g_error("Not a valid file: %s\n", pathname);
304 while((ptr=fgets(buf,DIR_NAME_SIZE, fp))!= NULL){
305 ptr = buf;
306 while(isspace(*ptr)) ptr++;
307 if(strncmp("</system>",ptr,9) == 0 )break;
308 strcat(description, buf);
309 }
310 if(!ptr)g_error("Not a valid file: %s\n", pathname);
311 if(description[0] = '\0')des->description = NULL;
312 des->description = g_strdup(description);
313
314 fclose(fp);
315 }
316
317 /*****************************************************************************
318 *The following functions get facility/tracefile information
319 ****************************************************************************/
320
321 void getFacilityInfo(LttTrace *t, char* eventdefs)
322 {
323 DIR * dir;
324 struct dirent *entry;
325 char * ptr;
326 int i,j;
327 LttFacility * f;
328 LttEventType * et;
329 char name[DIR_NAME_SIZE];
330
331 dir = opendir(eventdefs);
332 if(!dir) g_error("Can not open directory: %s\n", eventdefs);
333
334 while((entry = readdir(dir)) != NULL){
335 ptr = &entry->d_name[strlen(entry->d_name)-4];
336 if(strcmp(ptr,".xml") != 0) continue;
337 strcpy(name,eventdefs);
338 strcat(name,entry->d_name);
339 ltt_facility_open(t,name);
340 }
341 closedir(dir);
342
343 for(j=0;j<t->facility_number;j++){
344 f = (LttFacility*)g_ptr_array_index(t->facilities, j);
345 for(i=0; i<f->event_number; i++){
346 et = f->events[i];
347 setFieldsOffset(NULL, et, NULL, t);
348 }
349 }
350 }
351
352 void getControlFileInfo(LttTrace *t, char* control)
353 {
354 DIR * dir;
355 struct dirent *entry;
356 char name[DIR_NAME_SIZE];
357
358 dir = opendir(control);
359 if(!dir) g_error("Can not open directory: %s\n", control);
360
361 while((entry = readdir(dir)) != NULL){
362 if(strcmp(entry->d_name,"facilities") != 0 &&
363 strcmp(entry->d_name,"interrupts") != 0 &&
364 strcmp(entry->d_name,"processes") != 0) continue;
365
366 strcpy(name,control);
367 strcat(name,entry->d_name);
368 ltt_tracefile_open_control(t,name);
369 }
370 closedir(dir);
371 }
372
373 void getCpuFileInfo(LttTrace *t, char* cpu)
374 {
375 DIR * dir;
376 struct dirent *entry;
377 char name[DIR_NAME_SIZE];
378
379 dir = opendir(cpu);
380 if(!dir) g_error("Can not open directory: %s\n", cpu);
381
382 while((entry = readdir(dir)) != NULL){
383 if(strcmp(entry->d_name,".") != 0 &&
384 strcmp(entry->d_name,"..") != 0 ){
385 strcpy(name,cpu);
386 strcat(name,entry->d_name);
387 ltt_tracefile_open_cpu(t,name);
388 }else continue;
389 }
390 closedir(dir);
391 }
392
393 /*****************************************************************************
394 *A trace is specified as a pathname to the directory containing all the
395 *associated data (control tracefiles, per cpu tracefiles, event
396 *descriptions...).
397 *
398 *When a trace is closed, all the associated facilities, types and fields
399 *are released as well.
400 ****************************************************************************/
401
402 LttTrace *ltt_trace_open(const char *pathname)
403 {
404 LttTrace * t;
405 LttSystemDescription * sys_description;
406 char eventdefs[DIR_NAME_SIZE];
407 char info[DIR_NAME_SIZE];
408 char control[DIR_NAME_SIZE];
409 char cpu[DIR_NAME_SIZE];
410 char tmp[DIR_NAME_SIZE];
411 gboolean has_slash = FALSE;
412
413 //establish the pathname to different directories
414 if(pathname[strlen(pathname)-1] == '/')has_slash = TRUE;
415 strcpy(eventdefs,pathname);
416 if(!has_slash)strcat(eventdefs,"/");
417 strcat(eventdefs,"eventdefs/");
418
419 strcpy(info,pathname);
420 if(!has_slash)strcat(info,"/");
421 strcat(info,"info/");
422
423 strcpy(control,pathname);
424 if(!has_slash)strcat(control,"/");
425 strcat(control,"control/");
426
427 strcpy(cpu,pathname);
428 if(!has_slash)strcat(cpu,"/");
429 strcat(cpu,"cpu/");
430
431 //new trace
432 t = g_new(LttTrace, 1);
433 sys_description = g_new(LttSystemDescription, 1);
434 t->pathname = g_strdup(pathname);
435 t->facility_number = 0;
436 t->control_tracefile_number = 0;
437 t->per_cpu_tracefile_number = 0;
438 t->system_description = sys_description;
439 t->control_tracefiles = g_ptr_array_new();
440 t->per_cpu_tracefiles = g_ptr_array_new();
441 t->facilities = g_ptr_array_new();
442 getDataEndianType(&(t->my_arch_size), &(t->my_arch_endian));
443
444 //get system description
445 strcpy(tmp,info);
446 strcat(tmp,"system.xml");
447 getSystemInfo(sys_description, tmp);
448
449 //get facilities info
450 getFacilityInfo(t,eventdefs);
451
452 //get control tracefile info
453 getControlFileInfo(t,control);
454
455 //get cpu tracefile info
456 getCpuFileInfo(t,cpu);
457
458 return t;
459 }
460
461 /******************************************************************************
462 * When we copy a trace, we want all the opening actions to happen again :
463 * the trace will be reopened and totally independant from the original.
464 * That's why we call ltt_trace_open.
465 *****************************************************************************/
466 LttTrace *ltt_trace_copy(LttTrace *self)
467 {
468 return ltt_trace_open(self->pathname);
469 }
470
471 void ltt_trace_close(LttTrace *t)
472 {
473 int i;
474 LttTracefile * tf;
475 LttFacility * f;
476
477 g_free(t->pathname);
478
479 //free system_description
480 g_free(t->system_description->description);
481 g_free(t->system_description->node_name);
482 g_free(t->system_description->domain_name);
483 g_free(t->system_description->kernel_name);
484 g_free(t->system_description->kernel_release);
485 g_free(t->system_description->kernel_version);
486 g_free(t->system_description->machine);
487 g_free(t->system_description->processor);
488 g_free(t->system_description->hardware_platform);
489 g_free(t->system_description->operating_system);
490 g_free(t->system_description);
491
492 //free control_tracefiles
493 for(i=0;i<t->control_tracefile_number;i++){
494 tf = (LttTracefile*)g_ptr_array_index(t->control_tracefiles,i);
495 ltt_tracefile_close(tf);
496 }
497 g_ptr_array_free(t->control_tracefiles, TRUE);
498
499 //free per_cpu_tracefiles
500 for(i=0;i<t->per_cpu_tracefile_number;i++){
501 tf = (LttTracefile*)g_ptr_array_index(t->per_cpu_tracefiles,i);
502 ltt_tracefile_close(tf);
503 }
504 g_ptr_array_free(t->per_cpu_tracefiles, TRUE);
505
506 //free facilities
507 for(i=0;i<t->facility_number;i++){
508 f = (LttFacility*)g_ptr_array_index(t->facilities,i);
509 ltt_facility_close(f);
510 }
511 g_ptr_array_free(t->facilities, TRUE);
512
513 g_free(t);
514
515 g_blow_chunks();
516 }
517
518
519 /*****************************************************************************
520 *Get the system description of the trace
521 ****************************************************************************/
522
523 LttSystemDescription *ltt_trace_system_description(LttTrace *t)
524 {
525 return t->system_description;
526 }
527
528 /*****************************************************************************
529 * The following functions discover the facilities of the trace
530 ****************************************************************************/
531
532 unsigned ltt_trace_facility_number(LttTrace *t)
533 {
534 return (unsigned)(t->facility_number);
535 }
536
537 LttFacility *ltt_trace_facility_get(LttTrace *t, unsigned i)
538 {
539 return (LttFacility*)g_ptr_array_index(t->facilities, i);
540 }
541
542 /*****************************************************************************
543 *Function name
544 * ltt_trace_facility_find : find facilities in the trace
545 *Input params
546 * t : the trace
547 * name : facility name
548 *Output params
549 * position : position of the facility in the trace
550 *Return value
551 * : the number of facilities
552 ****************************************************************************/
553
554 unsigned ltt_trace_facility_find(LttTrace *t, char *name, unsigned *position)
555 {
556 int i, count=0;
557 LttFacility * f;
558 for(i=0;i<t->facility_number;i++){
559 f = (LttFacility*)g_ptr_array_index(t->facilities, i);
560 if(strcmp(f->name,name)==0){
561 count++;
562 if(count==1) *position = i;
563 }else{
564 if(count) break;
565 }
566 }
567 return count;
568 }
569
570 /*****************************************************************************
571 * Functions to discover all the event types in the trace
572 ****************************************************************************/
573
574 unsigned ltt_trace_eventtype_number(LttTrace *t)
575 {
576 int i;
577 unsigned count = 0;
578 LttFacility * f;
579 for(i=0;i<t->facility_number;i++){
580 f = (LttFacility*)g_ptr_array_index(t->facilities, i);
581 count += f->event_number;
582 }
583 return count;
584 }
585
586 LttFacility * ltt_trace_facility_by_id(LttTrace * trace, unsigned id)
587 {
588 LttFacility * facility;
589 int i;
590 for(i=0;i<trace->facility_number;i++){
591 facility = (LttFacility*) g_ptr_array_index(trace->facilities,i);
592 if(id >= facility->base_id &&
593 id < facility->base_id + facility->event_number)
594 break;
595 }
596 if(i==trace->facility_number) return NULL;
597 else return facility;
598 }
599
600 LttEventType *ltt_trace_eventtype_get(LttTrace *t, unsigned evId)
601 {
602 LttFacility * f;
603 f = ltt_trace_facility_by_id(t,evId);
604 if(!f) return NULL;
605 return f->events[evId - f->base_id];
606 }
607
608 /*****************************************************************************
609 *There is one "per cpu" tracefile for each CPU, numbered from 0 to
610 *the maximum number of CPU in the system. When the number of CPU installed
611 *is less than the maximum, some positions are unused. There are also a
612 *number of "control" tracefiles (facilities, interrupts...).
613 ****************************************************************************/
614 unsigned ltt_trace_control_tracefile_number(LttTrace *t)
615 {
616 return t->control_tracefile_number;
617 }
618
619 unsigned ltt_trace_per_cpu_tracefile_number(LttTrace *t)
620 {
621 return t->per_cpu_tracefile_number;
622 }
623
624 /*****************************************************************************
625 *It is possible to search for the tracefiles by name or by CPU position.
626 *The index within the tracefiles of the same type is returned if found
627 *and a negative value otherwise.
628 ****************************************************************************/
629
630 int ltt_trace_control_tracefile_find(LttTrace *t, char *name)
631 {
632 LttTracefile * tracefile;
633 int i;
634 for(i=0;i<t->control_tracefile_number;i++){
635 tracefile = (LttTracefile*)g_ptr_array_index(t->control_tracefiles, i);
636 if(strcmp(tracefile->name, name)==0)break;
637 }
638 if(i == t->control_tracefile_number) return -1;
639 return i;
640 }
641
642 int ltt_trace_per_cpu_tracefile_find(LttTrace *t, unsigned i)
643 {
644 LttTracefile * tracefile;
645 int j, name;
646 for(j=0;j<t->per_cpu_tracefile_number;j++){
647 tracefile = (LttTracefile*)g_ptr_array_index(t->per_cpu_tracefiles, j);
648 name = atoi(tracefile->name);
649 if(name == (int)i)break;
650 }
651 if(j == t->per_cpu_tracefile_number) return -1;
652 return j;
653 }
654
655 /*****************************************************************************
656 *Get a specific tracefile
657 ****************************************************************************/
658
659 LttTracefile *ltt_trace_control_tracefile_get(LttTrace *t, unsigned i)
660 {
661 return (LttTracefile*)g_ptr_array_index(t->control_tracefiles, i);
662 }
663
664 LttTracefile *ltt_trace_per_cpu_tracefile_get(LttTrace *t, unsigned i)
665 {
666 return (LttTracefile*)g_ptr_array_index(t->per_cpu_tracefiles, i);
667 }
668
669 /*****************************************************************************
670 * Get the start time and end time of the trace
671 ****************************************************************************/
672
673 void ltt_trace_time_span_get(LttTrace *t, LttTime *start, LttTime *end)
674 {
675 LttTime startSmall, startTmp, endBig, endTmp;
676 int i, j=0;
677 LttTracefile * tf;
678
679 for(i=0;i<t->control_tracefile_number;i++){
680 tf = g_ptr_array_index(t->control_tracefiles, i);
681 readBlock(tf,1);
682 startTmp = tf->a_block_start->time;
683 readBlock(tf,tf->block_number);
684 endTmp = tf->a_block_end->time;
685 if(i==0){
686 startSmall = startTmp;
687 endBig = endTmp;
688 j = 1;
689 continue;
690 }
691 if(ltt_time_compare(startSmall,startTmp) > 0) startSmall = startTmp;
692 if(ltt_time_compare(endBig,endTmp) < 0) endBig = endTmp;
693 }
694
695 for(i=0;i<t->per_cpu_tracefile_number;i++){
696 tf = g_ptr_array_index(t->per_cpu_tracefiles, i);
697 readBlock(tf,1);
698 startTmp = tf->a_block_start->time;
699 readBlock(tf,tf->block_number);
700 endTmp = tf->a_block_end->time;
701 if(j == 0 && i==0){
702 startSmall = startTmp;
703 endBig = endTmp;
704 continue;
705 }
706 if(ltt_time_compare(startSmall,startTmp) > 0) startSmall = startTmp;
707 if(ltt_time_compare(endBig,endTmp) < 0) endBig = endTmp;
708 }
709
710 *start = startSmall;
711 *end = endBig;
712 }
713
714
715 /*****************************************************************************
716 *Get the name of a tracefile
717 ****************************************************************************/
718
719 char *ltt_tracefile_name(LttTracefile *tf)
720 {
721 return tf->name;
722 }
723
724 /*****************************************************************************
725 * Get the number of blocks in the tracefile
726 ****************************************************************************/
727
728 unsigned ltt_tracefile_block_number(LttTracefile *tf)
729 {
730 return tf->block_number;
731 }
732
733 /*****************************************************************************
734 *Function name
735 * ltt_tracefile_seek_time: seek to the first event of the trace with time
736 * larger or equal to time
737 *Input params
738 * t : tracefile
739 * time : criteria of the time
740 ****************************************************************************/
741 void ltt_tracefile_find_time_block(LttTracefile *t, LttTime time,
742 int start_block, int end_block)
743 {
744 int err, tmp_block, s, e;
745 int headTime;
746 int tailTime;
747
748 err=readBlock(t,start_block);
749 if(err) g_error("Can not read tracefile: %s\n", t->name);
750 if(start_block == end_block)return;
751
752 tailTime = ltt_time_compare(t->a_block_end->time, time);
753 if(tailTime >= 0) return;
754
755 err=readBlock(t,end_block);
756 if(err) g_error("Can not read tracefile: %s\n", t->name);
757 if(start_block+1 == end_block)return;
758
759 headTime = ltt_time_compare(t->a_block_start->time, time);
760 if(headTime <= 0 ) return;
761
762 tmp_block = (end_block + start_block)/2;
763 err=readBlock(t,tmp_block);
764 if(err) g_error("Can not read tracefile: %s\n", t->name);
765
766 headTime = ltt_time_compare(t->a_block_start->time, time);
767 tailTime = ltt_time_compare(t->a_block_end->time, time);
768 if(headTime <= 0 && tailTime >= 0) return;
769
770 if(headTime > 0){
771 s = start_block + 1;
772 e = tmp_block - 1;
773 if(s <= e)
774 ltt_tracefile_find_time_block(t, time, s, e);
775 else return;
776 }
777
778 if(tailTime < 0){
779 s = tmp_block + 1;
780 e = end_block - 1;
781 if(s <= e)
782 ltt_tracefile_find_time_block(t, time, s, e);
783 else return;
784 }
785 }
786
787 void ltt_tracefile_backward_find_time_block(LttTracefile *t, LttTime time)
788 {
789 int t_time, h_time, err;
790 err=readBlock(t,t->which_block-1);
791 if(err) g_error("Can not read tracefile: %s\n", t->name);
792 h_time = ltt_time_compare(t->a_block_start->time, time);
793 t_time = ltt_time_compare(t->a_block_end->time, time);
794 if(h_time == 0){
795 int tmp;
796 if(t->which_block == 1) return;
797 err=readBlock(t,t->which_block-1);
798 if(err) g_error("Can not read tracefile: %s\n", t->name);
799 tmp = ltt_time_compare(t->a_block_end->time, time);
800 if(tmp == 0) return ltt_tracefile_seek_time(t, time);
801 err=readBlock(t,t->which_block+1);
802 if(err) g_error("Can not read tracefile: %s\n", t->name);
803 }else if(h_time > 0){
804 ltt_tracefile_find_time_block(t, time, 1, t->which_block);
805 return ltt_tracefile_seek_time(t, time) ;
806 }else{
807 if(t_time >= 0) return ltt_tracefile_seek_time(t, time);
808 err=readBlock(t,t->which_block+1);
809 if(err) g_error("Can not read tracefile: %s\n", t->name);
810 }
811 }
812
813 void ltt_tracefile_seek_time(LttTracefile *t, LttTime time)
814 {
815 int err;
816 LttTime lttTime;
817 int headTime = ltt_time_compare(t->a_block_start->time, time);
818 int tailTime = ltt_time_compare(t->a_block_end->time, time);
819 LttEvent * ev;
820
821 if(headTime < 0 && tailTime > 0){
822 if(ltt_time_compare(t->a_block_end->time, t->current_event_time) !=0) {
823 lttTime = getEventTime(t);
824 err = ltt_time_compare(lttTime, time);
825 if(err > 0){
826 if(t->which_event==2 || (&t->prev_event_time,&time)<0){
827 return;
828 }else{
829 updateTracefile(t);
830 return ltt_tracefile_seek_time(t, time);
831 }
832 }else if(err < 0){
833 while(1){
834 ev = ltt_tracefile_read(t);
835 if(ev == NULL){
836 g_print("End of file\n");
837 return;
838 }
839 lttTime = getEventTime(t);
840 err = ltt_time_compare(lttTime, time);
841 if(err >= 0)return;
842 }
843 }else return;
844 }else{//we are at the end of the block
845 updateTracefile(t);
846 return ltt_tracefile_seek_time(t, time);
847 }
848 }else if(headTime >= 0){
849 if(t->which_block == 1){
850 updateTracefile(t);
851 }else{
852 if(ltt_time_compare(t->prev_block_end_time, time) >= 0 ||
853 (t->prev_block_end_time.tv_sec == 0 &&
854 t->prev_block_end_time.tv_nsec == 0 )){
855 ltt_tracefile_backward_find_time_block(t, time);
856 }else{
857 updateTracefile(t);
858 }
859 }
860 }else if(tailTime < 0){
861 if(t->which_block != t->block_number){
862 ltt_tracefile_find_time_block(t, time, t->which_block+1, t->block_number);
863 return ltt_tracefile_seek_time(t, time);
864 }else {
865 g_print("End of file\n");
866 return;
867 }
868 }else if(tailTime == 0){
869 t->cur_event_pos = t->last_event_pos;
870 t->current_event_time = time;
871 t->cur_heart_beat_number = 0;
872 t->prev_event_time.tv_sec = 0;
873 t->prev_event_time.tv_nsec = 0;
874 return;
875 }
876 }
877
878 /*****************************************************************************
879 * Seek to the first event with position equal or larger to ep
880 ****************************************************************************/
881
882 void ltt_tracefile_seek_position(LttTracefile *t, LttEventPosition *ep)
883 {
884 //if we are at the right place, just return
885 if(t->which_block == ep->block_num && t->which_event == ep->event_num)
886 return;
887
888 if(t->which_block == ep->block_num) updateTracefile(t);
889 else readBlock(t,ep->block_num);
890
891 //event offset is availiable
892 if(ep->old_position){
893 t->cur_heart_beat_number = ep->heart_beat_number;
894 t->cur_event_pos = t->buffer + ep->event_offset;
895 return;
896 }
897
898 //only block number and event index are availiable
899 while(t->which_event < ep->event_num) ltt_tracefile_read(t);
900
901 return;
902 }
903
904 /*****************************************************************************
905 *Function name
906 * ltt_tracefile_read : read the current event, set the pointer to the next
907 *Input params
908 * t : tracefile
909 *Return value
910 * LttEvent * : an event to be processed
911 ****************************************************************************/
912
913 LttEvent *ltt_tracefile_read(LttTracefile *t)
914 {
915 LttEvent * lttEvent = &t->an_event;
916 int err;
917
918 if(t->cur_event_pos == t->buffer + t->block_size){
919 if(t->which_block == t->block_number){
920 return NULL;
921 }
922 err = readBlock(t, t->which_block + 1);
923 if(err)g_error("Can not read tracefile");
924 }
925
926 lttEvent->event_id = (int)(*(guint16 *)(t->cur_event_pos));
927 if(lttEvent->event_id == TRACE_TIME_HEARTBEAT)
928 t->cur_heart_beat_number++;
929
930 t->prev_event_time = t->current_event_time;
931 // t->current_event_time = getEventTime(t);
932
933 lttEvent->time_delta = *(guint32 *)(t->cur_event_pos + EVENT_ID_SIZE);
934 lttEvent->event_time = t->current_event_time;
935
936 lttEvent->tracefile = t;
937 lttEvent->data = t->cur_event_pos + EVENT_HEADER_SIZE;
938 lttEvent->which_block = t->which_block;
939 lttEvent->which_event = t->which_event;
940
941 //update the fields of the current event and go to the next event
942 err = skipEvent(t);
943 if(err == ERANGE) g_error("event id is out of range\n");
944
945 lttEvent->event_cycle_count = t->cur_cycle_count;
946
947 return lttEvent;
948 }
949
950 /****************************************************************************
951 *Function name
952 * readFile : wrap function to read from a file
953 *Input Params
954 * fd : file descriptor
955 * buf : buf to contain the content
956 * size : number of bytes to be read
957 * mesg : message to be printed if some thing goes wrong
958 *return value
959 * 0 : success
960 * EIO : can not read from the file
961 ****************************************************************************/
962
963 int readFile(int fd, void * buf, size_t size, char * mesg)
964 {
965 ssize_t nbBytes;
966 nbBytes = read(fd, buf, size);
967 if(nbBytes != size){
968 printf("%s\n",mesg);
969 return EIO;
970 }
971 return 0;
972 }
973
974 /****************************************************************************
975 *Function name
976 * readBlock : read a block from the file
977 *Input Params
978 * lttdes : ltt trace file
979 * whichBlock : the block which will be read
980 *return value
981 * 0 : success
982 * EINVAL : lseek fail
983 * EIO : can not read from the file
984 ****************************************************************************/
985
986 int readBlock(LttTracefile * tf, int whichBlock)
987 {
988 off_t nbBytes;
989 guint32 lostSize;
990
991 if(whichBlock - tf->which_block == 1 && tf->which_block != 0){
992 tf->prev_block_end_time = tf->a_block_end->time;
993 tf->prev_event_time = tf->a_block_end->time;
994 }else{
995 tf->prev_block_end_time.tv_sec = 0;
996 tf->prev_block_end_time.tv_nsec = 0;
997 tf->prev_event_time.tv_sec = 0;
998 tf->prev_event_time.tv_nsec = 0;
999 }
1000
1001 nbBytes=lseek(tf->fd,(off_t)((whichBlock-1)*tf->block_size), SEEK_SET);
1002 if(nbBytes == -1) return EINVAL;
1003
1004 if(readFile(tf->fd,tf->buffer,tf->block_size,"Unable to read a block"))
1005 return EIO;
1006
1007 tf->a_block_start=(BlockStart *) (tf->buffer + EVENT_HEADER_SIZE);
1008 lostSize = *(guint32 *)(tf->buffer + tf->block_size - sizeof(guint32));
1009 tf->a_block_end=(BlockEnd *)(tf->buffer + tf->block_size -
1010 lostSize + EVENT_HEADER_SIZE);
1011 tf->last_event_pos = tf->buffer + tf->block_size - lostSize;
1012
1013 tf->which_block = whichBlock;
1014 tf->which_event = 1;
1015 tf->cur_event_pos = tf->buffer;//the beginning of the block, block start ev
1016 tf->cur_heart_beat_number = 0;
1017
1018 getCyclePerNsec(tf);
1019
1020 tf->current_event_time = getEventTime(tf);
1021
1022 return 0;
1023 }
1024
1025 /*****************************************************************************
1026 *Function name
1027 * updateTracefile : reinitialize the info of the block which is already
1028 * in the buffer
1029 *Input params
1030 * tf : tracefile
1031 ****************************************************************************/
1032
1033 void updateTracefile(LttTracefile * tf)
1034 {
1035 tf->which_event = 1;
1036 tf->cur_event_pos = tf->buffer;
1037 tf->current_event_time = getEventTime(tf);
1038 tf->cur_heart_beat_number = 0;
1039
1040 tf->prev_event_time.tv_sec = 0;
1041 tf->prev_event_time.tv_nsec = 0;
1042 }
1043
1044 /*****************************************************************************
1045 *Function name
1046 * skipEvent : go to the next event, update the fields of the current event
1047 *Input params
1048 * t : tracefile
1049 *return value
1050 * 0 : success
1051 * ERANGE : event id is out of range
1052 ****************************************************************************/
1053
1054 int skipEvent(LttTracefile * t)
1055 {
1056 int evId, err;
1057 void * evData;
1058 LttEventType * evT;
1059 LttField * rootFld;
1060
1061 evId = (int)(*(guint16 *)(t->cur_event_pos));
1062 evData = t->cur_event_pos + EVENT_HEADER_SIZE;
1063
1064 evT = ltt_trace_eventtype_get(t->trace,(unsigned)evId);
1065
1066 if(evT) rootFld = evT->root_field;
1067 else return ERANGE;
1068
1069 if(rootFld){
1070 //event has string/sequence or the last event is not the same event
1071 if((evT->latest_block!=t->which_block || evT->latest_event!=t->which_event)
1072 && rootFld->field_fixed == 0){
1073 setFieldsOffset(t, evT, evData, t->trace);
1074 }
1075 t->cur_event_pos += EVENT_HEADER_SIZE + rootFld->field_size;
1076 }else t->cur_event_pos += EVENT_HEADER_SIZE;
1077
1078 evT->latest_block = t->which_block;
1079 evT->latest_event = t->which_event;
1080
1081 //the next event is in the next block
1082 if(evId == TRACE_BLOCK_END){
1083 t->cur_event_pos = t->buffer + t->block_size;
1084 }else{
1085 t->which_event++;
1086 t->current_event_time = getEventTime(t);
1087 }
1088
1089 return 0;
1090 }
1091
1092 /*****************************************************************************
1093 *Function name
1094 * getCyclePerNsec : calculate cycles per nsec for current block
1095 *Input Params
1096 * t : tracefile
1097 ****************************************************************************/
1098
1099 void getCyclePerNsec(LttTracefile * t)
1100 {
1101 LttTime lBufTotalTime; /* Total time for this buffer */
1102 LttCycleCount lBufTotalNSec; /* Total time for this buffer in nsecs */
1103 LttCycleCount lBufTotalCycle;/* Total cycles for this buffer */
1104
1105 /* Calculate the total time for this buffer */
1106 lBufTotalTime = ltt_time_sub(t->a_block_end->time, t->a_block_start->time);
1107
1108 /* Calculate the total cycles for this bufffer */
1109 lBufTotalCycle = t->a_block_end->cycle_count;
1110 lBufTotalCycle -= t->a_block_start->cycle_count;
1111
1112 /* Convert the total time to nsecs */
1113 lBufTotalNSec = lBufTotalTime.tv_sec;
1114 lBufTotalNSec *= NANOSECONDS_PER_SECOND;
1115 lBufTotalNSec += lBufTotalTime.tv_nsec;
1116
1117 t->cycle_per_nsec = (double)lBufTotalCycle / (double)lBufTotalNSec;
1118 }
1119
1120 /****************************************************************************
1121 *Function name
1122 * getEventTime : obtain the time of an event
1123 *Input params
1124 * tf : tracefile
1125 *Return value
1126 * LttTime : the time of the event
1127 ****************************************************************************/
1128
1129 LttTime getEventTime(LttTracefile * tf)
1130 {
1131 LttTime time;
1132 LttCycleCount cycle_count; // cycle count for the current event
1133 LttCycleCount lEventTotalCycle; // Total cycles from start for event
1134 double lEventNSec; // Total usecs from start for event
1135 LttTime lTimeOffset; // Time offset in struct LttTime
1136 guint16 evId;
1137 gint64 nanoSec, tmpCycleCount = (((guint64)1)<<32);
1138 static LttCycleCount preCycleCount = 0;
1139 static int count = 0;
1140
1141 evId = *(guint16 *)tf->cur_event_pos;
1142 if(evId == TRACE_BLOCK_START){
1143 count = 0;
1144 preCycleCount = 0;
1145 tf->cur_cycle_count = tf->a_block_start->cycle_count;
1146 return tf->a_block_start->time;
1147 }else if(evId == TRACE_BLOCK_END){
1148 count = 0;
1149 preCycleCount = 0;
1150 tf->cur_cycle_count = tf->a_block_end->cycle_count;
1151 return tf->a_block_end->time;
1152 }
1153
1154 // Calculate total time in cycles from start of buffer for this event
1155 cycle_count = (LttCycleCount)*(guint32 *)(tf->cur_event_pos + EVENT_ID_SIZE);
1156
1157 if(cycle_count < preCycleCount)count++;
1158 preCycleCount = cycle_count;
1159 cycle_count += tmpCycleCount * count;
1160
1161 if(tf->cur_heart_beat_number > count)
1162 cycle_count += tmpCycleCount * (tf->cur_heart_beat_number - count);
1163
1164 tf->cur_cycle_count = cycle_count;
1165
1166 lEventTotalCycle = cycle_count;
1167 lEventTotalCycle -= tf->a_block_start->cycle_count;
1168
1169 // Convert it to nsecs
1170 lEventNSec = lEventTotalCycle / tf->cycle_per_nsec;
1171 nanoSec = lEventNSec;
1172
1173 // Determine offset in struct LttTime
1174 lTimeOffset.tv_nsec = nanoSec % NANOSECONDS_PER_SECOND;
1175 lTimeOffset.tv_sec = nanoSec / NANOSECONDS_PER_SECOND;
1176
1177 time = ltt_time_add(tf->a_block_start->time, lTimeOffset);
1178
1179 return time;
1180 }
1181
1182 /*****************************************************************************
1183 *Function name
1184 * setFieldsOffset : set offset of the fields
1185 *Input params
1186 * tracefile : opened trace file
1187 * evT : the event type
1188 * evD : event data, it may be NULL
1189 ****************************************************************************/
1190
1191 void setFieldsOffset(LttTracefile *tf,LttEventType *evT,void *evD,LttTrace* t)
1192 {
1193 LttField * rootFld = evT->root_field;
1194 // rootFld->base_address = evD;
1195
1196 if(rootFld)
1197 rootFld->field_size = getFieldtypeSize(tf, evT, 0,0,rootFld, evD,t);
1198 }
1199
1200 /*****************************************************************************
1201 *Function name
1202 * getFieldtypeSize: get the size of the field type (primitive type)
1203 *Input params
1204 * tracefile : opened trace file
1205 * evT : event type
1206 * offsetRoot : offset from the root
1207 * offsetParent : offset from the parrent
1208 * fld : field
1209 * evD : event data, it may be NULL
1210 *Return value
1211 * int : size of the field
1212 ****************************************************************************/
1213
1214 int getFieldtypeSize(LttTracefile * t, LttEventType * evT, int offsetRoot,
1215 int offsetParent, LttField * fld, void *evD, LttTrace *trace)
1216 {
1217 int size, size1, element_number, i, offset1, offset2;
1218 LttType * type = fld->field_type;
1219
1220 if(t){
1221 if(evT->latest_block==t->which_block && evT->latest_event==t->which_event){
1222 return fld->field_size;
1223 }
1224 }
1225
1226 if(fld->field_fixed == 1){
1227 if(fld == evT->root_field) return fld->field_size;
1228 }
1229
1230 if(type->type_class != LTT_STRUCT && type->type_class != LTT_ARRAY &&
1231 type->type_class != LTT_SEQUENCE && type->type_class != LTT_STRING){
1232 if(fld->field_fixed == -1){
1233 size = (int) ltt_type_size(trace, type);
1234 fld->field_fixed = 1;
1235 }else size = fld->field_size;
1236
1237 }else if(type->type_class == LTT_ARRAY){
1238 element_number = (int) type->element_number;
1239 if(fld->field_fixed == -1){
1240 size = getFieldtypeSize(t, evT, offsetRoot,0,fld->child[0], NULL, trace);
1241 if(size == 0){ //has string or sequence
1242 fld->field_fixed = 0;
1243 }else{
1244 fld->field_fixed = 1;
1245 size *= element_number;
1246 }
1247 }else if(fld->field_fixed == 0){// has string or sequence
1248 size = 0;
1249 for(i=0;i<element_number;i++){
1250 size += getFieldtypeSize(t, evT, offsetRoot+size,size,
1251 fld->child[0], evD+size, trace);
1252 }
1253 }else size = fld->field_size;
1254
1255 }else if(type->type_class == LTT_SEQUENCE){
1256 size1 = (int) ltt_type_size(trace, type);
1257 if(fld->field_fixed == -1){
1258 fld->sequ_number_size = size1;
1259 fld->field_fixed = 0;
1260 size = getFieldtypeSize(t, evT, offsetRoot,0,fld->child[0], NULL, trace);
1261 fld->element_size = size;
1262 }else{//0: sequence
1263 element_number = getIntNumber(size1,evD);
1264 type->element_number = element_number;
1265 if(fld->element_size > 0){
1266 size = element_number * fld->element_size;
1267 }else{//sequence has string or sequence
1268 size = 0;
1269 for(i=0;i<element_number;i++){
1270 size += getFieldtypeSize(t, evT, offsetRoot+size+size1,size+size1,
1271 fld->child[0], evD+size+size1, trace);
1272 }
1273 }
1274 size += size1;
1275 }
1276
1277 }else if(type->type_class == LTT_STRING){
1278 size = 0;
1279 if(fld->field_fixed == -1){
1280 fld->field_fixed = 0;
1281 }else{//0: string
1282 size = strlen((char*)evD) + 1; //include end : '\0'
1283 }
1284
1285 }else if(type->type_class == LTT_STRUCT){
1286 element_number = (int) type->element_number;
1287 size = 0;
1288 if(fld->field_fixed == -1){
1289 offset1 = offsetRoot;
1290 offset2 = 0;
1291 for(i=0;i<element_number;i++){
1292 size1=getFieldtypeSize(t, evT,offset1,offset2, fld->child[i], NULL, trace);
1293 if(size1 > 0 && size >= 0){
1294 size += size1;
1295 if(offset1 >= 0) offset1 += size1;
1296 offset2 += size1;
1297 }else{
1298 size = -1;
1299 offset1 = -1;
1300 offset2 = -1;
1301 }
1302 }
1303 if(size == -1){
1304 fld->field_fixed = 0;
1305 size = 0;
1306 }else fld->field_fixed = 1;
1307 }else if(fld->field_fixed == 0){
1308 offset1 = offsetRoot;
1309 offset2 = 0;
1310 for(i=0;i<element_number;i++){
1311 size=getFieldtypeSize(t,evT,offset1,offset2,fld->child[i],evD+offset2, trace);
1312 offset1 += size;
1313 offset2 += size;
1314 }
1315 size = offset2;
1316 }else size = fld->field_size;
1317 }
1318
1319 fld->offset_root = offsetRoot;
1320 fld->offset_parent = offsetParent;
1321 if(!evD){
1322 fld->fixed_root = (offsetRoot==-1) ? 0 : 1;
1323 fld->fixed_parent = (offsetParent==-1) ? 0 : 1;
1324 }
1325 fld->field_size = size;
1326
1327 return size;
1328 }
1329
1330
1331 /*****************************************************************************
1332 *Function name
1333 * getIntNumber : get an integer number
1334 *Input params
1335 * size : the size of the integer
1336 * evD : the event data
1337 *Return value
1338 * int : an integer
1339 ****************************************************************************/
1340
1341 int getIntNumber(int size, void *evD)
1342 {
1343 gint64 i;
1344 if(size == 1) i = *(gint8 *)evD;
1345 else if(size == 2) i = *(gint16 *)evD;
1346 else if(size == 4) i = *(gint32 *)evD;
1347 else if(size == 8) i = *(gint64 *)evD;
1348
1349 return (int) i;
1350 }
1351
1352 /*****************************************************************************
1353 *Function name
1354 * getDataEndianType : get the data type size and endian type of the local
1355 * machine
1356 *Input params
1357 * size : size of data type
1358 * endian : endian type, little or big
1359 ****************************************************************************/
1360
1361 void getDataEndianType(LttArchSize * size, LttArchEndian * endian)
1362 {
1363 int i = 1;
1364 char c = (char) i;
1365 int sizeInt=sizeof(int), sizeLong=sizeof(long), sizePointer=sizeof(void *);
1366
1367 if(c == 1) *endian = LTT_LITTLE_ENDIAN;
1368 else *endian = LTT_BIG_ENDIAN;
1369
1370 if(sizeInt == 2 && sizeLong == 4 && sizePointer == 4)
1371 *size = LTT_LP32;
1372 else if(sizeInt == 4 && sizeLong == 4 && sizePointer == 4)
1373 *size = LTT_ILP32;
1374 else if(sizeInt == 4 && sizeLong == 8 && sizePointer == 8)
1375 *size = LTT_LP64;
1376 else if(sizeInt == 8 && sizeLong == 8 && sizePointer == 8)
1377 *size = LTT_ILP64;
1378 else *size = LTT_UNKNOWN;
1379 }
1380
This page took 0.06494 seconds and 5 git commands to generate.