aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-stat.c10
-rw-r--r--tools/perf/util/evsel.h11
2 files changed, 11 insertions, 10 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index fcf99bdeb19e..3e1636cae76b 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -141,16 +141,6 @@ static inline void diff_timespec(struct timespec *r, struct timespec *a,
141 } 141 }
142} 142}
143 143
144static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
145{
146 return (evsel->cpus && !target.cpu_list) ? evsel->cpus : evsel_list->cpus;
147}
148
149static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
150{
151 return perf_evsel__cpus(evsel)->nr;
152}
153
154static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) 144static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
155{ 145{
156 int i; 146 int i;
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 9e16a5c4eb01..4dbf32d94dfb 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -8,6 +8,7 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include "xyarray.h" 9#include "xyarray.h"
10#include "symbol.h" 10#include "symbol.h"
11#include "cpumap.h"
11 12
12struct perf_counts_values { 13struct perf_counts_values {
13 union { 14 union {
@@ -114,6 +115,16 @@ struct thread_map;
114struct perf_evlist; 115struct perf_evlist;
115struct record_opts; 116struct record_opts;
116 117
118static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
119{
120 return evsel->cpus;
121}
122
123static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
124{
125 return perf_evsel__cpus(evsel)->nr;
126}
127
117void perf_counts_values__scale(struct perf_counts_values *count, 128void perf_counts_values__scale(struct perf_counts_values *count,
118 bool scale, s8 *pscaled); 129 bool scale, s8 *pscaled);
119 130