Home
last modified time | relevance | path

Searched refs:cpu_map_idx (Results 1 – 15 of 15) sorted by relevance

/Linux-v6.1/tools/lib/perf/
Devsel.c87 static int get_group_fd(struct perf_evsel *evsel, int cpu_map_idx, int thread, int *group_fd) in get_group_fd() argument
104 fd = FD(leader, cpu_map_idx, thread); in get_group_fd()
180 static void perf_evsel__close_fd_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_fd_cpu() argument
185 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__close_fd_cpu()
215 void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_cpu() argument
220 perf_evsel__close_fd_cpu(evsel, cpu_map_idx); in perf_evsel__close_cpu()
282 void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread) in perf_evsel__mmap_base() argument
284 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__mmap_base()
286 if (fd == NULL || *fd < 0 || MMAP(evsel, cpu_map_idx, thread) == NULL) in perf_evsel__mmap_base()
289 return MMAP(evsel, cpu_map_idx, thread)->base; in perf_evsel__mmap_base()
[all …]
/Linux-v6.1/tools/perf/util/
Dcounts.h21 perf_counts(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts() argument
23 return xyarray__entry(counts->values, cpu_map_idx, thread); in perf_counts()
27 perf_counts__is_loaded(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts__is_loaded() argument
29 return *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)); in perf_counts__is_loaded()
33 perf_counts__set_loaded(struct perf_counts *counts, int cpu_map_idx, int thread, bool loaded) in perf_counts__set_loaded() argument
35 *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)) = loaded; in perf_counts__set_loaded()
Devsel.c1437 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__enable_cpu() argument
1439 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evsel__enable_cpu()
1452 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__disable_cpu() argument
1454 return perf_evsel__disable_cpu(&evsel->core, cpu_map_idx); in evsel__disable_cpu()
1520 void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread, in evsel__compute_deltas() argument
1528 if (cpu_map_idx == -1) { in evsel__compute_deltas()
1532 tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__compute_deltas()
1533 *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread) = *count; in evsel__compute_deltas()
1541 static int evsel__read_one(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_one() argument
1543 struct perf_counts_values *count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__read_one()
[all …]
Dstat.c298 int cpu_map_idx, bool *skip) in check_per_pkg() argument
302 struct perf_cpu cpu = perf_cpu_map__cpu(cpus, cpu_map_idx); in check_per_pkg()
361 int cpu_map_idx, int thread, in process_counter_values() argument
368 if (check_per_pkg(evsel, count, cpu_map_idx, &skip)) { in process_counter_values()
384 evsel__compute_deltas(evsel, cpu_map_idx, thread, count); in process_counter_values()
388 cpu_map_idx, &rt_stat); in process_counter_values()
472 int cpu_map_idx; in perf_event__process_stat_event() local
483 cpu_map_idx = perf_cpu_map__idx(evsel__cpus(counter), (struct perf_cpu){.cpu = st->cpu}); in perf_event__process_stat_event()
484 if (cpu_map_idx == -1) { in perf_event__process_stat_event()
488 ptr = perf_counts(counter->counts, cpu_map_idx, st->thread); in perf_event__process_stat_event()
[all …]
Devsel.h307 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx);
310 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx);
312 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx);
352 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread);
354 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale);
363 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu() argument
365 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false); in evsel__read_on_cpu()
375 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu_scaled() argument
377 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, true); in evsel__read_on_cpu_scaled()
Dbpf_counter.h19 int cpu_map_idx,
43 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd);
Dbpf_counter.c273 static int bpf_program_profiler__install_pe(struct evsel *evsel, int cpu_map_idx, in bpf_program_profiler__install_pe() argument
285 &cpu_map_idx, &fd, BPF_ANY); in bpf_program_profiler__install_pe()
592 static int bperf__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bperf__install_pe() argument
597 &cpu_map_idx, &fd, BPF_ANY); in bperf__install_pe()
788 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bpf_counter__install_pe() argument
792 return evsel->bpf_counter_ops->install_pe(evsel, cpu_map_idx, fd); in bpf_counter__install_pe()
Devlist.c394 .cpu_map_idx = 0, in evlist__cpu_begin()
409 itr.cpu_map_idx = perf_cpu_map__idx(itr.evsel->core.cpus, itr.cpu); in evlist__cpu_begin()
414 if (itr.cpu_map_idx == -1) in evlist__cpu_begin()
425 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next()
428 if (evlist_cpu_itr->cpu_map_idx != -1) in evlist_cpu_iterator__next()
439 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next()
446 if (evlist_cpu_itr->cpu_map_idx == -1) in evlist_cpu_iterator__next()
507 evsel__disable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__disable()
570 evsel__enable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__enable()
1316 evlist_cpu_itr.cpu_map_idx); in evlist__close()
Dstat.h275 int cpu_map_idx);
Dstat-display.c791 int cpu_map_idx; member
1041 ad->val += perf_counts(counter->counts, ad->cpu_map_idx, 0)->val; in counter_cb()
1042 ad->ena += perf_counts(counter->counts, ad->cpu_map_idx, 0)->ena; in counter_cb()
1043 ad->run += perf_counts(counter->counts, ad->cpu_map_idx, 0)->run; in counter_cb()
1061 struct aggr_data ad = { .cpu_map_idx = idx }; in print_counter()
Devlist.h351 int cpu_map_idx; member
Dauxtrace.c654 int cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); in evlist__enable_event_idx() local
656 if (cpu_map_idx == -1) in evlist__enable_event_idx()
658 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evlist__enable_event_idx()
/Linux-v6.1/tools/lib/perf/include/perf/
Devsel.h33 LIBPERF_API void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx);
36 LIBPERF_API void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread);
37 LIBPERF_API int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
40 LIBPERF_API int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
43 LIBPERF_API int perf_evsel__disable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
/Linux-v6.1/tools/lib/perf/Documentation/
Dlibperf.txt140 void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx);
143 void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread);
144 int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
147 int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
149 int perf_evsel__disable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
/Linux-v6.1/tools/perf/
Dbuiltin-stat.c325 static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread, in evsel__write_stat_event() argument
328 struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread); in evsel__write_stat_event()
329 struct perf_cpu cpu = perf_cpu_map__cpu(evsel__cpus(counter), cpu_map_idx); in evsel__write_stat_event()
335 static int read_single_counter(struct evsel *counter, int cpu_map_idx, in read_single_counter() argument
342 perf_counts(counter->counts, cpu_map_idx, thread); in read_single_counter()
351 perf_counts(counter->counts, cpu_map_idx, thread); in read_single_counter()
362 return evsel__read_counter(counter, cpu_map_idx, thread); in read_single_counter()
373 static int read_counter_cpu(struct evsel *counter, struct timespec *rs, int cpu_map_idx) in read_counter_cpu() argument
384 count = perf_counts(counter->counts, cpu_map_idx, thread); in read_counter_cpu()
390 if (!perf_counts__is_loaded(counter->counts, cpu_map_idx, thread) && in read_counter_cpu()
[all …]