Adds wall time field to events
[lttv.git] / lttv / lttv / sync / data_structures.h
index 765967ffda75d2e018906fc6b9cd5d3d638c55dd..1f70ade4877a82ae782bfe4695d16d7375895683 100644 (file)
 
 #include <ltt/ltt.h>
 
+
+enum Direction
+{
+       OUT,
+       IN,
+};
+
+enum EventType
+{
+       TCP,
+       UDP,
+       TYPE_COUNT // This must be the last field
+};
+
 // Stage 1 to 2: These structures are passed from processing to matching modules
 // TCP events
 typedef struct
@@ -43,19 +57,6 @@ typedef struct
        uint8_t ack, rst, syn, fin;
 } SegmentKey;
 
-enum Direction
-{
-       OUT,
-       IN,
-};
-
-enum EventType
-{
-       TCP,
-       UDP,
-       TYPE_COUNT,
-};
-
 typedef struct
 {
        enum Direction direction;
@@ -78,10 +79,17 @@ typedef struct
        bool unicast;
 } UDPEvent;
 
+typedef struct
+{
+       uint32_t seconds;
+       uint32_t nanosec;
+} WallTime;
+
 typedef struct _Event
 {
        unsigned long traceNum;
-       uint64_t time;
+       uint64_t cpuTime;
+       WallTime wallTime;
 
        // specific event structures and functions could be in separate files and
        // type could be an int
@@ -134,12 +142,18 @@ void gdnConnectionKeyDestroy(gpointer data);
 guint ghfSegmentKeyHash(gconstpointer key);
 gboolean gefSegmentKeyEqual(gconstpointer a, gconstpointer b);
 
+// DatagramKey-related functions
+guint ghfDatagramKeyHash(gconstpointer key);
+gboolean gefDatagramKeyEqual(gconstpointer a, gconstpointer b);
+void gdnDestroyDatagramKey(gpointer data);
+
 // Event-related functions
 void gdnDestroyEvent(gpointer data);
 void destroyEvent(Event* const event);
 void destroyTCPEvent(Event* const event);
 void destroyUDPEvent(Event* const event);
 void gfDestroyEvent(gpointer data, gpointer user_data);
+double wallTimeSub(const WallTime const* tA, const WallTime const* tB);
 
 // Message-related functions
 void printTCPSegment(const Message* const segment);
This page took 0.023663 seconds and 4 git commands to generate.