| /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/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 | 471 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tool_pmu_read() argument 479 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__tool_pmu_read() 481 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tool_pmu_read() 497 if (cpu_map_idx == 0 && thread == 0) { in evsel__tool_pmu_read() 516 if (cpu_map_idx == 0 && thread == 0) in evsel__tool_pmu_read() 524 int fd = FD(evsel, cpu_map_idx, thread); in evsel__tool_pmu_read() 526 start_time = xyarray__entry(evsel->start_times, cpu_map_idx, thread); in evsel__tool_pmu_read() 530 if (cpu_map_idx == 0) in evsel__tool_pmu_read() 538 cpu_map_idx); in evsel__tool_pmu_read()
|
| H A D | evsel.h | 353 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx); 356 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx); 359 struct perf_cpu_map *cpus, int cpu_map_idx, 361 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx); 396 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread); 398 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale); 404 * @cpu_map_idx - CPU of interest 407 static inline int evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__read_on_cpu() 409 return __evsel__read_on_cpu(evsel, cpu_map_idx, thread, false); 416 * @cpu_map_idx 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 | 1796 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__enable() 1798 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx); in evsel__enable() 1811 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx) in evsel__disable() 1813 return perf_evsel__disable_cpu(&evsel->core, cpu_map_idx); in evsel__disable() 1901 void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread, in evsel__compute_deltas() 1909 tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__compute_deltas() 1910 *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread) = *count; 1917 static int evsel__read_one(struct evsel *evsel, int cpu_map_idx, int thread) 1919 struct perf_counts_values *count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__set_count() 1921 return perf_evsel__read(&evsel->core, cpu_map_idx, threa in evsel__set_count() 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 2098 __evsel__read_on_cpu(struct evsel * evsel,int cpu_map_idx,int thread,bool scale) __evsel__read_on_cpu() 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 | 307 int cpu_map_idx, bool *skip) in check_per_pkg() 311 struct perf_cpu cpu = perf_cpu_map__cpu(cpus, cpu_map_idx); in check_per_pkg() 389 int cpu_map_idx, int thread, in process_counter_values() 396 if (check_per_pkg(evsel, count, cpu_map_idx, &skip)) { in process_counter_values() 405 evsel__compute_deltas(evsel, cpu_map_idx, thread, count); in process_counter_values() 427 struct perf_cpu cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx); in process_counter_values() 657 int cpu_map_idx; in perf_event__process_stat_event() 668 cpu_map_idx = perf_cpu_map__idx(evsel__cpus(counter), (struct perf_cpu){.cpu = st->cpu}); in perf_event__process_stat_event() 669 if (cpu_map_idx == -1) { in perf_event__process_stat_event() 673 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.c | 551 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tpebs_open() 559 if (cpu_map_idx != 0 || thread != 0) in evsel__tpebs_open() 563 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tpebs_read() 565 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 | intel-tpebs.h | 23 int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| 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_read(struct evsel *evsel, int cpu_map_idx, int thread);
|
| H A D | evlist.c | 436 .cpu_map_idx = 0, in evlist_cpu_iterator__init() 457 itr->cpu_map_idx = perf_cpu_map__idx(itr->evsel->core.cpus, itr->cpu); in evlist_cpu_iterator__exit() 462 if (itr->cpu_map_idx == -1) in evlist_cpu_iterator__exit() 479 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next() 482 if (evlist_cpu_itr->cpu_map_idx != -1) in evlist_cpu_iterator__next() 493 evlist_cpu_itr->cpu_map_idx = in evlist_cpu_iterator__next() 500 if (evlist_cpu_itr->cpu_map_idx == -1) in evsel__strcmp() 550 evsel__disable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__disable() 604 evsel__enable_cpu(pos, evlist_cpu_itr.cpu_map_idx); in __evlist__enable() 1403 if (evlist_cpu_itr.cpu_map_idx in evlist__close() [all...] |
| H A D | hwmon_pmu.c | 807 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 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 | 224 int cpu_map_idx __maybe_unused, in bperf_cgrp__install_pe()
|
| H A D | evlist.h | 355 int cpu_map_idx; member 358 * current CPU. Distinct from cpu_map_idx as the evsel's cpu map may
|
| H A D | auxtrace.c | 674 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 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 | 2298 int cpu_map_idx, thread_map_idx, aggr_idx; in perf_sample__fprint_metric() 2335 cpu_map_idx = perf_cpu_map__idx(evsel->core.cpus, (struct perf_cpu){sample->cpu}); in perf_sample__fprint_metric() 2336 if (cpu_map_idx < 0) { in perf_sample__fprint_metric() 2341 cpu_map_idx = 0; in perf_sample__fprint_metric() 2359 count = perf_counts(evsel->counts, cpu_map_idx, thread_map_idx); in perf_sample__fprint_metric() 2360 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);
|