diff options
Diffstat (limited to 'tools/perf/util/stat.h')
-rw-r--r-- | tools/perf/util/stat.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h index 7032dd1eeac2..14fe3e548229 100644 --- a/tools/perf/util/stat.h +++ b/tools/perf/util/stat.h @@ -5,14 +5,12 @@ #include <linux/types.h> #include <stdio.h> #include <sys/types.h> -#include <sys/time.h> #include <sys/resource.h> -#include <sys/wait.h> -#include "xyarray.h" #include "rblist.h" -#include "perf.h" #include "event.h" +struct timespec; + struct stats { double n, mean, M2; u64 max, min; @@ -92,7 +90,7 @@ struct runtime_stat { }; typedef int (*aggr_get_id_t)(struct perf_stat_config *config, - struct cpu_map *m, int cpu); + struct perf_cpu_map *m, int cpu); struct perf_stat_config { enum aggr_mode aggr_mode; @@ -122,9 +120,9 @@ struct perf_stat_config { const char *csv_sep; struct stats *walltime_nsecs_stats; struct rusage ru_data; - struct cpu_map *aggr_map; + struct perf_cpu_map *aggr_map; aggr_get_id_t aggr_get_id; - struct cpu_map *cpus_aggr_map; + struct perf_cpu_map *cpus_aggr_map; u64 *walltime_run; struct rblist metric_events; }; @@ -143,11 +141,11 @@ static inline void init_stats(struct stats *stats) stats->max = 0; } -struct perf_evsel; -struct perf_evlist; +struct evsel; +struct evlist; struct perf_aggr_thread_value { - struct perf_evsel *counter; + struct evsel *counter; int id; double uval; u64 val; @@ -155,7 +153,7 @@ struct perf_aggr_thread_value { u64 ena; }; -bool __perf_evsel_stat__is(struct perf_evsel *evsel, +bool __perf_evsel_stat__is(struct evsel *evsel, enum perf_stat_evsel_id id); #define perf_stat_evsel__is(evsel, id) \ @@ -174,7 +172,7 @@ void runtime_stat__exit(struct runtime_stat *st); void perf_stat__init_shadow_stats(void); void perf_stat__reset_shadow_stats(void); void perf_stat__reset_shadow_per_stat(struct runtime_stat *st); -void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 count, +void perf_stat__update_shadow_stats(struct evsel *counter, u64 count, int cpu, struct runtime_stat *st); struct perf_stat_output_ctx { void *ctx; @@ -184,22 +182,24 @@ struct perf_stat_output_ctx { }; void perf_stat__print_shadow_stats(struct perf_stat_config *config, - struct perf_evsel *evsel, + struct evsel *evsel, double avg, int cpu, struct perf_stat_output_ctx *out, struct rblist *metric_events, struct runtime_stat *st); -void perf_stat__collect_metric_expr(struct perf_evlist *); +void perf_stat__collect_metric_expr(struct evlist *); -int perf_evlist__alloc_stats(struct perf_evlist *evlist, bool alloc_raw); -void perf_evlist__free_stats(struct perf_evlist *evlist); -void perf_evlist__reset_stats(struct perf_evlist *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); int perf_stat_process_counter(struct perf_stat_config *config, - struct perf_evsel *counter); + struct evsel *counter); struct perf_tool; union perf_event; struct perf_session; +struct target; + int perf_event__process_stat_event(struct perf_session *session, union perf_event *event); @@ -207,16 +207,16 @@ size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp); size_t perf_event__fprintf_stat_round(union perf_event *event, FILE *fp); size_t perf_event__fprintf_stat_config(union perf_event *event, FILE *fp); -int create_perf_stat_counter(struct perf_evsel *evsel, +int create_perf_stat_counter(struct evsel *evsel, struct perf_stat_config *config, struct target *target); int perf_stat_synthesize_config(struct perf_stat_config *config, struct perf_tool *tool, - struct perf_evlist *evlist, + struct evlist *evlist, perf_event__handler_t process, bool attrs); void -perf_evlist__print_counters(struct perf_evlist *evlist, +perf_evlist__print_counters(struct evlist *evlist, struct perf_stat_config *config, struct target *_target, struct timespec *ts, |