*
* 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;
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);
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);
#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))
#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);
#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;
};