perf stat: Replace aggregation ID with a struct
[linux-2.6-microblaze.git] / tools / perf / util / stat.h
index 487010c..87522ff 100644 (file)
@@ -6,6 +6,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/resource.h>
+#include "cpumap.h"
 #include "rblist.h"
 
 struct perf_cpu_map;
@@ -99,7 +100,7 @@ struct runtime_stat {
        struct rblist value_list;
 };
 
-typedef int (*aggr_get_id_t)(struct perf_stat_config *config,
+typedef struct aggr_cpu_id (*aggr_get_id_t)(struct perf_stat_config *config,
                             struct perf_cpu_map *m, int cpu);
 
 struct perf_stat_config {
@@ -122,6 +123,7 @@ struct perf_stat_config {
        bool                     metric_no_group;
        bool                     metric_no_merge;
        bool                     stop_read_counter;
+       bool                     quiet;
        FILE                    *output;
        unsigned int             interval;
        unsigned int             timeout;
@@ -169,7 +171,7 @@ struct evlist;
 
 struct perf_aggr_thread_value {
        struct evsel *counter;
-       int id;
+       struct aggr_cpu_id id;
        double uval;
        u64 val;
        u64 run;
@@ -212,12 +214,12 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
                                   struct runtime_stat *st);
 void perf_stat__collect_metric_expr(struct evlist *);
 
-int perf_evlist__alloc_stats(struct evlist *evlist, bool alloc_raw);
-void perf_evlist__free_stats(struct evlist *evlist);
-void perf_evlist__reset_stats(struct evlist *evlist);
-void perf_evlist__reset_prev_raw_counts(struct evlist *evlist);
-void perf_evlist__copy_prev_raw_counts(struct evlist *evlist);
-void perf_evlist__save_aggr_prev_raw_counts(struct evlist *evlist);
+int evlist__alloc_stats(struct evlist *evlist, bool alloc_raw);
+void evlist__free_stats(struct evlist *evlist);
+void evlist__reset_stats(struct evlist *evlist);
+void evlist__reset_prev_raw_counts(struct evlist *evlist);
+void evlist__copy_prev_raw_counts(struct evlist *evlist);
+void evlist__save_aggr_prev_raw_counts(struct evlist *evlist);
 
 int perf_stat_process_counter(struct perf_stat_config *config,
                              struct evsel *counter);
@@ -237,12 +239,8 @@ int create_perf_stat_counter(struct evsel *evsel,
                             struct perf_stat_config *config,
                             struct target *target,
                             int cpu);
-void
-perf_evlist__print_counters(struct evlist *evlist,
-                           struct perf_stat_config *config,
-                           struct target *_target,
-                           struct timespec *ts,
-                           int argc, const char **argv);
+void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *config,
+                           struct target *_target, struct timespec *ts, int argc, const char **argv);
 
 struct metric_expr;
 double test_generic_metric(struct metric_expr *mexp, int cpu, struct runtime_stat *st);