Update FSF address
[lttv.git] / lttv / lttv / stats.h
index f2eed92d553b1c821f66da8d8e4636e22b794ed7..a5aca18a81e2301d54e4d4542d8df91bf3ca0e77 100644 (file)
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA 02110-1301, USA.
  */
 
 #ifndef STATS_H
 #define STATS_H
 
+#error "stats not supported."
+
 #include <glib.h>
 #include <lttv/state.h>
 
 
  
 extern GQuark
-  LTTV_STATS_PROCESS_UNKNOWN,
-  LTTV_STATS_PROCESSES,
-  LTTV_STATS_CPU,
-  LTTV_STATS_MODE_TYPES,
-  LTTV_STATS_SUBMODES,
-  LTTV_STATS_FUNCTIONS,
-  LTTV_STATS_EVENT_TYPES,
-  LTTV_STATS_CPU_TIME,
-  LTTV_STATS_CUMULATIVE_CPU_TIME,
-  LTTV_STATS_ELAPSED_TIME,
-  LTTV_STATS_EVENTS,
-  LTTV_STATS_EVENTS_COUNT,
-  LTTV_STATS_BEFORE_HOOKS,
-  LTTV_STATS_AFTER_HOOKS;
+       LTTV_STATS_PROCESS_UNKNOWN,
+       LTTV_STATS_PROCESSES,
+       LTTV_STATS_CPU,
+       LTTV_STATS_MODE_TYPES,
+       LTTV_STATS_SUBMODES,
+       LTTV_STATS_FUNCTIONS,
+       LTTV_STATS_EVENT_TYPES,
+       LTTV_STATS_CPU_TIME,
+       LTTV_STATS_CUMULATIVE_CPU_TIME,
+       LTTV_STATS_ELAPSED_TIME,
+       LTTV_STATS_EVENTS,
+       LTTV_STATS_EVENTS_COUNT,
+       LTTV_STATS_BEFORE_HOOKS,
+       LTTV_STATS_AFTER_HOOKS;
 
 
 typedef struct _LttvTracesetStats LttvTracesetStats;
@@ -168,7 +170,7 @@ typedef struct _LttvTraceStatsClass LttvTraceStatsClass;
 typedef struct _LttvTracefileStats LttvTracefileStats;
 typedef struct _LttvTracefileStatsClass LttvTracefileStatsClass;
 
-
+typedef struct _LttvCPUStats LttvCPUStats;
 
 // Hook wrapper. call_data is a trace context.
 gboolean lttv_stats_hook_add_event_hooks(void *hook_data, void *call_data);
@@ -182,7 +184,7 @@ gboolean lttv_stats_sum_traceset_hook(void *hook_data, void *call_data);
 void lttv_stats_sum_traceset(LttvTracesetStats *self, LttTime current_time);
 
 void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
-  LttTime current_time);
+       LttTime current_time);
 
 /* Reset all statistics containers */
 void lttv_stats_reset(LttvTracesetStats *self);
@@ -199,17 +201,23 @@ void lttv_stats_reset(LttvTracesetStats *self);
 #define LTTV_TRACESET_STATS_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), LTTV_TRACESET_STATS_TYPE, LttvTracesetStatsClass))
 
 struct _LttvTracesetStats {
-  LttvTracesetState parent;
+       LttvTracesetState parent;
 
-  LttvAttribute *stats;
+       LttvAttribute *stats;
 };
 
 struct _LttvTracesetStatsClass {
-  LttvTracesetStateClass parent;
+       LttvTracesetStateClass parent;
 };
 
 GType lttv_traceset_stats_get_type (void);
 
+struct _LttvCPUStats {
+       LttvAttribute *current_events_tree;
+       LttvAttribute *current_event_types_tree;
+       LttvTraceStats *tcs;
+       guint cpu;
+};
 
 #define LTTV_TRACE_STATS_TYPE  (lttv_trace_stats_get_type ())
 #define LTTV_TRACE_STATS(obj)  (G_TYPE_CHECK_INSTANCE_CAST ((obj), LTTV_TRACE_STATS_TYPE, LttvTraceStats))
@@ -219,13 +227,14 @@ GType lttv_traceset_stats_get_type (void);
 #define LTTV_TRACE_STATS_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), LTTV_TRACE_STATS_TYPE, LttvTraceStatsClass))
 
 struct _LttvTraceStats {
-  LttvTraceState parent;
+       LttvTraceState parent;
 
-  LttvAttribute *stats;
+       LttvAttribute *stats;
+       LttvCPUStats *cpu_stats;        /* Array indexed by CPU */
 };
 
 struct _LttvTraceStatsClass {
-  LttvTraceStateClass parent;
+       LttvTraceStateClass parent;
 };
 
 GType lttv_trace_stats_get_type (void);
@@ -239,22 +248,20 @@ GType lttv_trace_stats_get_type (void);
 #define LTTV_TRACEFILE_STATS_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), LTTV_TRACEFILE_STATS_TYPE, LttvTracefileStatsClass))
 
 struct _LttvTracefileStats {
-  LttvTracefileState parent;
+       LttvTracefileState parent;
 
-  LttvAttribute *stats;
-  LttvAttribute *current_events_tree;
-  LttvAttribute *current_event_types_tree;
+       LttvCPUStats *cpu_stats;        /* "weak" reference */
 };
 
 struct _LttvTracefileStatsClass {
-  LttvTracefileStateClass parent;
+       LttvTracefileStateClass parent;
 };
 
 GType lttv_tracefile_stats_get_type (void);
 
 struct sum_traceset_closure {
-  LttvTracesetStats *tss;
-  LttTime current_time;
+       LttvTracesetStats *tss;
+       LttTime current_time;
 };
 
 
This page took 0.027256 seconds and 4 git commands to generate.