Update README with info about algorithms, glpk and more
[lttv.git] / lttv / lttv / state.h
index ad7f9e064693f59590e9629ff52261a2001dfad2..25d5a0623477297f4ba554ed63d159630d20d51d 100644 (file)
@@ -90,6 +90,7 @@ extern GQuark
     LTT_EVENT_SOFT_IRQ_ENTRY,
     LTT_EVENT_SOFT_IRQ_EXIT,
     LTT_EVENT_SCHED_SCHEDULE,
+    LTT_EVENT_SCHED_TRY_WAKEUP,
     LTT_EVENT_PROCESS_FORK,
     LTT_EVENT_KTHREAD_CREATE,
     LTT_EVENT_PROCESS_EXIT,
@@ -106,7 +107,10 @@ extern GQuark
     LTT_EVENT_SYS_CALL_TABLE,
     LTT_EVENT_SOFTIRQ_VEC,
     LTT_EVENT_KPROBE_TABLE,
-    LTT_EVENT_KPROBE;
+    LTT_EVENT_KPROBE,
+    LTT_EVENT_OPEN,
+    LTT_EVENT_READ,
+    LTT_EVENT_POLL_EVENT;
 
 /* Fields Quarks */
 
@@ -137,7 +141,10 @@ extern GQuark
     LTT_FIELD_ID,
     LTT_FIELD_ADDRESS,
     LTT_FIELD_SYMBOL,
-    LTT_FIELD_IP;
+    LTT_FIELD_IP,
+    LTT_FIELD_FD,
+    LTT_FIELD_STATE,
+    LTT_FIELD_CPU_ID;
 
 typedef struct _LttvTracesetState LttvTracesetState;
 typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
@@ -284,6 +291,7 @@ typedef struct _LttvProcessState {
   LttvProcessType type;        /* kernel thread or user space ? */
   guint target_pid; /* target PID of the current event. */
   guint free_events; /* 0 : none, 1 : free or exit dead, 2 : should delete */
+  GHashTable *fds; /* hash table of int (file descriptor) -> GQuark (file name) */
 } LttvProcessState;
 
 #define ANY_CPU 0 /* For clarity sake : a call to lttv_state_find_process for
@@ -355,6 +363,18 @@ typedef struct _LttvBdevState {
   GArray *mode_stack;
 } LttvBdevState;
 
+typedef struct _LttvNameTables {
+  GQuark *syscall_names;
+  guint nb_syscalls;
+  GQuark *trap_names;
+  guint nb_traps;
+  GQuark *irq_names;
+  guint nb_irqs;
+  GQuark *soft_irq_names;
+  guint nb_soft_irqs;
+  GHashTable *kprobe_hash;
+} LttvNameTables;
+
 struct _LttvTraceState {
   LttvTraceContext parent;
 
@@ -365,14 +385,7 @@ struct _LttvTraceState {
   guint nb_event, save_interval;
   /* Block/char devices, locks, memory pages... */
   GQuark *eventtype_names;
-  GQuark *syscall_names;
-  guint  nb_syscalls;
-  GQuark *trap_names;
-  guint  nb_traps;
-  guint  nb_irqs;
-  guint  nb_soft_irqs;
-  GQuark *irq_names;
-  GQuark *soft_irq_names;
+  LttvNameTables *name_tables;
   LttTime *max_time_state_recomputed_in_seek;
   GHashTable *kprobe_hash;
 
@@ -380,8 +393,11 @@ struct _LttvTraceState {
   LttvProcessState **running_process;
   gboolean has_precomputed_states;
   LttvCPUState *cpu_states; /* state of each cpu */
+  /* FIXME should be a g_array to deal with resize and copy. */
   LttvIRQState *irq_states; /* state of each irq handler */
+  /* FIXME should be a g_array to deal with resize and copy. */
   LttvSoftIRQState *soft_irq_states; /* state of each softirq */
+  /* FIXME should be a g_array to deal with resize and copy. */
   LttvTrapState *trap_states; /* state of each trap */
   GHashTable *bdev_states; /* state of the block devices */
 };
This page took 0.024527 seconds and 4 git commands to generate.