diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-04-30 11:00:53 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-05-05 16:35:31 -0300 |
commit | ea089692733a53ddbe8f4e46d06113c6ca723727 (patch) | |
tree | 087d7035b51e85bb2374d8b3bf062cf61afb2c57 /tools/perf/util | |
parent | 53fcfa6b8efe0efdb32236ed75c8c2fdc3aa65d2 (diff) |
perf evsel: Rename *perf_evsel__read*() to *evsel__read()
As those are 'struct evsel' methods, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/evsel.c | 17 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 19 | ||||
-rw-r--r-- | tools/perf/util/record.c | 5 |
3 files changed, 17 insertions, 24 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index ded511c8def3..a11d1359ba81 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1317,8 +1317,7 @@ void perf_counts_values__scale(struct perf_counts_values *count, *pscaled = scaled; } -static int -perf_evsel__read_one(struct evsel *evsel, int cpu, int thread) +static int evsel__read_one(struct evsel *evsel, int cpu, int thread) { struct perf_counts_values *count = perf_counts(evsel->counts, cpu, thread); @@ -1378,8 +1377,7 @@ perf_evsel__process_group_data(struct evsel *leader, return 0; } -static int -perf_evsel__read_group(struct evsel *leader, int cpu, int thread) +static int evsel__read_group(struct evsel *leader, int cpu, int thread) { struct perf_stat_evsel *ps = leader->stats; u64 read_format = leader->core.attr.read_format; @@ -1409,18 +1407,17 @@ perf_evsel__read_group(struct evsel *leader, int cpu, int thread) return perf_evsel__process_group_data(leader, cpu, thread, data); } -int perf_evsel__read_counter(struct evsel *evsel, int cpu, int thread) +int evsel__read_counter(struct evsel *evsel, int cpu, int thread) { u64 read_format = evsel->core.attr.read_format; if (read_format & PERF_FORMAT_GROUP) - return perf_evsel__read_group(evsel, cpu, thread); - else - return perf_evsel__read_one(evsel, cpu, thread); + return evsel__read_group(evsel, cpu, thread); + + return evsel__read_one(evsel, cpu, thread); } -int __perf_evsel__read_on_cpu(struct evsel *evsel, - int cpu, int thread, bool scale) +int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale) { struct perf_counts_values count; size_t nv = scale ? 3 : 1; diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 8d61109087a1..a87de95a66c8 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -265,35 +265,32 @@ static inline bool evsel__match2(struct evsel *e1, struct evsel *e2) (e1->core.attr.config == e2->core.attr.config); } -int perf_evsel__read_counter(struct evsel *evsel, int cpu, int thread); +int evsel__read_counter(struct evsel *evsel, int cpu, int thread); -int __perf_evsel__read_on_cpu(struct evsel *evsel, - int cpu, int thread, bool scale); +int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale); /** - * perf_evsel__read_on_cpu - Read out the results on a CPU and thread + * evsel__read_on_cpu - Read out the results on a CPU and thread * * @evsel - event selector to read value * @cpu - CPU of interest * @thread - thread of interest */ -static inline int perf_evsel__read_on_cpu(struct evsel *evsel, - int cpu, int thread) +static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread) { - return __perf_evsel__read_on_cpu(evsel, cpu, thread, false); + return __evsel__read_on_cpu(evsel, cpu, thread, false); } /** - * perf_evsel__read_on_cpu_scaled - Read out the results on a CPU and thread, scaled + * evsel__read_on_cpu_scaled - Read out the results on a CPU and thread, scaled * * @evsel - event selector to read value * @cpu - CPU of interest * @thread - thread of interest */ -static inline int perf_evsel__read_on_cpu_scaled(struct evsel *evsel, - int cpu, int thread) +static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int thread) { - return __perf_evsel__read_on_cpu(evsel, cpu, thread, true); + return __evsel__read_on_cpu(evsel, cpu, thread, true); } int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event, diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c index d297f4de253c..a4cc11592f6b 100644 --- a/tools/perf/util/record.c +++ b/tools/perf/util/record.c @@ -19,8 +19,7 @@ * However, if the leader is an AUX area event, then assume the event to sample * is the next event. */ -static struct evsel *perf_evsel__read_sampler(struct evsel *evsel, - struct evlist *evlist) +static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) { struct evsel *leader = evsel->leader; @@ -43,7 +42,7 @@ static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *ev if (!leader->sample_read) return; - read_sampler = perf_evsel__read_sampler(evsel, evlist); + read_sampler = evsel__read_sampler(evsel, evlist); if (evsel == read_sampler) return; |