perf evlist: Use the right prefix for 'struct evlist' stats methods

perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/,
go on completing this split.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7b392ef0
......@@ -1847,7 +1847,7 @@ static void perf_sample__fprint_metric(struct perf_script *script,
u64 val;
if (!evsel->stats)
perf_evlist__alloc_stats(script->session->evlist, false);
evlist__alloc_stats(script->session->evlist, false);
if (evsel_script(evsel->leader)->gnum++ == 0)
perf_stat__reset_shadow_stats();
val = sample->period * evsel->scale;
......@@ -3308,7 +3308,7 @@ static int set_maps(struct perf_script *script)
perf_evlist__set_maps(&evlist->core, script->cpus, script->threads);
if (perf_evlist__alloc_stats(evlist, true))
if (evlist__alloc_stats(evlist, true))
return -ENOMEM;
script->allocated = true;
......@@ -3935,7 +3935,7 @@ int cmd_script(int argc, const char **argv)
zfree(&script.ptime_range);
}
perf_evlist__free_stats(session->evlist);
evlist__free_stats(session->evlist);
perf_session__delete(session);
if (script_started)
......
......@@ -270,7 +270,7 @@ static void perf_stat__reset_stats(void)
{
int i;
perf_evlist__reset_stats(evsel_list);
evlist__reset_stats(evsel_list);
perf_stat__reset_shadow_stats();
for (i = 0; i < stat_config.stats_num; i++)
......@@ -913,10 +913,10 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
update_stats(&walltime_nsecs_stats, t1 - t0);
if (stat_config.aggr_mode == AGGR_GLOBAL)
perf_evlist__save_aggr_prev_raw_counts(evsel_list);
evlist__save_aggr_prev_raw_counts(evsel_list);
perf_evlist__copy_prev_raw_counts(evsel_list);
perf_evlist__reset_prev_raw_counts(evsel_list);
evlist__copy_prev_raw_counts(evsel_list);
evlist__reset_prev_raw_counts(evsel_list);
runtime_stat_reset(&stat_config);
perf_stat__reset_shadow_per_stat(&rt_stat);
} else
......@@ -1907,7 +1907,7 @@ static int set_maps(struct perf_stat *st)
perf_evlist__set_maps(&evsel_list->core, st->cpus, st->threads);
if (perf_evlist__alloc_stats(evsel_list, true))
if (evlist__alloc_stats(evsel_list, true))
return -ENOMEM;
st->maps_allocated = true;
......@@ -2309,7 +2309,7 @@ int cmd_stat(int argc, const char **argv)
goto out;
}
if (perf_evlist__alloc_stats(evsel_list, interval))
if (evlist__alloc_stats(evsel_list, interval))
goto out;
if (perf_stat_init_aggr_mode())
......@@ -2349,7 +2349,7 @@ int cmd_stat(int argc, const char **argv)
run_idx + 1);
if (run_idx != 0)
perf_evlist__reset_prev_raw_counts(evsel_list);
evlist__reset_prev_raw_counts(evsel_list);
status = run_perf_stat(argc, argv, run_idx);
if (forever && status != -1 && !interval) {
......@@ -2400,7 +2400,7 @@ int cmd_stat(int argc, const char **argv)
}
perf_stat__exit_aggr_mode();
perf_evlist__free_stats(evsel_list);
evlist__free_stats(evsel_list);
out:
zfree(&stat_config.walltime_run);
......
......@@ -166,7 +166,7 @@ static int __compute_metric(const char *name, struct value *vals,
if (err)
goto out;
err = perf_evlist__alloc_stats(evlist, false);
err = evlist__alloc_stats(evlist, false);
if (err)
goto out;
......@@ -183,7 +183,7 @@ static int __compute_metric(const char *name, struct value *vals,
/* ... clenup. */
metricgroup__rblist_exit(&metric_events);
runtime_stat__exit(&st);
perf_evlist__free_stats(evlist);
evlist__free_stats(evlist);
perf_cpu_map__put(cpus);
evlist__delete(evlist);
return err;
......
......@@ -184,7 +184,7 @@ static int evsel__alloc_stats(struct evsel *evsel, bool alloc_raw)
return 0;
}
int perf_evlist__alloc_stats(struct evlist *evlist, bool alloc_raw)
int evlist__alloc_stats(struct evlist *evlist, bool alloc_raw)
{
struct evsel *evsel;
......@@ -196,11 +196,11 @@ int perf_evlist__alloc_stats(struct evlist *evlist, bool alloc_raw)
return 0;
out_free:
perf_evlist__free_stats(evlist);
evlist__free_stats(evlist);
return -1;
}
void perf_evlist__free_stats(struct evlist *evlist)
void evlist__free_stats(struct evlist *evlist)
{
struct evsel *evsel;
......@@ -211,7 +211,7 @@ void perf_evlist__free_stats(struct evlist *evlist)
}
}
void perf_evlist__reset_stats(struct evlist *evlist)
void evlist__reset_stats(struct evlist *evlist)
{
struct evsel *evsel;
......@@ -221,7 +221,7 @@ void perf_evlist__reset_stats(struct evlist *evlist)
}
}
void perf_evlist__reset_prev_raw_counts(struct evlist *evlist)
void evlist__reset_prev_raw_counts(struct evlist *evlist)
{
struct evsel *evsel;
......@@ -245,7 +245,7 @@ static void evsel__copy_prev_raw_counts(struct evsel *evsel)
evsel->counts->aggr = evsel->prev_raw_counts->aggr;
}
void perf_evlist__copy_prev_raw_counts(struct evlist *evlist)
void evlist__copy_prev_raw_counts(struct evlist *evlist)
{
struct evsel *evsel;
......@@ -253,7 +253,7 @@ void perf_evlist__copy_prev_raw_counts(struct evlist *evlist)
evsel__copy_prev_raw_counts(evsel);
}
void perf_evlist__save_aggr_prev_raw_counts(struct evlist *evlist)
void evlist__save_aggr_prev_raw_counts(struct evlist *evlist)
{
struct evsel *evsel;
......
......@@ -213,12 +213,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment