X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftrace.h;h=96931524af3a814acb4bba0b8520c91351b8eb5d;hb=1c736ed5fd25e728fa1df0899be03c4853c556d8;hp=42fff96ff8f7f19bdaab9a8048ad104d66af87a9;hpb=04b44e05c17a54fcb7e2cccf5c10a4edf8c7fd5c;p=lttv.git diff --git a/ltt/branches/poly/ltt/trace.h b/ltt/branches/poly/ltt/trace.h index 42fff96f..96931524 100644 --- a/ltt/branches/poly/ltt/trace.h +++ b/ltt/branches/poly/ltt/trace.h @@ -26,11 +26,18 @@ descriptions...). When a trace is closed, all the associated facilities, types and fields - are released as well. */ + are released as well. + + return value is NULL if there is an error when opening the trace. + + */ LttTrace *ltt_trace_open(const char *pathname); -/* copy reopens a trace */ +/* copy reopens a trace + * + * return value NULL if error while opening the trace + */ LttTrace *ltt_trace_copy(LttTrace *self); char * ltt_trace_name(LttTrace *t); @@ -78,13 +85,15 @@ unsigned ltt_trace_control_tracefile_number(LttTrace *t); unsigned ltt_trace_per_cpu_tracefile_number(LttTrace *t); -/* It is possible to search for the tracefiles by name or by CPU position. - The index within the tracefiles of the same type is returned if found - and a negative value otherwise. */ +/* It is possible to search for the tracefiles by name or by CPU tracefile + * name. + * The index within the tracefiles of the same type is returned if found + * and a negative value otherwise. + */ -int ltt_trace_control_tracefile_find(LttTrace *t, char *name); +int ltt_trace_control_tracefile_find(LttTrace *t, const gchar *name); -int ltt_trace_per_cpu_tracefile_find(LttTrace *t, unsigned i); +int ltt_trace_per_cpu_tracefile_find(LttTrace *t, const gchar *name); /* Get a specific tracefile */ @@ -120,7 +129,7 @@ void ltt_tracefile_seek_position(LttTracefile *t, /* Read the next event */ -LttEvent *ltt_tracefile_read(LttTracefile *t); +LttEvent *ltt_tracefile_read(LttTracefile *t, LttEvent *event); /* open tracefile */ @@ -128,12 +137,7 @@ 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); +gint ltt_tracefile_open_control(LttTrace *t, char * control_name); /* get the data type size and endian type of the local machine */ @@ -142,7 +146,7 @@ void getDataEndianType(LttArchSize * size, LttArchEndian * endian); /* get an integer number */ -int getIntNumber(int size1, void *evD); +gint64 getIntNumber(int size1, void *evD); /* get the node name of the system */ @@ -164,4 +168,11 @@ char * ltt_trace_system_description_description (LttSystemDescription * s); LttTime ltt_trace_system_description_trace_start_time(LttSystemDescription *s); +/* copy tracefile info over another. Used for sync. */ +LttTracefile *ltt_tracefile_new(); +void ltt_tracefile_destroy(LttTracefile *tf); +void ltt_tracefile_copy(LttTracefile *dest, const LttTracefile *src); + +void get_absolute_pathname(const char *pathname, char * abs_pathname); + #endif // TRACE_H