Add copyright notices and some comments about status and TODO
[lttv.git] / ltt / branches / poly / include / ltt / trace.h
index be0311fb446af57fd3ec3960854f9a2745f4d0e1..2b3f8533ba6488494f7ae3fd88ec2aa0ed67975c 100644 (file)
@@ -1,5 +1,23 @@
-#ifndef TRACEFILE_H
-#define TRACEFILE_H
+/* This file is part of the Linux Trace Toolkit trace reading library
+ * Copyright (C) 2003-2004 Michel Dagenais
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License Version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef TRACE_H
+#define TRACE_H
 
 #include <ltt/ltt.h>
 
    When a trace is closed, all the associated facilities, types and fields
    are released as well. */
 
-LttTrace *ltt_trace_open(char *pathname);
+LttTrace *ltt_trace_open(const char *pathname);
+
+/* copy reopens a trace */
+LttTrace *ltt_trace_copy(LttTrace *self);
+
+char * ltt_trace_name(LttTrace *t);
 
 void ltt_trace_close(LttTrace *t); 
 
 
-/* The characteristics of the system on which the trace was obtained
-   is described in a LttSystemDescription structure. */
-
-typedef struct _LttSystemDescription {
-  char *description;
-  char *node_name;
-  char *domainname;
-  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;
-
-LttSystemDescription *ltt_trace_system_description(LttTrace *t)
+LttSystemDescription *ltt_trace_system_description(LttTrace *t);
 
 
 /* Functions to discover the facilities in the trace. Once the number
@@ -51,6 +50,7 @@ unsigned ltt_trace_facility_number(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
@@ -94,18 +94,74 @@ LttTracefile *ltt_trace_control_tracefile_get(LttTrace *t, unsigned i);
 LttTracefile *ltt_trace_per_cpu_tracefile_get(LttTrace *t, unsigned i);
 
 
+/* Get the start time and end time of the trace */
+
+void ltt_trace_time_span_get(LttTrace *t, LttTime *start, LttTime *end);
+
+
 /* Get the name of a tracefile */
 
 char *ltt_tracefile_name(LttTracefile *tf);
 
 
+/* Get the number of blocks in the tracefile */
+
+unsigned ltt_tracefile_block_number(LttTracefile *tf);
+
+
 /* Seek to the first event of the trace with time larger or equal to time */
 
 void ltt_tracefile_seek_time(LttTracefile *t, LttTime time);
 
+/* Seek to the first event with position equal or larger to ep */
+
+void ltt_tracefile_seek_position(LttTracefile *t,
+    LttEventPosition *ep);
 
 /* Read the next event */
 
 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
This page took 0.029133 seconds and 4 git commands to generate.