diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 14:23:51 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-30 00:34:42 +0300 |
commit | 32dcd021d004038ca12ac17319da5aa4756e9312 (patch) | |
tree | 8b7ddd4ff8daacea1ce31b56b9ef689317be1386 /tools/perf/util/stat.c | |
parent | 9749b90e566ca1a235fc8e2118f99c5690969342 (diff) | |
download | linux-32dcd021d004038ca12ac17319da5aa4756e9312.tar.xz |
perf evsel: Rename struct perf_evsel to struct evsel
Rename struct perf_evsel to struct evsel, so we don't have a name clash
when we add struct perf_evsel in libperf.
Committer notes:
Added fixes for arm64, provided by Jiri.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat.c')
-rw-r--r-- | tools/perf/util/stat.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 62791c063f7a..7acb9a6730fe 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -68,7 +68,7 @@ double rel_stddev_stats(double stddev, double avg) return pct; } -bool __perf_evsel_stat__is(struct perf_evsel *evsel, +bool __perf_evsel_stat__is(struct evsel *evsel, enum perf_stat_evsel_id id) { struct perf_stat_evsel *ps = evsel->stats; @@ -93,7 +93,7 @@ static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = { }; #undef ID -static void perf_stat_evsel_id_init(struct perf_evsel *evsel) +static void perf_stat_evsel_id_init(struct evsel *evsel) { struct perf_stat_evsel *ps = evsel->stats; int i; @@ -108,7 +108,7 @@ static void perf_stat_evsel_id_init(struct perf_evsel *evsel) } } -static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) +static void perf_evsel__reset_stat_priv(struct evsel *evsel) { int i; struct perf_stat_evsel *ps = evsel->stats; @@ -119,7 +119,7 @@ static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) perf_stat_evsel_id_init(evsel); } -static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) +static int perf_evsel__alloc_stat_priv(struct evsel *evsel) { evsel->stats = zalloc(sizeof(struct perf_stat_evsel)); if (evsel->stats == NULL) @@ -128,7 +128,7 @@ static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) return 0; } -static void perf_evsel__free_stat_priv(struct perf_evsel *evsel) +static void perf_evsel__free_stat_priv(struct evsel *evsel) { struct perf_stat_evsel *ps = evsel->stats; @@ -137,7 +137,7 @@ static void perf_evsel__free_stat_priv(struct perf_evsel *evsel) zfree(&evsel->stats); } -static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel, +static int perf_evsel__alloc_prev_raw_counts(struct evsel *evsel, int ncpus, int nthreads) { struct perf_counts *counts; @@ -149,13 +149,13 @@ static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel, return counts ? 0 : -ENOMEM; } -static void perf_evsel__free_prev_raw_counts(struct perf_evsel *evsel) +static void perf_evsel__free_prev_raw_counts(struct evsel *evsel) { perf_counts__delete(evsel->prev_raw_counts); evsel->prev_raw_counts = NULL; } -static int perf_evsel__alloc_stats(struct perf_evsel *evsel, bool alloc_raw) +static int perf_evsel__alloc_stats(struct evsel *evsel, bool alloc_raw) { int ncpus = perf_evsel__nr_cpus(evsel); int nthreads = thread_map__nr(evsel->threads); @@ -170,7 +170,7 @@ static int perf_evsel__alloc_stats(struct perf_evsel *evsel, bool alloc_raw) int perf_evlist__alloc_stats(struct perf_evlist *evlist, bool alloc_raw) { - struct perf_evsel *evsel; + struct evsel *evsel; evlist__for_each_entry(evlist, evsel) { if (perf_evsel__alloc_stats(evsel, alloc_raw)) @@ -186,7 +186,7 @@ out_free: void perf_evlist__free_stats(struct perf_evlist *evlist) { - struct perf_evsel *evsel; + struct evsel *evsel; evlist__for_each_entry(evlist, evsel) { perf_evsel__free_stat_priv(evsel); @@ -197,7 +197,7 @@ void perf_evlist__free_stats(struct perf_evlist *evlist) void perf_evlist__reset_stats(struct perf_evlist *evlist) { - struct perf_evsel *evsel; + struct evsel *evsel; evlist__for_each_entry(evlist, evsel) { perf_evsel__reset_stat_priv(evsel); @@ -205,13 +205,13 @@ void perf_evlist__reset_stats(struct perf_evlist *evlist) } } -static void zero_per_pkg(struct perf_evsel *counter) +static void zero_per_pkg(struct evsel *counter) { if (counter->per_pkg_mask) memset(counter->per_pkg_mask, 0, MAX_NR_CPUS); } -static int check_per_pkg(struct perf_evsel *counter, +static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals, int cpu, bool *skip) { unsigned long *mask = counter->per_pkg_mask; @@ -254,7 +254,7 @@ static int check_per_pkg(struct perf_evsel *counter, } static int -process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel, +process_counter_values(struct perf_stat_config *config, struct evsel *evsel, int cpu, int thread, struct perf_counts_values *count) { @@ -306,7 +306,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel } static int process_counter_maps(struct perf_stat_config *config, - struct perf_evsel *counter) + struct evsel *counter) { int nthreads = thread_map__nr(counter->threads); int ncpus = perf_evsel__nr_cpus(counter); @@ -327,7 +327,7 @@ static int process_counter_maps(struct perf_stat_config *config, } int perf_stat_process_counter(struct perf_stat_config *config, - struct perf_evsel *counter) + struct evsel *counter) { struct perf_counts_values *aggr = &counter->counts->aggr; struct perf_stat_evsel *ps = counter->stats; @@ -381,7 +381,7 @@ int perf_event__process_stat_event(struct perf_session *session, { struct perf_counts_values count; struct stat_event *st = &event->stat; - struct perf_evsel *counter; + struct evsel *counter; count.val = st->val; count.ena = st->ena; @@ -437,12 +437,12 @@ size_t perf_event__fprintf_stat_config(union perf_event *event, FILE *fp) return ret; } -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) { struct perf_event_attr *attr = &evsel->attr; - struct perf_evsel *leader = evsel->leader; + struct evsel *leader = evsel->leader; attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED | PERF_FORMAT_TOTAL_TIME_RUNNING; |