Added options to run different tests in module batchtest
[lttv.git] / ltt / branches / poly / include / lttv / processTrace.h
index e8505b5d8ba25bf0ca34909e207a250ece8148e7..6afff0ffca55ce34e8aee3b907054fedff220754 100644 (file)
@@ -1,3 +1,21 @@
+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 Michel Dagenais
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
+ * MA 02111-1307, USA.
+ */
+
 #ifndef PROCESSTRACE_H
 #define PROCESSTRACE_H
 
@@ -73,6 +91,7 @@ struct _LttvTracesetContext {
   LttvAttribute *a;
   LttvAttribute *ts_a;
   TimeInterval *Time_Span;
+  GTree *pqueue;
 };
 
 struct _LttvTracesetContextClass {
@@ -118,8 +137,7 @@ struct _LttvTraceContext {
   LttvHooks *check;
   LttvHooks *before;
   LttvHooks *after;
-  LttvTracefileContext **control_tracefiles;
-  LttvTracefileContext **per_cpu_tracefiles;
+  LttvTracefileContext **tracefiles;
   LttvAttribute *a;
   LttvAttribute *t_a;
 };
@@ -142,7 +160,7 @@ struct _LttvTracefileContext {
 
   LttvTraceContext *t_context;
   gboolean control;
-  guint index;                /* in ts_context->control/per_cpu_tracefiles */
+  guint index;                /* in ts_context->tracefiles */
   LttTracefile *tf;
   LttvHooks *check;
   LttvHooks *before;
@@ -163,8 +181,26 @@ struct _LttvTracefileContextClass {
 
 GType lttv_tracefile_context_get_type (void);
 
+/* Run through the events in a traceset in sorted order calling all the
+   hooks appropriately. It starts at the current time and runs until end or
+   nb_events are processed. */
+
 void lttv_process_traceset(LttvTracesetContext *self, LttTime end, 
-    unsigned maxNumEvents);
+    unsigned nb_events);
+
+/* Process traceset can also be done in smaller pieces calling begin, middle
+   repeatedly, and end. The middle function return the number of events 
+   processed. It may be larger than nb_events if several events have the 
+   same timestamp. It will be smaller than nb_events if the end time
+   is reached. */
+
+void lttv_process_traceset_begin(LttvTracesetContext *self, LttTime end);
+
+guint lttv_process_traceset_middle(LttvTracesetContext *self, LttTime end, 
+    unsigned nb_events);
+
+void lttv_process_traceset_end(LttvTracesetContext *self);
+
 
 void lttv_process_traceset_seek_time(LttvTracesetContext *self, LttTime start);
 
@@ -196,6 +232,40 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
     LttvHooks *before_event, 
     LttvHooks *after_event);
 
+void lttv_trace_context_add_hooks(LttvTraceContext *self,
+                                 LttvHooks *check_trace, 
+                                 LttvHooks *before_trace, 
+                                 LttvHooks *after_trace);
+
+void lttv_trace_context_remove_hooks(LttvTraceContext *self,
+                                    LttvHooks *check_trace, 
+                                    LttvHooks *before_trace, 
+                                    LttvHooks *after_trace);
+
+void lttv_tracefile_context_add_hooks(LttvTracefileContext *self,
+                                     LttvHooks *check_tracefile,
+                                     LttvHooks *before_tracefile,
+                                     LttvHooks *after_tracefile,
+                                     LttvHooks *check_event, 
+                                     LttvHooks *before_event, 
+                                     LttvHooks *after_event);
+
+void lttv_tracefile_context_remove_hooks(LttvTracefileContext *self,
+                                        LttvHooks *check_tracefile,
+                                        LttvHooks *before_tracefile,
+                                        LttvHooks *after_tracefile,
+                                        LttvHooks *check_event, 
+                                        LttvHooks *before_event, 
+                                        LttvHooks *after_event);
+
+void lttv_tracefile_context_add_hooks_by_id(LttvTracefileContext *self,
+                                           unsigned i,
+                                           LttvHooks *before_event_by_id, 
+                                           LttvHooks *after_event_by_id);
+
+void lttv_tracefile_context_remove_hooks_by_id(LttvTracefileContext *self,
+                                              unsigned i);
+
 typedef struct _LttvTraceHook {
   LttvHook h;
   guint id;
This page took 0.023755 seconds and 4 git commands to generate.