Home
last modified time | relevance | path

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

/linux/tools/lib/perf/
H A Devsel.c100 static int get_group_fd(struct perf_evsel *evsel, int cpu_map_idx, int thread, int *group_fd) in get_group_fd() argument
117 fd = FD(leader, cpu_map_idx, thread); in get_group_fd()
193 static void perf_evsel__close_fd_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_fd_cpu() argument
198 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__close_fd_cpu()
228 void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_cpu() argument
233 perf_evsel__close_fd_cpu(evsel, cpu_map_idx); in perf_evsel__close_cpu()
295 void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread) in perf_evsel__mmap_base() argument
297 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__mmap_base()
299 if (fd == NULL || *fd < 0 || MMAP(evsel, cpu_map_idx, thread) == NULL) in perf_evsel__mmap_base()
302 return MMAP(evsel, cpu_map_idx, thread)->base; in perf_evsel__mmap_base()
[all …]
H A Devlist.c308 int cpu_map_idx, int thread, u64 id) in perf_evlist__id_hash() argument
311 struct perf_sample_id *sid = SID(evsel, cpu_map_idx, thread); in perf_evlist__id_hash()
329 int cpu_map_idx, int thread, u64 id) in perf_evlist__id_add() argument
331 if (!SID(evsel, cpu_map_idx, thread)) in perf_evlist__id_add()
334 perf_evlist__id_hash(evlist, evsel, cpu_map_idx, thread, id); in perf_evlist__id_add()
340 int cpu_map_idx, int thread, int fd) in perf_evlist__id_add_fd() argument
347 if (!SID(evsel, cpu_map_idx, thread)) in perf_evlist__id_add_fd()
378 perf_evlist__id_add(evlist, evsel, cpu_map_idx, thread, id); in perf_evlist__id_add_fd()
/linux/tools/perf/util/
H A Dcounts.h20 perf_counts(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts() argument
22 return xyarray__entry(counts->values, cpu_map_idx, thread); in perf_counts()
26 perf_counts__is_loaded(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts__is_loaded() argument
28 return *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)); in perf_counts__is_loaded()
32 perf_counts__set_loaded(struct perf_counts *counts, int cpu_map_idx, int thread, bool loaded) in perf_counts__set_loaded() argument
34 *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)) = loaded; in perf_counts__set_loaded()
H A Dtool_pmu.c490 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tool_pmu_read() argument
498 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__tool_pmu_read()
500 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tool_pmu_read()
516 if (cpu_map_idx == 0 && thread == 0) { in evsel__tool_pmu_read()
535 if (cpu_map_idx == 0 && thread == 0) in evsel__tool_pmu_read()
543 int fd = FD(evsel, cpu_map_idx, thread); in evsel__tool_pmu_read()
545 start_time = xyarray__entry(evsel->start_times, cpu_map_idx, thread); in evsel__tool_pmu_read()
549 if (cpu_map_idx == 0) in evsel__tool_pmu_read()
557 cpu_map_idx); in evsel__tool_pmu_read()
H A Devsel.h351 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx);
354 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx);
357 struct perf_cpu_map *cpus, int cpu_map_idx,
359 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx);
394 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread);
396 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale);
405 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu() argument
407 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false); in evsel__read_on_cpu()
417 static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu_scaled() argument
419 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, true); in evsel__read_on_cpu_scaled()
H A Devsel.c1673 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__enable_cpu() argument
1675 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evsel__enable_cpu()
1688 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__disable_cpu() argument
1690 return perf_evsel__disable_cpu(&evsel->core, cpu_map_idx); in evsel__disable_cpu()
1778 void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread, in evsel__compute_deltas() argument
1786 tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__compute_deltas()
1787 *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread) = *count; in evsel__compute_deltas()
1794 static int evsel__read_one(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_one() argument
1796 struct perf_counts_values *count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__read_one()
1798 return perf_evsel__read(&evsel->core, cpu_map_idx, thread, count); in evsel__read_one()
[all …]
H A Dstat.c305 int cpu_map_idx, bool *skip) in check_per_pkg() argument
309 struct perf_cpu cpu = perf_cpu_map__cpu(cpus, cpu_map_idx); in check_per_pkg()
387 int cpu_map_idx, int thread, in process_counter_values() argument
394 if (check_per_pkg(evsel, count, cpu_map_idx, &skip)) { in process_counter_values()
403 evsel__compute_deltas(evsel, cpu_map_idx, thread, count); in process_counter_values()
425 struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx); in process_counter_values()
655 int cpu_map_idx; in perf_event__process_stat_event() local
666 cpu_map_idx = perf_cpu_map__idx(evsel__cpus(counter), (struct perf_cpu){.cpu = st->cpu}); in perf_event__process_stat_event()
667 if (cpu_map_idx == -1) { in perf_event__process_stat_event()
671 ptr = perf_counts(counter->counts, cpu_map_idx, st->thread); in perf_event__process_stat_event()
H A Dbpf_counter.h14 int cpu_map_idx,
32 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd);
H A Dbpf_counter.c334 static int bpf_program_profiler__install_pe(struct evsel *evsel, int cpu_map_idx, in bpf_program_profiler__install_pe() argument
339 int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu; in bpf_program_profiler__install_pe()
655 static int bperf__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bperf__install_pe() argument
658 int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu; in bperf__install_pe()
850 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bpf_counter__install_pe() argument
854 return evsel->bpf_counter_ops->install_pe(evsel, cpu_map_idx, fd); in bpf_counter__install_pe()
H A Dintel-tpebs.c561 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tpebs_read() argument
569 if (cpu_map_idx != 0 || thread != 0) in evsel__tpebs_read()
573 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tpebs_read()
575 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__tpebs_read()
H A Dintel-tpebs.h23 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread);
H A Ddrm_pmu.h37 int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
H A Dtool_pmu.h60 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
H A Dhwmon_pmu.c807 int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__hwmon_pmu_read() argument
815 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__hwmon_pmu_read()
817 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__hwmon_pmu_read()
818 fd = FD(evsel, cpu_map_idx, thread); in evsel__hwmon_pmu_read()
H A Devlist.c367 .cpu_map_idx = 0, in evlist__cpu_begin()
382 itr.cpu_map_idx = perf_cpu_map__idx(itr.evsel->core.cpus, itr.cpu); in evlist__cpu_begin()
387 if (itr.cpu_map_idx == -1) in evlist__cpu_begin()
398 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next()
401 if (evlist_cpu_itr->cpu_map_idx != -1) in evlist_cpu_iterator__next()
412 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next()
419 if (evlist_cpu_itr->cpu_map_idx == -1) in evlist_cpu_iterator__next()
480 evsel__disable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__disable()
543 evsel__enable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__enable()
1360 evlist_cpu_itr.cpu_map_idx); in evlist__close()
H A Dhwmon_pmu.h165 int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
H A Ddrm_pmu.c663 int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__drm_pmu_read() argument
676 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__drm_pmu_read()
678 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__drm_pmu_read()
H A Dbpf_counter_cgroup.c223 int cpu_map_idx __maybe_unused, in bperf_cgrp__install_pe()
H A Devlist.h353 int cpu_map_idx; member
H A Dauxtrace.c674 int cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); in evlist__enable_event_idx() local
676 if (cpu_map_idx == -1) in evlist__enable_event_idx()
678 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evlist__enable_event_idx()
/linux/tools/lib/perf/include/perf/
H A 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/tools/lib/perf/Documentation/
H A Dlibperf.txt139 void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx);
142 void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread);
143 int perf_evsel__read(struct perf_evsel *evsel, int cpu_map_idx, int thread,
146 int perf_evsel__enable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
148 int perf_evsel__disable_cpu(struct perf_evsel *evsel, int cpu_map_idx);
/linux/tools/perf/
H A Dbuiltin-stat.c271 static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread, in evsel__write_stat_event() argument
274 struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread); in evsel__write_stat_event()
275 struct perf_cpu cpu = perf_cpu_map__cpu(evsel__cpus(counter), cpu_map_idx); in evsel__write_stat_event()
281 static int read_single_counter(struct evsel *counter, int cpu_map_idx, int thread) in read_single_counter() argument
283 int err = evsel__read_counter(counter, cpu_map_idx, thread); in read_single_counter()
289 if (err && cpu_map_idx == 0 && in read_single_counter()
293 perf_counts(counter->counts, cpu_map_idx, thread); in read_single_counter()
298 old_count = perf_counts(counter->prev_raw_counts, cpu_map_idx, thread); in read_single_counter()
322 static int read_counter_cpu(struct evsel *counter, int cpu_map_idx) in read_counter_cpu() argument
333 count = perf_counts(counter->counts, cpu_map_idx, thread); in read_counter_cpu()
[all …]
H A Dbuiltin-script.c2287 int cpu_map_idx, thread_map_idx, aggr_idx; in perf_sample__fprint_metric() local
2324 cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){sample->cpu}); in perf_sample__fprint_metric()
2325 if (cpu_map_idx < 0) { in perf_sample__fprint_metric()
2330 cpu_map_idx = 0; in perf_sample__fprint_metric()
2348 count = perf_counts(evsel->counts, cpu_map_idx, thread_map_idx); in perf_sample__fprint_metric()
2349 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread_map_idx); in perf_sample__fprint_metric()
/linux/tools/lib/perf/include/internal/
H A Devlist.h129 int cpu_map_idx, int thread, u64 id);
133 int cpu_map_idx, int thread, int fd);