resourceview: add softirq resource
[lttv.git] / ltt / branches / poly / lttv / lttv / state.h
index 75d1370687ad5abb2ee44a35fef48033329f9406..c71049a82d63ffc713aae7ece2f8f09d728239ee 100644 (file)
@@ -114,8 +114,7 @@ extern GQuark
     LTT_FIELD_MINOR,
     LTT_FIELD_MAJOR,
     LTT_FIELD_OPERATION,
-    LTT_FIELD_ACTION,
-    LTT_FIELD_NUM;
+    LTT_FIELD_ACTION;
 
 typedef struct _LttvTracesetState LttvTracesetState;
 typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
@@ -310,12 +309,17 @@ GType lttv_traceset_state_get_type (void);
 typedef struct _LttvCPUState {
   GArray *mode_stack;
   guint last_irq;
+  guint last_soft_irq;
 } LttvCPUState;
 
 typedef struct _LttvIRQState {
   GArray *mode_stack;
 } LttvIRQState;
 
+typedef struct _LttvSoftIRQState {
+  guint running; /* number of times it is currently running (on different processors) */
+} LttvSoftIRQState;
+
 typedef struct _LttvBdevState {
   GArray *mode_stack;
 } LttvBdevState;
@@ -335,7 +339,7 @@ struct _LttvTraceState {
   GQuark *trap_names;
   guint  nb_traps;
   guint  nb_irqs;
-  guint  nb_softirqs;
+  guint  nb_soft_irqs;
   GQuark *irq_names;
   GQuark *soft_irq_names;
   LttTime *max_time_state_recomputed_in_seek;
@@ -345,6 +349,7 @@ struct _LttvTraceState {
   gboolean has_precomputed_states;
   LttvCPUState *cpu_states; /* state of each cpu */
   LttvIRQState *irq_states; /* state of each irq handler */
+  LttvSoftIRQState *soft_irq_states; /* state of each softirq */
   GHashTable *bdev_states; /* state of the block devices */
 };
 
@@ -412,6 +417,11 @@ static inline guint lttv_state_get_target_pid(LttvTracefileState *tfs)
 #define HDR_QUARKS 9
 #define HDR_QUARK 10
 
-#define MKDEV(ma,mi)    ((ma)<<8 | (mi))
+/* Device number manipulation macros from kernel source */
+#define MINORBITS      20
+#define MINORMASK      ((1U << MINORBITS) - 1)
+#define MAJOR(dev)     ((unsigned int) ((dev) >> MINORBITS))
+#define MINOR(dev)     ((unsigned int) ((dev) & MINORMASK))
+#define MKDEV(ma,mi)   (((ma) << MINORBITS) | (mi))
 
 #endif // STATE_H
This page took 0.024433 seconds and 4 git commands to generate.