perf evsel: Rename perf_evsel__nr_cpus() to evsel__nr_cpus()
As it is a 'struct evsel' method, 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>
This commit is contained in:
@@ -1977,7 +1977,7 @@ static struct scripting_ops *scripting_ops;
|
|||||||
static void __process_stat(struct evsel *counter, u64 tstamp)
|
static void __process_stat(struct evsel *counter, u64 tstamp)
|
||||||
{
|
{
|
||||||
int nthreads = perf_thread_map__nr(counter->core.threads);
|
int nthreads = perf_thread_map__nr(counter->core.threads);
|
||||||
int ncpus = perf_evsel__nr_cpus(counter);
|
int ncpus = evsel__nr_cpus(counter);
|
||||||
int cpu, thread;
|
int cpu, thread;
|
||||||
static int header_printed;
|
static int header_printed;
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ static inline struct perf_cpu_map *evsel__cpus(struct evsel *evsel)
|
|||||||
return perf_evsel__cpus(&evsel->core);
|
return perf_evsel__cpus(&evsel->core);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int perf_evsel__nr_cpus(struct evsel *evsel)
|
static inline int evsel__nr_cpus(struct evsel *evsel)
|
||||||
{
|
{
|
||||||
return evsel__cpus(evsel)->nr;
|
return evsel__cpus(evsel)->nr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ static int first_shadow_cpu(struct perf_stat_config *config,
|
|||||||
if (config->aggr_mode == AGGR_GLOBAL)
|
if (config->aggr_mode == AGGR_GLOBAL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < perf_evsel__nr_cpus(evsel); i++) {
|
for (i = 0; i < evsel__nr_cpus(evsel); i++) {
|
||||||
int cpu2 = evsel__cpus(evsel)->map[i];
|
int cpu2 = evsel__cpus(evsel)->map[i];
|
||||||
|
|
||||||
if (config->aggr_get_id(config, evlist->core.cpus, cpu2) == id)
|
if (config->aggr_get_id(config, evlist->core.cpus, cpu2) == id)
|
||||||
@@ -508,7 +508,7 @@ static void aggr_update_shadow(struct perf_stat_config *config,
|
|||||||
id = config->aggr_map->map[s];
|
id = config->aggr_map->map[s];
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
val = 0;
|
val = 0;
|
||||||
for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
|
for (cpu = 0; cpu < evsel__nr_cpus(counter); cpu++) {
|
||||||
s2 = config->aggr_get_id(config, evlist->core.cpus, cpu);
|
s2 = config->aggr_get_id(config, evlist->core.cpus, cpu);
|
||||||
if (s2 != id)
|
if (s2 != id)
|
||||||
continue;
|
continue;
|
||||||
@@ -599,7 +599,7 @@ static void aggr_cb(struct perf_stat_config *config,
|
|||||||
struct aggr_data *ad = data;
|
struct aggr_data *ad = data;
|
||||||
int cpu, s2;
|
int cpu, s2;
|
||||||
|
|
||||||
for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
|
for (cpu = 0; cpu < evsel__nr_cpus(counter); cpu++) {
|
||||||
struct perf_counts_values *counts;
|
struct perf_counts_values *counts;
|
||||||
|
|
||||||
s2 = config->aggr_get_id(config, evsel__cpus(counter), cpu);
|
s2 = config->aggr_get_id(config, evsel__cpus(counter), cpu);
|
||||||
@@ -847,7 +847,7 @@ static void print_counter(struct perf_stat_config *config,
|
|||||||
double uval;
|
double uval;
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
|
for (cpu = 0; cpu < evsel__nr_cpus(counter); cpu++) {
|
||||||
struct aggr_data ad = { .cpu = cpu };
|
struct aggr_data ad = { .cpu = cpu };
|
||||||
|
|
||||||
if (!collect_data(config, counter, counter_cb, &ad))
|
if (!collect_data(config, counter, counter_cb, &ad))
|
||||||
@@ -1148,7 +1148,7 @@ static void print_percore_thread(struct perf_stat_config *config,
|
|||||||
int s, s2, id;
|
int s, s2, id;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
for (int i = 0; i < perf_evsel__nr_cpus(counter); i++) {
|
for (int i = 0; i < evsel__nr_cpus(counter); i++) {
|
||||||
s2 = config->aggr_get_id(config, evsel__cpus(counter), i);
|
s2 = config->aggr_get_id(config, evsel__cpus(counter), i);
|
||||||
for (s = 0; s < config->aggr_map->nr; s++) {
|
for (s = 0; s < config->aggr_map->nr; s++) {
|
||||||
id = config->aggr_map->map[s];
|
id = config->aggr_map->map[s];
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ static void perf_evsel__reset_prev_raw_counts(struct evsel *evsel)
|
|||||||
|
|
||||||
static int perf_evsel__alloc_stats(struct 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 ncpus = evsel__nr_cpus(evsel);
|
||||||
int nthreads = perf_thread_map__nr(evsel->core.threads);
|
int nthreads = perf_thread_map__nr(evsel->core.threads);
|
||||||
|
|
||||||
if (perf_evsel__alloc_stat_priv(evsel) < 0 ||
|
if (perf_evsel__alloc_stat_priv(evsel) < 0 ||
|
||||||
@@ -334,7 +334,7 @@ static int process_counter_maps(struct perf_stat_config *config,
|
|||||||
struct evsel *counter)
|
struct evsel *counter)
|
||||||
{
|
{
|
||||||
int nthreads = perf_thread_map__nr(counter->core.threads);
|
int nthreads = perf_thread_map__nr(counter->core.threads);
|
||||||
int ncpus = perf_evsel__nr_cpus(counter);
|
int ncpus = evsel__nr_cpus(counter);
|
||||||
int cpu, thread;
|
int cpu, thread;
|
||||||
|
|
||||||
if (counter->core.system_wide)
|
if (counter->core.system_wide)
|
||||||
|
|||||||
Reference in New Issue
Block a user