| /linux/tools/perf/util/ |
| H A D | counts.h | 20 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 D | tool_pmu.c | 231 static int tool_pmu__read_stat(struct evsel *evsel, int cpu_map_idx, int thread, __u64 *val) in evsel__tool_pmu_open() 235 int fd = FD(evsel, cpu_map_idx, thread); in evsel__tool_pmu_open() 245 if (cpu_map_idx == 0) in evsel__tool_pmu_open() 251 struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx); in evsel__tool_pmu_open() 520 int evsel__tool_pmu_enable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__tool_pmu_read() 529 if (cpu_map_idx == 0) in evsel__tool_pmu_read() 538 cpu_map_idx, thread); in evsel__tool_pmu_read() 542 err = tool_pmu__read_stat(evsel, cpu_map_idx, thread, &val); in evsel__tool_pmu_read() 568 int evsel__tool_pmu_disable_cpu(struct evsel *evsel, int cpu_map_idx) in tool_pmu__new() 577 if (cpu_map_idx in tool_pmu__new() 471 evsel__tool_pmu_read(struct evsel * evsel,int cpu_map_idx,int thread) evsel__tool_pmu_read() argument [all...] |
| H A D | evsel.h | 367 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx); 370 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx); 373 struct perf_cpu_map *cpus, int cpu_map_idx, 375 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx); 430 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread); in evsel__next() 432 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale); in evsel__next() 438 * @cpu_map_idx - CPU of interest in evsel__prev() 441 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread) 443 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false); 450 * @cpu_map_idx in evsel__is_group_leader() 405 evsel__read_on_cpu(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_on_cpu() argument 417 evsel__read_on_cpu_scaled(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_on_cpu_scaled() argument [all...] |
| H A D | evsel.c | 1872 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__exit() 1877 err = evsel__tool_pmu_enable_cpu(evsel, cpu_map_idx); in evsel__exit() 1879 err = perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evsel__exit() 1894 int mem_err = evsel__enable_cpu(member, cpu_map_idx); 1942 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__group_has_tpebs() 1947 err = evsel__tool_pmu_disable_cpu(evsel, cpu_map_idx); in evsel__group_has_tpebs() 1949 err = perf_evsel__disable_cpu(&evsel->core, cpu_map_idx); 1963 int mem_err = evsel__disable_cpu(member, cpu_map_idx); in evsel__group_read_size() 2090 void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread, in evsel__read_counter() 2098 tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, threa argument 1790 evsel__enable_cpu(struct evsel * evsel,int cpu_map_idx) evsel__enable_cpu() argument 1805 evsel__disable_cpu(struct evsel * evsel,int cpu_map_idx) evsel__disable_cpu() argument 1895 evsel__compute_deltas(struct evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) evsel__compute_deltas() argument 1911 evsel__read_one(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_one() argument 1918 evsel__set_count(struct evsel * counter,int cpu_map_idx,int thread,u64 val,u64 ena,u64 run,u64 lost) evsel__set_count() argument 1993 evsel__process_group_data(struct evsel * leader,int cpu_map_idx,int thread,u64 * data) evsel__process_group_data() argument 2027 evsel__read_group(struct evsel * leader,int cpu_map_idx,int thread) evsel__read_group() argument 2078 evsel__read_counter(struct evsel * evsel,int cpu_map_idx,int thread) evsel__read_counter() argument 2119 evsel__match_other_cpu(struct evsel * evsel,struct evsel * other,int cpu_map_idx) evsel__match_other_cpu() argument 2127 evsel__hybrid_group_cpu_map_idx(struct evsel * evsel,int cpu_map_idx) evsel__hybrid_group_cpu_map_idx() argument 2139 get_group_fd(struct evsel * evsel,int cpu_map_idx,int thread) get_group_fd() argument 2175 update_fds(struct evsel * evsel,int nr_cpus,int cpu_map_idx,int nr_threads,int thread_idx) update_fds() argument 2199 evsel__ignore_missing_thread(struct evsel * evsel,int nr_cpus,int cpu_map_idx,struct perf_thread_map * threads,int thread,int err) evsel__ignore_missing_thread() argument 2973 evsel__open_per_cpu_and_thread(struct evsel * evsel,struct perf_cpu_map * cpus,int cpu_map_idx,struct perf_thread_map * threads) evsel__open_per_cpu_and_thread() argument 2982 evsel__open_per_cpu(struct evsel * evsel,struct perf_cpu_map * cpus,int cpu_map_idx) evsel__open_per_cpu() argument 4136 int cpu_map_idx, thread; store_evsel_ids() local [all...] |
| H A D | stat.c | 311 int cpu_map_idx, bool *skip) in check_per_pkg() 315 struct perf_cpu cpu = perf_cpu_map__cpu(cpus, cpu_map_idx); in check_per_pkg() 393 int cpu_map_idx, int thread, in process_counter_values() 400 if (check_per_pkg(evsel, count, cpu_map_idx, &skip)) { in process_counter_values() 409 evsel__compute_deltas(evsel, cpu_map_idx, thread, count); in process_counter_values() 431 struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx); in process_counter_values() 661 int cpu_map_idx; in perf_event__process_stat_event() 672 cpu_map_idx = perf_cpu_map__idx(evsel__cpus(counter), (struct perf_cpu){.cpu = st->cpu}); in perf_event__process_stat_event() 673 if (cpu_map_idx == -1) { in perf_event__process_stat_event() 677 ptr = perf_counts(counter->counts, cpu_map_idx, s in perf_event__process_stat_event() 305 check_per_pkg(struct evsel * counter,struct perf_counts_values * vals,int cpu_map_idx,bool * skip) check_per_pkg() argument 387 process_counter_values(struct perf_stat_config * config,struct evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) process_counter_values() argument 655 int cpu_map_idx; perf_event__process_stat_event() local [all...] |
| H A D | bpf_counter.h | 14 int cpu_map_idx, 32 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd);
|
| H A D | bpf_counter.c | 336 static int bpf_program_profiler__install_pe(struct evsel *evsel, int cpu_map_idx, in bpf_program_profiler__install_pe() 341 int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu; in bpf_program_profiler__install_pe() 657 static int bperf__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bperf__install_pe() 660 int cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx).cpu; in bperf__install_pe() 852 int bpf_counter__install_pe(struct evsel *evsel, int cpu_map_idx, int fd) in bpf_counter__install_pe() 856 return evsel->bpf_counter_ops->install_pe(evsel, cpu_map_idx, fd); 334 bpf_program_profiler__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bpf_program_profiler__install_pe() argument 655 bperf__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bperf__install_pe() argument 850 bpf_counter__install_pe(struct evsel * evsel,int cpu_map_idx,int fd) bpf_counter__install_pe() argument
|
| H A D | intel-tpebs.h | 23 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| H A D | intel-tpebs.c | 619 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tpebs_read() 627 if (cpu_map_idx != 0 || thread != 0) in evsel__tpebs_read() 631 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tpebs_read() 633 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__tpebs_read() 561 evsel__tpebs_read(struct evsel * evsel,int cpu_map_idx,int thread) evsel__tpebs_read() argument
|
| H A D | drm_pmu.h | 37 int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| H A D | tool_pmu.h | 59 int evsel__tool_pmu_enable_cpu(struct evsel *evsel, int cpu_map_idx); 61 int evsel__tool_pmu_disable_cpu(struct evsel *evsel, int cpu_map_idx); 63 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| H A D | evlist.c | 488 .cpu_map_idx = 0, in evlist_cpu_iterator__next() 509 itr->cpu_map_idx = perf_cpu_map__idx(itr->evsel->core.cpus, itr->cpu); in evlist__is_enabled() 514 if (itr->cpu_map_idx == -1) in evlist__is_enabled() 531 evlist_cpu_itr->cpu_map_idx = in __evlist__disable() 534 if (evlist_cpu_itr->cpu_map_idx != -1) in __evlist__disable() 545 evlist_cpu_itr->cpu_map_idx = in __evlist__disable() 552 if (evlist_cpu_itr->cpu_map_idx == -1) in __evlist__disable() 602 evsel__disable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__enable() 656 evsel__enable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in evlist__poll() 1486 if (evlist_cpu_itr.cpu_map_idx in evlist__prepare_workload() [all...] |
| H A D | hwmon_pmu.c | 811 int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__hwmon_pmu_read() 819 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__hwmon_pmu_read() 821 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__hwmon_pmu_read() 822 fd = FD(evsel, cpu_map_idx, thread); in evsel__hwmon_pmu_read() 807 evsel__hwmon_pmu_read(struct evsel * evsel,int cpu_map_idx,int thread) evsel__hwmon_pmu_read() argument
|
| H A D | hwmon_pmu.h | 165 int evsel__hwmon_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| H A D | drm_pmu.c | 659 int evsel__drm_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in drm_pmu__read_for_pid() 672 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__drm_pmu_read() 674 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__drm_pmu_read() 663 evsel__drm_pmu_read(struct evsel * evsel,int cpu_map_idx,int thread) evsel__drm_pmu_read() argument
|
| H A D | bpf_counter_cgroup.c | 244 int cpu_map_idx __maybe_unused, in bperf_cgrp__sync_counters()
|
| H A D | evlist.h | 577 int cpu_map_idx; 580 * current CPU. Distinct from cpu_map_idx as the evsel's cpu map may 355 int cpu_map_idx; global() member
|
| H A D | auxtrace.c | 680 int cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); in evlist__enable_event_idx() 682 if (cpu_map_idx == -1) in evlist__enable_event_idx() 684 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in auxtrace_record__read_finish() 674 int cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, evlist_cpu); evlist__enable_event_idx() local
|
| /linux/tools/lib/perf/ |
| H A D | evsel.c | 100 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() 194 static void perf_evsel__close_fd_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_fd_cpu() 199 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__close_fd_cpu() 229 void perf_evsel__close_cpu(struct perf_evsel *evsel, int cpu_map_idx) in perf_evsel__close_cpu() 234 perf_evsel__close_fd_cpu(evsel, cpu_map_idx); in perf_evsel__close_cpu() 296 void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu_map_idx, int thread) in perf_evsel__mmap_base() 298 int *fd = FD(evsel, cpu_map_idx, thread); in perf_evsel__mmap_base() 300 if (fd == NULL || *fd < 0 || MMAP(evsel, cpu_map_idx, thread) == NULL) in perf_evsel__mmap_base() 303 return MMAP(evsel, cpu_map_idx, threa in perf_evsel__mmap_base() 193 perf_evsel__close_fd_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__close_fd_cpu() argument 228 perf_evsel__close_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__close_cpu() argument 295 perf_evsel__mmap_base(struct perf_evsel * evsel,int cpu_map_idx,int thread) perf_evsel__mmap_base() argument 334 perf_evsel__read_group(struct perf_evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) perf_evsel__read_group() argument 400 perf_evsel__read(struct perf_evsel * evsel,int cpu_map_idx,int thread,struct perf_counts_values * count) perf_evsel__read() argument 429 perf_evsel__ioctl(struct perf_evsel * evsel,int ioc,void * arg,int cpu_map_idx,int thread) perf_evsel__ioctl() argument 441 perf_evsel__run_ioctl(struct perf_evsel * evsel,int ioc,void * arg,int cpu_map_idx) perf_evsel__run_ioctl() argument 455 perf_evsel__enable_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__enable_cpu() argument 485 perf_evsel__disable_cpu(struct perf_evsel * evsel,int cpu_map_idx) perf_evsel__disable_cpu() argument [all...] |
| H A D | evlist.c | 336 int cpu_map_idx, int thread, u64 id) in perf_evlist__id_hash() argument 339 struct perf_sample_id *sid = SID(evsel, cpu_map_idx, thread); in perf_evlist__id_hash() 357 int cpu_map_idx, int thread, u64 id) in perf_evlist__id_add() argument 359 if (!SID(evsel, cpu_map_idx, thread)) in perf_evlist__id_add() 362 perf_evlist__id_hash(evlist, evsel, cpu_map_idx, thread, id); in perf_evlist__id_add() 368 int cpu_map_idx, int thread, int fd) in perf_evlist__id_add_fd() argument 375 if (!SID(evsel, cpu_map_idx, thread)) in perf_evlist__id_add_fd() 406 perf_evlist__id_add(evlist, evsel, cpu_map_idx, thread, id); in perf_evlist__id_add_fd()
|
| /linux/tools/lib/perf/include/perf/ |
| H A D | evsel.h | 33 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 D | libperf.txt | 139 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 D | builtin-stat.c | 271 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, threa in read_counter_cpu() 708 create_perf_stat_counter(struct evsel * evsel,struct perf_stat_config * config,int cpu_map_idx) create_perf_stat_counter() argument [all...] |
| H A D | builtin-script.c | 2308 int cpu_map_idx, thread_map_idx, aggr_idx; in perf_sample__fprint_metric() 2345 cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){sample->cpu}); in perf_sample__fprint_metric() 2346 if (cpu_map_idx < 0) { in perf_sample__fprint_metric() 2351 cpu_map_idx = 0; in perf_sample__fprint_metric() 2369 count = perf_counts(evsel->counts, cpu_map_idx, thread_map_idx); in perf_sample__fprint_metric() 2370 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread_map_idx); in perf_sample__fprint_metric() 2294 int cpu_map_idx, thread_map_idx, aggr_idx; perf_sample__fprint_metric() local
|
| /linux/tools/lib/perf/include/internal/ |
| H A D | evlist.h | 129 int cpu_map_idx, int thread, u64 id); 133 int cpu_map_idx, int thread, int fd);
|