Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+25 -32
+2 -2
tools/perf/builtin-stat.c
··· 259 259 count->val = val; 260 260 return 0; 261 261 } 262 - return perf_evsel__read_counter(counter, cpu, thread); 262 + return evsel__read_counter(counter, cpu, thread); 263 263 } 264 264 265 265 /* ··· 284 284 285 285 /* 286 286 * The leader's group read loads data into its group members 287 - * (via perf_evsel__read_counter()) and sets their count->loaded. 287 + * (via evsel__read_counter()) and sets their count->loaded. 288 288 */ 289 289 if (!perf_counts__is_loaded(counter->counts, cpu, thread) && 290 290 read_single_counter(counter, cpu, thread, rs)) {
+3 -3
tools/perf/tests/openat-syscall-all-cpus.c
··· 103 103 if (cpus->map[cpu] >= CPU_SETSIZE) 104 104 continue; 105 105 106 - if (perf_evsel__read_on_cpu(evsel, cpu, 0) < 0) { 107 - pr_debug("perf_evsel__read_on_cpu\n"); 106 + if (evsel__read_on_cpu(evsel, cpu, 0) < 0) { 107 + pr_debug("evsel__read_on_cpu\n"); 108 108 err = -1; 109 109 break; 110 110 } 111 111 112 112 expected = nr_openat_calls + cpu; 113 113 if (perf_counts(evsel->counts, cpu, 0)->val != expected) { 114 - pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n", 114 + pr_debug("evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n", 115 115 expected, cpus->map[cpu], perf_counts(evsel->counts, cpu, 0)->val); 116 116 err = -1; 117 117 }
+3 -3
tools/perf/tests/openat-syscall.c
··· 46 46 close(fd); 47 47 } 48 48 49 - if (perf_evsel__read_on_cpu(evsel, 0, 0) < 0) { 50 - pr_debug("perf_evsel__read_on_cpu\n"); 49 + if (evsel__read_on_cpu(evsel, 0, 0) < 0) { 50 + pr_debug("evsel__read_on_cpu\n"); 51 51 goto out_close_fd; 52 52 } 53 53 54 54 if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) { 55 - pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n", 55 + pr_debug("evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n", 56 56 nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val); 57 57 goto out_close_fd; 58 58 }
+7 -10
tools/perf/util/evsel.c
··· 1317 1317 *pscaled = scaled; 1318 1318 } 1319 1319 1320 - static int 1321 - perf_evsel__read_one(struct evsel *evsel, int cpu, int thread) 1320 + static int evsel__read_one(struct evsel *evsel, int cpu, int thread) 1322 1321 { 1323 1322 struct perf_counts_values *count = perf_counts(evsel->counts, cpu, thread); 1324 1323 ··· 1377 1378 return 0; 1378 1379 } 1379 1380 1380 - static int 1381 - perf_evsel__read_group(struct evsel *leader, int cpu, int thread) 1381 + static int evsel__read_group(struct evsel *leader, int cpu, int thread) 1382 1382 { 1383 1383 struct perf_stat_evsel *ps = leader->stats; 1384 1384 u64 read_format = leader->core.attr.read_format; ··· 1407 1409 return perf_evsel__process_group_data(leader, cpu, thread, data); 1408 1410 } 1409 1411 1410 - int perf_evsel__read_counter(struct evsel *evsel, int cpu, int thread) 1412 + int evsel__read_counter(struct evsel *evsel, int cpu, int thread) 1411 1413 { 1412 1414 u64 read_format = evsel->core.attr.read_format; 1413 1415 1414 1416 if (read_format & PERF_FORMAT_GROUP) 1415 - return perf_evsel__read_group(evsel, cpu, thread); 1416 - else 1417 - return perf_evsel__read_one(evsel, cpu, thread); 1417 + return evsel__read_group(evsel, cpu, thread); 1418 + 1419 + return evsel__read_one(evsel, cpu, thread); 1418 1420 } 1419 1421 1420 - int __perf_evsel__read_on_cpu(struct evsel *evsel, 1421 - int cpu, int thread, bool scale) 1422 + int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale) 1422 1423 { 1423 1424 struct perf_counts_values count; 1424 1425 size_t nv = scale ? 3 : 1;
+8 -11
tools/perf/util/evsel.h
··· 265 265 (e1->core.attr.config == e2->core.attr.config); 266 266 } 267 267 268 - int perf_evsel__read_counter(struct evsel *evsel, int cpu, int thread); 268 + int evsel__read_counter(struct evsel *evsel, int cpu, int thread); 269 269 270 - int __perf_evsel__read_on_cpu(struct evsel *evsel, 271 - int cpu, int thread, bool scale); 270 + int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale); 272 271 273 272 /** 274 - * perf_evsel__read_on_cpu - Read out the results on a CPU and thread 273 + * evsel__read_on_cpu - Read out the results on a CPU and thread 275 274 * 276 275 * @evsel - event selector to read value 277 276 * @cpu - CPU of interest 278 277 * @thread - thread of interest 279 278 */ 280 - static inline int perf_evsel__read_on_cpu(struct evsel *evsel, 281 - int cpu, int thread) 279 + static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread) 282 280 { 283 - return __perf_evsel__read_on_cpu(evsel, cpu, thread, false); 281 + return __evsel__read_on_cpu(evsel, cpu, thread, false); 284 282 } 285 283 286 284 /** 287 - * perf_evsel__read_on_cpu_scaled - Read out the results on a CPU and thread, scaled 285 + * evsel__read_on_cpu_scaled - Read out the results on a CPU and thread, scaled 288 286 * 289 287 * @evsel - event selector to read value 290 288 * @cpu - CPU of interest 291 289 * @thread - thread of interest 292 290 */ 293 - static inline int perf_evsel__read_on_cpu_scaled(struct evsel *evsel, 294 - int cpu, int thread) 291 + static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int thread) 295 292 { 296 - return __perf_evsel__read_on_cpu(evsel, cpu, thread, true); 293 + return __evsel__read_on_cpu(evsel, cpu, thread, true); 297 294 } 298 295 299 296 int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event,
+2 -3
tools/perf/util/record.c
··· 19 19 * However, if the leader is an AUX area event, then assume the event to sample 20 20 * is the next event. 21 21 */ 22 - static struct evsel *perf_evsel__read_sampler(struct evsel *evsel, 23 - struct evlist *evlist) 22 + static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) 24 23 { 25 24 struct evsel *leader = evsel->leader; 26 25 ··· 42 43 if (!leader->sample_read) 43 44 return; 44 45 45 - read_sampler = perf_evsel__read_sampler(evsel, evlist); 46 + read_sampler = evsel__read_sampler(evsel, evlist); 46 47 47 48 if (evsel == read_sampler) 48 49 return;