6 /* A trace is specified as a pathname to the directory containing all the
7 associated data (control tracefiles, per cpu tracefiles, event
10 When a trace is closed, all the associated facilities, types and fields
11 are released as well. */
13 LttTrace
*ltt_trace_open(const char *pathname
);
15 /* copy reopens a trace */
16 LttTrace
*ltt_trace_copy(LttTrace
*self
);
18 char * ltt_trace_name(LttTrace
*t
);
20 void ltt_trace_close(LttTrace
*t
);
23 LttSystemDescription
*ltt_trace_system_description(LttTrace
*t
);
26 /* Functions to discover the facilities in the trace. Once the number
27 of facilities is known, they may be accessed by position. Multiple
28 versions of a facility (same name, different checksum) have consecutive
31 unsigned ltt_trace_facility_number(LttTrace
*t
);
33 LttFacility
*ltt_trace_facility_get(LttTrace
*t
, unsigned i
);
35 LttFacility
* ltt_trace_facility_by_id(LttTrace
* trace
, unsigned id
);
37 /* Look for a facility by name. It returns the number of facilities found
38 and sets the position argument to the first found. Returning 0, the named
39 facility is unknown, returning 1, the named facility is at the specified
40 position, returning n, the facilities are from position to
43 unsigned ltt_trace_facility_find(LttTrace
*t
, char *name
, unsigned *position
);
46 /* Functions to discover all the event types in the trace */
48 unsigned ltt_trace_eventtype_number(LttTrace
*t
);
50 LttEventType
*ltt_trace_eventtype_get(LttTrace
*t
, unsigned i
);
53 /* There is one "per cpu" tracefile for each CPU, numbered from 0 to
54 the maximum number of CPU in the system. When the number of CPU installed
55 is less than the maximum, some positions are unused. There are also a
56 number of "control" tracefiles (facilities, interrupts...). */
58 unsigned ltt_trace_control_tracefile_number(LttTrace
*t
);
60 unsigned ltt_trace_per_cpu_tracefile_number(LttTrace
*t
);
63 /* It is possible to search for the tracefiles by name or by CPU position.
64 The index within the tracefiles of the same type is returned if found
65 and a negative value otherwise. */
67 int ltt_trace_control_tracefile_find(LttTrace
*t
, char *name
);
69 int ltt_trace_per_cpu_tracefile_find(LttTrace
*t
, unsigned i
);
72 /* Get a specific tracefile */
74 LttTracefile
*ltt_trace_control_tracefile_get(LttTrace
*t
, unsigned i
);
76 LttTracefile
*ltt_trace_per_cpu_tracefile_get(LttTrace
*t
, unsigned i
);
79 /* Get the start time and end time of the trace */
81 void ltt_trace_time_span_get(LttTrace
*t
, LttTime
*start
, LttTime
*end
);
84 /* Get the name of a tracefile */
86 char *ltt_tracefile_name(LttTracefile
*tf
);
89 /* Get the number of blocks in the tracefile */
91 unsigned ltt_tracefile_block_number(LttTracefile
*tf
);
94 /* Seek to the first event of the trace with time larger or equal to time */
96 void ltt_tracefile_seek_time(LttTracefile
*t
, LttTime time
);
98 /* Seek to the first event with position equal or larger to ep */
100 void ltt_tracefile_seek_position(LttTracefile
*t
,
101 LttEventPosition
*ep
);
103 /* Read the next event */
105 LttEvent
*ltt_tracefile_read(LttTracefile
*t
);
109 LttTracefile
* ltt_tracefile_open(LttTrace
*t
, char * tracefile_name
);
111 void ltt_tracefile_open_cpu(LttTrace
*t
, char * tracefile_name
);
113 void ltt_tracefile_open_control(LttTrace
*t
, char * control_name
);
116 /* obtain the time of an event */
118 LttTime
getEventTime(LttTracefile
* tf
);
121 /* get the data type size and endian type of the local machine */
123 void getDataEndianType(LttArchSize
* size
, LttArchEndian
* endian
);
125 /* get an integer number */
127 int getIntNumber(int size1
, void *evD
);
130 /* get the node name of the system */
132 char * ltt_trace_system_description_node_name (LttSystemDescription
* s
);
135 /* get the domain name of the system */
137 char * ltt_trace_system_description_domain_name (LttSystemDescription
* s
);
140 /* get the description of the system */
142 char * ltt_trace_system_description_description (LttSystemDescription
* s
);
145 /* get the start time of the trace */
147 LttTime
ltt_trace_system_description_trace_start_time(LttSystemDescription
*s
);
This page took 0.031616 seconds and 4 git commands to generate.