lttinclude_HEADERS = \
event.h\
facility.h\
- ltt-private.h\
ltt.h\
time.h\
trace.h\
void ltt_event_position(LttEvent *e, LttEventPosition *ep);
+LttEventPosition * ltt_event_position_new();
+
void ltt_event_position_get(LttEventPosition *ep,
unsigned *block_number, unsigned *index_in_block, LttTracefile ** tf);
LttChecksum ltt_facility_checksum(LttFacility *f);
+/* open facility */
+void ltt_facility_open(LttTrace * t, char * facility_name);
/* Discover the event types within the facility. The event type integer id
relative to the trace is from 0 to nb_event_types - 1. The event
+++ /dev/null
-#ifndef LTT_PRIVATE_H
-#define LTT_PRIVATE_H
-
-#include <glib.h>
-#include <sys/types.h>
-#include <ltt/ltt.h>
-#include <ltt/type.h>
-#include <ltt/trace.h>
-
-#define LTT_PACKED_STRUCT __attribute__ ((packed))
-
-/* enumeration definition */
-
-typedef enum _BuildinEvent{
- TRACE_FACILITY_LOAD = 0,
- TRACE_BLOCK_START = 17,
- TRACE_BLOCK_END = 18,
- TRACE_TIME_HEARTBEAT= 19
-} BuildinEvent;
-
-
-/* structure definition */
-
-typedef struct _FacilityLoad{
- char * name;
- LttChecksum checksum;
- guint32 base_code;
-} LTT_PACKED_STRUCT FacilityLoad;
-
-typedef struct _BlockStart {
- LttTime time; //Time stamp of this block
- LttCycleCount cycle_count; //cycle count of the event
- guint32 block_id; //block id
-} LTT_PACKED_STRUCT BlockStart;
-
-typedef struct _BlockEnd {
- LttTime time; //Time stamp of this block
- LttCycleCount cycle_count; //cycle count of the event
- guint32 block_id; //block id
-} LTT_PACKED_STRUCT BlockEnd;
-
-typedef struct _TimeHeartbeat {
- LttTime time; //Time stamp of this block
- LttCycleCount cycle_count; //cycle count of the event
-} LTT_PACKED_STRUCT TimeHeartbeat;
-
-
-struct _LttType{
- char * type_name; //type name if it is a named type
- char * element_name; //elements name of the struct
- char * fmt;
- int size;
- LttTypeEnum type_class; //which type
- char ** enum_strings; //for enum labels
- struct _LttType ** element_type; //for array, sequence and struct
- unsigned element_number; //the number of elements
- //for enum, array, sequence and structure
-};
-
-struct _LttEventType{
- char * name;
- char * description;
- int index; //id of the event type within the facility
- LttFacility * facility; //the facility that contains the event type
- LttField * root_field; //root field
- int latest_block; //the latest block using the event type
- int latest_event; //the latest event using the event type
-};
-
-struct _LttField{
- unsigned field_pos; //field position within its parent
- LttType * field_type; //field type, if it is root field
- //then it must be struct type
-
- off_t offset_root; //offset from the root, -1:uninitialized
- short fixed_root; //offset fixed according to the root
- //-1:uninitialized, 0:unfixed, 1:fixed
- off_t offset_parent; //offset from the parent,-1:uninitialized
- short fixed_parent; //offset fixed according to its parent
- //-1:uninitialized, 0:unfixed, 1:fixed
- // void * base_address; //base address of the field ????
-
- int field_size; //>0: size of the field,
- //0 : uncertain
- //-1: uninitialize
- int sequ_number_size; //the size of unsigned used to save the
- //number of elements in the sequence
-
- int element_size; //the element size of the sequence
- int field_fixed; //0: field has string or sequence
- //1: field has no string or sequenc
- //-1: uninitialize
-
- struct _LttField * parent;
- struct _LttField ** child; //for array, sequence and struct:
- //list of fields, it may have only one
- //field if the element is not a struct
- unsigned current_element; //which element is currently processed
-};
-
-struct _LttEvent{
- guint16 event_id;
- guint32 time_delta;
- LttTime event_time;
- LttCycleCount event_cycle_count;
- LttTracefile * tracefile;
- void * data; //event data
- int which_block; //the current block of the event
- int which_event; //the position of the event
-};
-
-struct _LttFacility{
- char * name; //facility name
- int event_number; //number of events in the facility
- LttChecksum checksum; //checksum of the facility
- guint32 base_id; //base id of the facility
- LttEventType ** events; //array of event types
- LttType ** named_types;
- int named_types_number;
-};
-
-struct _LttTracefile{
- char * name; //tracefile name
- LttTrace * trace; //trace containing the tracefile
- int fd; //file descriptor
- off_t file_size; //file size
- unsigned block_size; //block_size
- int block_number; //number of blocks in the file
- int which_block; //which block the current block is
- int which_event; //which event of the current block
- //is currently processed
- LttTime current_event_time; //time of the current event
- BlockStart * a_block_start; //block start of the block
- BlockEnd * a_block_end; //block end of the block
- void * cur_event_pos; //the position of the current event
- void * buffer; //the buffer containing the block
- double cycle_per_nsec; //Cycles per nsec
- unsigned cur_heart_beat_number; //current number of heart beat in the buf
- LttCycleCount cur_cycle_count; //current cycle count of the event
- void * last_event_pos;
-
- LttTime prev_block_end_time; //the end time of previous block
- LttTime prev_event_time; //the time of the previous event
- LttEvent an_event;
-};
-
-struct _LttTrace{
- char * pathname; //the pathname of the trace
- guint facility_number; //the number of facilities
- guint control_tracefile_number; //the number of control files
- guint per_cpu_tracefile_number; //the number of per cpu files
- LttSystemDescription * system_description;//system description
-
- GPtrArray *control_tracefiles; //array of control tracefiles
- GPtrArray *per_cpu_tracefiles; //array of per cpu tracefiles
- GPtrArray *facilities; //array of facilities
- LttArchSize my_arch_size; //data size of the local machine
- LttArchEndian my_arch_endian; //endian type of the local machine
-};
-
-struct _LttEventPosition{
- unsigned block_num; //block which contains the event
- unsigned event_num; //event index in the block
- unsigned event_offset; //event position in the block
- LttTime event_time; //the time of the event
- LttCycleCount event_cycle_count; //the cycle count of the event
- unsigned heart_beat_number; //current number of heart beats
- LttTracefile *tf; //tracefile containing the event
- gboolean old_position; //flag to show if it is the position
- //being remembered
-};
-
-/*****************************************************************************
- macro for size of some data types
- *****************************************************************************/
-#define EVENT_ID_SIZE sizeof(guint16)
-#define TIME_DELTA_SIZE sizeof(guint32)
-#define EVENT_HEADER_SIZE (EVENT_ID_SIZE + TIME_DELTA_SIZE)
-
-
-
-
-/* obtain the time of an event */
-LttTime getEventTime(LttTracefile * tf);
-
-/* get the data type size and endian type of the local machine */
-void getDataEndianType(LttArchSize * size, LttArchEndian * endian);
-
-/* get an integer number */
-int getIntNumber(int size1, void *evD);
-
-/* open facility */
-void ltt_facility_open(LttTrace * t, char * facility_name);
-
-/* get facility by event id */
-LttFacility * ltt_trace_facility_by_id(LttTrace * trace, unsigned id);
-
-/* open tracefile */
-LttTracefile * ltt_tracefile_open(LttTrace *t, char * tracefile_name);
-void ltt_tracefile_open_cpu(LttTrace *t, char * tracefile_name);
-void ltt_tracefile_open_control(LttTrace *t, char * control_name);
-
-
-#endif /* LTT_PRIVATE_H */
{ LTT_LITTLE_ENDIAN, LTT_BIG_ENDIAN
} LttArchEndian;
-#include <ltt/ltt-private.h>
+typedef enum _LttTypeEnum
+{ LTT_INT, LTT_UINT, LTT_FLOAT, LTT_STRING, LTT_ENUM, LTT_ARRAY,
+ LTT_SEQUENCE, LTT_STRUCT, LTT_UNION
+} LttTypeEnum;
#endif // LTT_H
void ltt_trace_close(LttTrace *t);
-/* The characteristics of the system on which the trace was obtained
- is described in a LttSystemDescription structure. */
-
-struct _LttSystemDescription {
- char *description;
- char *node_name;
- char *domain_name;
- unsigned nb_cpu;
- LttArchSize size;
- LttArchEndian endian;
- char *kernel_name;
- char *kernel_release;
- char *kernel_version;
- char *machine;
- char *processor;
- char *hardware_platform;
- char *operating_system;
- unsigned ltt_major_version;
- unsigned ltt_minor_version;
- unsigned ltt_block_size;
- LttTime trace_start;
- LttTime trace_end;
-};
-
LttSystemDescription *ltt_trace_system_description(LttTrace *t);
LttFacility *ltt_trace_facility_get(LttTrace *t, unsigned i);
+LttFacility * ltt_trace_facility_by_id(LttTrace * trace, unsigned id);
/* Look for a facility by name. It returns the number of facilities found
and sets the position argument to the first found. Returning 0, the named
LttEvent *ltt_tracefile_read(LttTracefile *t);
+/* open tracefile */
+
+LttTracefile * ltt_tracefile_open(LttTrace *t, char * tracefile_name);
+
+void ltt_tracefile_open_cpu(LttTrace *t, char * tracefile_name);
+
+void ltt_tracefile_open_control(LttTrace *t, char * control_name);
+
+
+/* obtain the time of an event */
+
+LttTime getEventTime(LttTracefile * tf);
+
+
+/* get the data type size and endian type of the local machine */
+
+void getDataEndianType(LttArchSize * size, LttArchEndian * endian);
+
+/* get an integer number */
+
+int getIntNumber(int size1, void *evD);
+
+
+/* get the node name of the system */
+
+char * ltt_trace_system_description_node_name (LttSystemDescription * s);
+
+
+/* get the domain name of the system */
+
+char * ltt_trace_system_description_domain_name (LttSystemDescription * s);
+
+
+/* get the description of the system */
+
+char * ltt_trace_system_description_description (LttSystemDescription * s);
+
+
+/* get the start time of the trace */
+
+LttTime ltt_trace_system_description_trace_start_time(LttSystemDescription *s);
+
#endif // TRACE_H
/* Different types allowed */
-typedef enum _LttTypeEnum
-{ LTT_INT, LTT_UINT, LTT_FLOAT, LTT_STRING, LTT_ENUM, LTT_ARRAY,
- LTT_SEQUENCE, LTT_STRUCT, LTT_UNION
-} LttTypeEnum;
-
#include <ltt/ltt.h>
LttType *ltt_field_type(LttField *f);
+int ltt_field_size(LttField * f);
+
#endif // TYPE_H
lib_LTLIBRARIES = libtraceread.la
libtraceread_la_SOURCES = event.c facility.c parser.c tracefile.c type.c
-noinst_HEADERS = parser.h
+noinst_HEADERS = parser.h ltt-private.h
EXTRA_DIST = crc32.tab
#include <stdio.h>
#include <asm/types.h>
#include <linux/byteorder/swab.h>
+
#include "parser.h"
+#include <ltt/ltt.h>
+#include "ltt-private.h"
#include <ltt/event.h>
+#include <ltt/trace.h>
/*****************************************************************************
*Function name
ep->tf = e->tracefile;
}
+LttEventPosition * ltt_event_position_new()
+{
+ return g_new(LttEventPosition, 1);
+}
+
/*****************************************************************************
*Function name
* ltt_event_position_get : get the block number and index of the event
#include <stdio.h>
#include "parser.h"
+#include <ltt/ltt.h>
+#include "ltt-private.h"
#include <ltt/facility.h>
/* search for the (named) type in the table, if it does not exist
--- /dev/null
+#ifndef LTT_PRIVATE_H
+#define LTT_PRIVATE_H
+
+#include <glib.h>
+#include <sys/types.h>
+#include <ltt/ltt.h>
+
+#define LTT_PACKED_STRUCT __attribute__ ((packed))
+
+/* enumeration definition */
+
+typedef enum _BuildinEvent{
+ TRACE_FACILITY_LOAD = 0,
+ TRACE_BLOCK_START = 17,
+ TRACE_BLOCK_END = 18,
+ TRACE_TIME_HEARTBEAT= 19
+} BuildinEvent;
+
+
+/* structure definition */
+
+typedef struct _FacilityLoad{
+ char * name;
+ LttChecksum checksum;
+ guint32 base_code;
+} LTT_PACKED_STRUCT FacilityLoad;
+
+typedef struct _BlockStart {
+ LttTime time; //Time stamp of this block
+ LttCycleCount cycle_count; //cycle count of the event
+ guint32 block_id; //block id
+} LTT_PACKED_STRUCT BlockStart;
+
+typedef struct _BlockEnd {
+ LttTime time; //Time stamp of this block
+ LttCycleCount cycle_count; //cycle count of the event
+ guint32 block_id; //block id
+} LTT_PACKED_STRUCT BlockEnd;
+
+typedef struct _TimeHeartbeat {
+ LttTime time; //Time stamp of this block
+ LttCycleCount cycle_count; //cycle count of the event
+} LTT_PACKED_STRUCT TimeHeartbeat;
+
+
+struct _LttType{
+ char * type_name; //type name if it is a named type
+ char * element_name; //elements name of the struct
+ char * fmt;
+ int size;
+ LttTypeEnum type_class; //which type
+ char ** enum_strings; //for enum labels
+ struct _LttType ** element_type; //for array, sequence and struct
+ unsigned element_number; //the number of elements
+ //for enum, array, sequence and structure
+};
+
+struct _LttEventType{
+ char * name;
+ char * description;
+ int index; //id of the event type within the facility
+ LttFacility * facility; //the facility that contains the event type
+ LttField * root_field; //root field
+ int latest_block; //the latest block using the event type
+ int latest_event; //the latest event using the event type
+};
+
+struct _LttField{
+ unsigned field_pos; //field position within its parent
+ LttType * field_type; //field type, if it is root field
+ //then it must be struct type
+
+ off_t offset_root; //offset from the root, -1:uninitialized
+ short fixed_root; //offset fixed according to the root
+ //-1:uninitialized, 0:unfixed, 1:fixed
+ off_t offset_parent; //offset from the parent,-1:uninitialized
+ short fixed_parent; //offset fixed according to its parent
+ //-1:uninitialized, 0:unfixed, 1:fixed
+ // void * base_address; //base address of the field ????
+
+ int field_size; //>0: size of the field,
+ //0 : uncertain
+ //-1: uninitialize
+ int sequ_number_size; //the size of unsigned used to save the
+ //number of elements in the sequence
+
+ int element_size; //the element size of the sequence
+ int field_fixed; //0: field has string or sequence
+ //1: field has no string or sequenc
+ //-1: uninitialize
+
+ struct _LttField * parent;
+ struct _LttField ** child; //for array, sequence and struct:
+ //list of fields, it may have only one
+ //field if the element is not a struct
+ unsigned current_element; //which element is currently processed
+};
+
+struct _LttEvent{
+ guint16 event_id;
+ guint32 time_delta;
+ LttTime event_time;
+ LttCycleCount event_cycle_count;
+ LttTracefile * tracefile;
+ void * data; //event data
+ int which_block; //the current block of the event
+ int which_event; //the position of the event
+};
+
+struct _LttFacility{
+ char * name; //facility name
+ int event_number; //number of events in the facility
+ LttChecksum checksum; //checksum of the facility
+ guint32 base_id; //base id of the facility
+ LttEventType ** events; //array of event types
+ LttType ** named_types;
+ int named_types_number;
+};
+
+struct _LttTracefile{
+ char * name; //tracefile name
+ LttTrace * trace; //trace containing the tracefile
+ int fd; //file descriptor
+ off_t file_size; //file size
+ unsigned block_size; //block_size
+ int block_number; //number of blocks in the file
+ int which_block; //which block the current block is
+ int which_event; //which event of the current block
+ //is currently processed
+ LttTime current_event_time; //time of the current event
+ BlockStart * a_block_start; //block start of the block
+ BlockEnd * a_block_end; //block end of the block
+ void * cur_event_pos; //the position of the current event
+ void * buffer; //the buffer containing the block
+ double cycle_per_nsec; //Cycles per nsec
+ unsigned cur_heart_beat_number; //current number of heart beat in the buf
+ LttCycleCount cur_cycle_count; //current cycle count of the event
+ void * last_event_pos;
+
+ LttTime prev_block_end_time; //the end time of previous block
+ LttTime prev_event_time; //the time of the previous event
+ LttEvent an_event;
+};
+
+struct _LttTrace{
+ char * pathname; //the pathname of the trace
+ guint facility_number; //the number of facilities
+ guint control_tracefile_number; //the number of control files
+ guint per_cpu_tracefile_number; //the number of per cpu files
+ LttSystemDescription * system_description;//system description
+
+ GPtrArray *control_tracefiles; //array of control tracefiles
+ GPtrArray *per_cpu_tracefiles; //array of per cpu tracefiles
+ GPtrArray *facilities; //array of facilities
+ LttArchSize my_arch_size; //data size of the local machine
+ LttArchEndian my_arch_endian; //endian type of the local machine
+};
+
+struct _LttEventPosition{
+ unsigned block_num; //block which contains the event
+ unsigned event_num; //event index in the block
+ unsigned event_offset; //event position in the block
+ LttTime event_time; //the time of the event
+ LttCycleCount event_cycle_count; //the cycle count of the event
+ unsigned heart_beat_number; //current number of heart beats
+ LttTracefile *tf; //tracefile containing the event
+ gboolean old_position; //flag to show if it is the position
+ //being remembered
+};
+
+/* The characteristics of the system on which the trace was obtained
+ is described in a LttSystemDescription structure. */
+
+struct _LttSystemDescription {
+ char *description;
+ char *node_name;
+ char *domain_name;
+ unsigned nb_cpu;
+ LttArchSize size;
+ LttArchEndian endian;
+ char *kernel_name;
+ char *kernel_release;
+ char *kernel_version;
+ char *machine;
+ char *processor;
+ char *hardware_platform;
+ char *operating_system;
+ unsigned ltt_major_version;
+ unsigned ltt_minor_version;
+ unsigned ltt_block_size;
+ LttTime trace_start;
+ LttTime trace_end;
+};
+
+/*****************************************************************************
+ macro for size of some data types
+ *****************************************************************************/
+#define EVENT_ID_SIZE sizeof(guint16)
+#define TIME_DELTA_SIZE sizeof(guint32)
+#define EVENT_HEADER_SIZE (EVENT_ID_SIZE + TIME_DELTA_SIZE)
+
+
+#endif /* LTT_PRIVATE_H */
#include <linux/errno.h>
#include "parser.h"
+#include <ltt/ltt.h>
+#include "ltt-private.h"
#include <ltt/trace.h>
+#include <ltt/facility.h>
#define DIR_NAME_SIZE 256
else *size = LTT_UNKNOWN;
}
+/* get the node name of the system */
+
+char * ltt_trace_system_description_node_name (LttSystemDescription * s)
+{
+ return s->node_name;
+}
+
+
+/* get the domain name of the system */
+
+char * ltt_trace_system_description_domain_name (LttSystemDescription * s)
+{
+ return s->domain_name;
+}
+
+
+/* get the description of the system */
+
+char * ltt_trace_system_description_description (LttSystemDescription * s)
+{
+ return s->description;
+}
+
+
+/* get the start time of the trace */
+
+LttTime ltt_trace_system_description_trace_start_time(LttSystemDescription *s)
+{
+ return s->trace_start;
+}
+
#include <stdio.h>
#include "parser.h"
+#include <ltt/ltt.h>
+#include "ltt-private.h"
#include <ltt/type.h>
static unsigned intSizes[] = {
return f->field_type;
}
+int ltt_field_size(LttField * f)
+{
+ if(!f)return 0;
+ return f->field_size;
+}
#include <lttv/processTrace.h>
#include <lttv/state.h>
#include <lttv/stats.h>
+#include <ltt/trace.h>
static LttvTraceset *traceset;
#include <lttv/gtkdirsel.h>
#include <lttv/iattribute.h>
#include <lttv/lttvfilter.h>
+#include <ltt/trace.h>
#define PATH_LENGTH 256
#define DEFAULT_TIME_WIDTH_S 1
trace_v = lttv_traceset_get(mw_data->current_tab->
traceset_info->traceset, i);
trace = lttv_trace(trace_v);
- name[i] = trace->pathname;
+ name[i] = ltt_trace_name(trace);
}
remove_trace_name = get_remove_trace(name, nb_trace);
#include "support.h"
#include <lttv/mainWindow.h>
#include "callbacks.h"
+#include <ltt/trace.h>
+
/* global variable */
static WindowCreationData win_creation_data;
#include <lttv/lttvfilter.h>
#include <stdio.h>
+#include <ltt/trace.h>
struct _LttvTracesetSelector {
char * traceset_name;
int pid;
unsigned entry_length;
char * event_description;
- LttEventPosition ep;
+ LttEventPosition *ep;
} RawTraceData;
#define RESERVE_BIG_SIZE 1000
raw_data = (RawTraceData*)g_list_nth_data(first,0);
end = raw_data->time;
end.tv_nsec--;
- ltt_event_position_get(&raw_data->ep, &block_num, &event_num, &tf);
+ ltt_event_position_get(raw_data->ep, &block_num, &event_num, &tf);
if(size !=0){
if(event_num > minNum){
backward_num = event_num > RESERVE_SMALL_SIZE
? event_num - RESERVE_SMALL_SIZE : 1;
- ltt_event_position_set(&raw_data->ep, block_num, backward_num);
- ltt_tracefile_seek_position(tf, &raw_data->ep);
+ ltt_event_position_set(raw_data->ep, block_num, backward_num);
+ ltt_tracefile_seek_position(tf, raw_data->ep);
ev = ltt_tracefile_read(tf);
start = ltt_event_time(ev);
maxNum = G_MAXULONG;
}else{
if(block_num > 1){
- ltt_event_position_set(&raw_data->ep, block_num-1, 1);
- ltt_tracefile_seek_position(tf, &raw_data->ep);
+ ltt_event_position_set(raw_data->ep, block_num-1, 1);
+ ltt_tracefile_seek_position(tf, raw_data->ep);
ev = ltt_tracefile_read(tf);
start = ltt_event_time(ev);
}else{
}
}else{
if(block_num > count){
- ltt_event_position_set(&raw_data->ep, block_num-count, 1);
- ltt_tracefile_seek_position(tf, &raw_data->ep);
+ ltt_event_position_set(raw_data->ep, block_num-count, 1);
+ ltt_tracefile_seek_position(tf, raw_data->ep);
ev = ltt_tracefile_read(tf);
start = ltt_event_time(ev);
}else{
raw_data = (RawTraceData*)g_list_nth_data(first,0);
end = raw_data->time;
end.tv_nsec--;
- ltt_event_position_get(&raw_data->ep, &block_num, &event_num, &tf);
+ ltt_event_position_get(raw_data->ep, &block_num, &event_num, &tf);
if(event_num > list_height - size){
backward_num = event_num > RESERVE_SMALL_SIZE
? event_num - RESERVE_SMALL_SIZE : 1;
- ltt_event_position_set(&raw_data->ep, block_num, backward_num);
- ltt_tracefile_seek_position(tf, &raw_data->ep);
+ ltt_event_position_set(raw_data->ep, block_num, backward_num);
+ ltt_tracefile_seek_position(tf, raw_data->ep);
ev = ltt_tracefile_read(tf);
start = ltt_event_time(ev);
maxNum = G_MAXULONG;
tmp_raw_trace_data->cpu_id = ltt_event_cpu_id(e);
tmp_raw_trace_data->event_name = g_strdup(ltt_eventtype_name(ltt_event_eventtype(e)));
tmp_raw_trace_data->time = time;
+ tmp_raw_trace_data->ep = ltt_event_position_new();
if(prev_raw_trace_data) tmp_raw_trace_data->pid = prev_raw_trace_data->pid;
else tmp_raw_trace_data->pid = -1;
- tmp_raw_trace_data->entry_length = field == NULL ? 0 : field->field_size;
+ tmp_raw_trace_data->entry_length = field == NULL ? 0 : ltt_field_size(field);
if(field) get_event_detail(e, field, detail_event);
tmp_raw_trace_data->event_description = g_strdup(detail_event->str);
}
}
- ltt_event_position(e, &tmp_raw_trace_data->ep);
+ ltt_event_position(e, tmp_raw_trace_data->ep);
if(event_viewer_data->raw_trace_data_queue_tmp->length >= RESERVE_SMALL_SIZE){
if(event_viewer_data->append){
tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]);
desc = ltt_trace_system_description(tcs->parent.parent.t);
sprintf(trace_str, "Trace on system %s at time %d secs",
- desc->node_name,desc->trace_start.tv_sec);
+ ltt_trace_system_description_node_name(desc),
+ (ltt_trace_system_description_trace_start_time(desc)).tv_sec);
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter,NAME_COLUMN,trace_str,-1);
#include <lttv/processTrace.h>
#include <ltt/event.h>
#include <ltt/facility.h>
+#include <ltt/trace.h>
+#include <ltt/type.h>
void lttv_context_init(LttvTracesetContext *self, LttvTraceset *ts)
{
#include <ltt/facility.h>
#include <ltt/trace.h>
#include <ltt/event.h>
+#include <ltt/type.h>
LttvExecutionMode
LTTV_STATE_MODE_UNKNOWN,
LTTV_POINTER);
if(tfcs->parent.e == NULL) *(value.v_pointer) = NULL;
else {
- ep = g_new(LttEventPosition, 1);
+ ep = ltt_event_position_new();
ltt_event_position(tfcs->parent.e, ep);
*(value.v_pointer) = ep;
}
LttvTraceState *tcs = (LttvTraceState *)(tfcs->parent.t_context);
- LttEventPosition ep;
+ LttEventPosition *ep = ltt_event_position_new();
guint nb_block, nb_event;
LttvAttributeValue value;
- ltt_event_position(tfcs->parent.e, &ep);
+ ltt_event_position(tfcs->parent.e, ep);
- ltt_event_position_get(&ep, &nb_block, &nb_event, &tf);
+ ltt_event_position_get(ep, &nb_block, &nb_event, &tf);
tcs->nb_event += nb_event - tfcs->saved_position;
tfcs->saved_position = 0;
if(tcs->nb_event >= tcs->save_interval) {
for(i = 0 ; i < nb ; i++) {
tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]);
desc = ltt_trace_system_description(tcs->parent.parent.t);
- fprintf(fp, "Trace on system %s at time %d secs:\n", desc->node_name,
- desc->trace_start.tv_sec);
+ fprintf(fp, "Trace on system %s at time %d secs:\n",
+ ltt_trace_system_description_node_name(desc),
+ (ltt_trace_system_description_trace_start_time(desc)).tv_sec);
saved_length = indent->len;
g_string_append(indent, " ");
print_tree(fp, indent, tcs->stats);
LttSystemDescription *system = ltt_trace_system_description(tc->t);
- fprintf(a_file," Trace from %s in %s\n%s\n\n", system->node_name,
- system->domain_name, system->description);
+ fprintf(a_file," Trace from %s in %s\n%s\n\n",
+ ltt_trace_system_description_node_name(system),
+ ltt_trace_system_description_domain_name(system),
+ ltt_trace_system_description_description(system));
return FALSE;
}