/linux-6.1.9/tools/perf/util/ |
D | evlist.h | 53 struct evlist { struct 70 void (*trace_event_sample_raw)(struct evlist *evlist, argument 92 struct evlist *evlist__new(void); argument 93 struct evlist *evlist__new_default(void); 94 struct evlist *evlist__new_dummy(void); 95 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, 97 void evlist__exit(struct evlist *evlist); 98 void evlist__delete(struct evlist *evlist); 100 void evlist__add(struct evlist *evlist, struct evsel *entry); 101 void evlist__remove(struct evlist *evlist, struct evsel *evsel); [all …]
|
D | evlist.c | 67 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, in evlist__init() argument 70 perf_evlist__init(&evlist->core); in evlist__init() 71 perf_evlist__set_maps(&evlist->core, cpus, threads); in evlist__init() 72 evlist->workload.pid = -1; in evlist__init() 73 evlist->bkw_mmap_state = BKW_MMAP_NOTREADY; in evlist__init() 74 evlist->ctl_fd.fd = -1; in evlist__init() 75 evlist->ctl_fd.ack = -1; in evlist__init() 76 evlist->ctl_fd.pos = -1; in evlist__init() 79 struct evlist *evlist__new(void) in evlist__new() 81 struct evlist *evlist = zalloc(sizeof(*evlist)); in evlist__new() local [all …]
|
D | sideband_evlist.c | 15 int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, in evlist__add_sb_event() argument 25 evsel = evsel__new_idx(attr, evlist->core.nr_entries); in evlist__add_sb_event() 31 evlist__add(evlist, evsel); in evlist__add_sb_event() 37 struct evlist *evlist = arg; in perf_evlist__poll_thread() local 52 if (evlist->thread.done) in perf_evlist__poll_thread() 56 evlist__poll(evlist, 1000); in perf_evlist__poll_thread() 58 for (i = 0; i < evlist->core.nr_mmaps; i++) { in perf_evlist__poll_thread() 59 struct mmap *map = &evlist->mmap[i]; in perf_evlist__poll_thread() 65 struct evsel *evsel = evlist__event2evsel(evlist, event); in perf_evlist__poll_thread() 84 void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data) in evlist__set_cb() argument [all …]
|
D | bpf-loader.h | 46 struct evlist; 76 struct evlist *evlist, int *error_pos); 79 struct evlist *evlist, 85 int bpf__setup_stdout(struct evlist *evlist); 86 struct evsel *bpf__setup_output_event(struct evlist *evlist, const char *name); 87 int bpf__strerror_setup_output_event(struct evlist *evlist, int err, char *buf, size_t size); 125 struct evlist *evlist __maybe_unused, in bpf__config_obj() 138 bpf__setup_stdout(struct evlist *evlist __maybe_unused) in bpf__setup_stdout() 144 bpf__setup_output_event(struct evlist *evlist __maybe_unused, const char *name __maybe_unused) in bpf__setup_output_event() 188 struct evlist *evlist __maybe_unused, in bpf__strerror_config_obj() [all …]
|
D | record.c | 26 static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) in evsel__read_sampler() argument 32 evlist__for_each_entry(evlist, evsel) { in evsel__read_sampler() 53 static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist) in evsel__config_leader_sampling() argument 63 read_sampler = evsel__read_sampler(evsel, evlist); in evsel__config_leader_sampling() 95 void evlist__config(struct evlist *evlist, struct record_opts *opts, struct callchain_param *callch… in evlist__config() argument 107 evlist__set_leader(evlist); in evlist__config() 109 if (perf_cpu_map__cpu(evlist->core.user_requested_cpus, 0).cpu < 0) in evlist__config() 114 evlist__for_each_entry(evlist, evsel) { in evlist__config() 121 evlist__for_each_entry(evlist, evsel) in evlist__config() 122 evsel__config_leader_sampling(evsel, evlist); in evlist__config() [all …]
|
D | iostat.h | 20 struct evlist; 33 int iostat_prepare(struct evlist *evlist, struct perf_stat_config *config); 36 void iostat_list(struct evlist *evlist, struct perf_stat_config *config); 37 void iostat_release(struct evlist *evlist); 38 void iostat_prefix(struct evlist *evlist, struct perf_stat_config *config, 43 void iostat_print_counters(struct evlist *evlist,
|
D | sample-raw.h | 5 struct evlist; 9 void evlist__s390_sample_raw(struct evlist *evlist, union perf_event *event, 11 bool evlist__has_amd_ibs(struct evlist *evlist); 12 void evlist__amd_sample_raw(struct evlist *evlist, union perf_event *event, 14 void evlist__init_trace_event_sample_raw(struct evlist *evlist);
|
D | evlist-hybrid.h | 10 int evlist__add_default_hybrid(struct evlist *evlist, bool precise); 11 void evlist__warn_hybrid_group(struct evlist *evlist); 12 bool evlist__has_hybrid(struct evlist *evlist); 13 int evlist__fix_hybrid_cpus(struct evlist *evlist, const char *cpu_list);
|
D | iostat.c | 7 __weak int iostat_prepare(struct evlist *evlist __maybe_unused, in iostat_prepare() 21 __weak void iostat_list(struct evlist *evlist __maybe_unused, in iostat_list() 26 __weak void iostat_release(struct evlist *evlist __maybe_unused) in iostat_release() 40 __weak void iostat_prefix(struct evlist *evlist __maybe_unused, in iostat_prefix() 47 __weak void iostat_print_counters(struct evlist *evlist __maybe_unused, in iostat_print_counters()
|
/linux-6.1.9/tools/lib/perf/ |
D | evlist.c | 28 void perf_evlist__init(struct perf_evlist *evlist) in perf_evlist__init() argument 30 INIT_LIST_HEAD(&evlist->entries); in perf_evlist__init() 31 evlist->nr_entries = 0; in perf_evlist__init() 32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init() 33 perf_evlist__reset_id_hash(evlist); in perf_evlist__init() 36 static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, in __perf_evlist__propagate_maps() argument 46 } else if (!evsel->own_cpus || evlist->has_user_cpus || in __perf_evlist__propagate_maps() 47 (!evsel->requires_cpu && perf_cpu_map__empty(evlist->user_requested_cpus))) { in __perf_evlist__propagate_maps() 49 evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus); in __perf_evlist__propagate_maps() 60 evsel->threads = perf_thread_map__get(evlist->threads); in __perf_evlist__propagate_maps() [all …]
|
/linux-6.1.9/tools/perf/tests/ |
D | expand-cgroup.c | 16 static int test_expand_events(struct evlist *evlist, in test_expand_events() argument 29 TEST_ASSERT_VAL("evlist is empty", !evlist__empty(evlist)); in test_expand_events() 31 nr_events = evlist->core.nr_entries; in test_expand_events() 38 evlist__for_each_entry(evlist, evsel) { in test_expand_events() 47 was_group_event = evsel__is_group_event(evlist__first(evlist)); in test_expand_events() 48 nr_members = evlist__first(evlist)->core.nr_members; in test_expand_events() 50 ret = evlist__expand_cgroup(evlist, cgrp_str, metric_events, false); in test_expand_events() 57 if (evlist->core.nr_entries != nr_events * nr_cgrps) { in test_expand_events() 63 evlist__for_each_entry(evlist, evsel) { in test_expand_events() 104 struct evlist *evlist = evlist__new_default(); in expand_default_events() local [all …]
|
D | event-times.c | 17 static int attach__enable_on_exec(struct evlist *evlist) in attach__enable_on_exec() argument 19 struct evsel *evsel = evlist__last(evlist); in attach__enable_on_exec() 29 err = evlist__create_maps(evlist, &target); in attach__enable_on_exec() 35 err = evlist__prepare_workload(evlist, &target, argv, false, NULL); in attach__enable_on_exec() 43 err = evlist__open(evlist); in attach__enable_on_exec() 50 return evlist__start_workload(evlist) == 1 ? TEST_OK : TEST_FAIL; in attach__enable_on_exec() 53 static int detach__enable_on_exec(struct evlist *evlist) in detach__enable_on_exec() argument 55 waitpid(evlist->workload.pid, NULL, 0); in detach__enable_on_exec() 59 static int attach__current_disabled(struct evlist *evlist) in attach__current_disabled() argument 61 struct evsel *evsel = evlist__last(evlist); in attach__current_disabled() [all …]
|
D | parse-events.c | 49 static int test__checkevent_tracepoint(struct evlist *evlist) in test__checkevent_tracepoint() argument 51 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint() 53 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_tracepoint() 54 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->core.nr_groups); in test__checkevent_tracepoint() 62 static int test__checkevent_tracepoint_multi(struct evlist *evlist) in test__checkevent_tracepoint_multi() argument 66 TEST_ASSERT_VAL("wrong number of entries", evlist->core.nr_entries > 1); in test__checkevent_tracepoint_multi() 67 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->core.nr_groups); in test__checkevent_tracepoint_multi() 69 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi() 80 static int test__checkevent_raw(struct evlist *evlist) in test__checkevent_raw() argument 82 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw() [all …]
|
D | keep-tracking.c | 33 static int find_comm(struct evlist *evlist, const char *comm) in find_comm() argument 40 for (i = 0; i < evlist->core.nr_mmaps; i++) { in find_comm() 41 md = &evlist->mmap[i]; in find_comm() 76 struct evlist *evlist = NULL; in test__keep_tracking() local 87 evlist = evlist__new(); in test__keep_tracking() 88 CHECK_NOT_NULL__(evlist); in test__keep_tracking() 90 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__keep_tracking() 92 CHECK__(parse_event(evlist, "dummy:u")); in test__keep_tracking() 93 CHECK__(parse_event(evlist, "cycles:u")); in test__keep_tracking() 95 evlist__config(evlist, &opts, NULL); in test__keep_tracking() [all …]
|
D | backward-ring-buffer.c | 32 static int count_samples(struct evlist *evlist, int *sample_count, in count_samples() argument 37 for (i = 0; i < evlist->core.nr_mmaps; i++) { in count_samples() 38 struct mmap *map = &evlist->overwrite_mmap[i]; in count_samples() 62 static int do_test(struct evlist *evlist, int mmap_pages, in do_test() argument 68 err = evlist__mmap(evlist, mmap_pages); in do_test() 75 evlist__enable(evlist); in do_test() 77 evlist__disable(evlist); in do_test() 79 err = count_samples(evlist, sample_count, comm_count); in do_test() 80 evlist__munmap(evlist); in do_test() 89 struct evlist *evlist; in test__backward_ring_buffer() local [all …]
|
D | switch-tracking.c | 124 static int process_sample_event(struct evlist *evlist, in process_sample_event() argument 133 if (evlist__parse_sample(evlist, event, &sample)) { in process_sample_event() 138 evsel = evlist__id2evsel(evlist, sample.id); in process_sample_event() 174 static int process_event(struct evlist *evlist, union perf_event *event, in process_event() argument 178 return process_sample_event(evlist, event, switch_tracking); in process_event() 214 static int add_event(struct evlist *evlist, struct list_head *events, in add_event() argument 228 if (evlist__parse_sample(evlist, event, &sample)) { in add_event() 263 static int process_events(struct evlist *evlist, in process_events() argument 273 for (i = 0; i < evlist->core.nr_mmaps; i++) { in process_events() 274 md = &evlist->mmap[i]; in process_events() [all …]
|
D | pfm.c | 15 static int count_pfm_events(struct perf_evlist *evlist) in count_pfm_events() argument 20 perf_evlist__for_each_entry(evlist, evsel) { in count_pfm_events() 29 struct evlist *evlist; in test__pfm_events() local 67 evlist = evlist__new(); in test__pfm_events() 68 if (evlist == NULL) in test__pfm_events() 71 opt.value = evlist; in test__pfm_events() 76 count_pfm_events(&evlist->core), in test__pfm_events() 79 evlist->core.nr_groups, in test__pfm_events() 82 evlist__delete(evlist); in test__pfm_events() 90 struct evlist *evlist; in test__pfm_group() local [all …]
|
D | perf-record.c | 54 struct evlist *evlist = evlist__new_dummy(); in test__PERF_RECORD() local 71 if (evlist == NULL) /* Fallback for kernels lacking PERF_COUNT_SW_DUMMY */ in test__PERF_RECORD() 72 evlist = evlist__new_default(); in test__PERF_RECORD() 74 if (evlist == NULL) { in test__PERF_RECORD() 85 err = evlist__create_maps(evlist, &opts.target); in test__PERF_RECORD() 97 err = evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); in test__PERF_RECORD() 106 evsel = evlist__first(evlist); in test__PERF_RECORD() 110 evlist__config(evlist, &opts, NULL); in test__PERF_RECORD() 112 err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask); in test__PERF_RECORD() 124 if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) { in test__PERF_RECORD() [all …]
|
D | perf-time-to-tsc.c | 80 struct evlist *evlist = NULL; in test__perf_time_to_tsc() local 98 evlist = evlist__new(); in test__perf_time_to_tsc() 99 CHECK_NOT_NULL__(evlist); in test__perf_time_to_tsc() 101 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__perf_time_to_tsc() 103 CHECK__(parse_event(evlist, "cycles:u")); in test__perf_time_to_tsc() 105 evlist__config(evlist, &opts, NULL); in test__perf_time_to_tsc() 108 evlist__for_each_entry(evlist, evsel) { in test__perf_time_to_tsc() 114 ret = evlist__open(evlist); in test__perf_time_to_tsc() 123 CHECK__(evlist__mmap(evlist, UINT_MAX)); in test__perf_time_to_tsc() 125 pc = evlist->mmap[0].core.base; in test__perf_time_to_tsc() [all …]
|
D | parse-metric.c | 33 static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist, in load_runtime_stat() argument 40 evlist__for_each_entry(evlist, evsel) { in load_runtime_stat() 48 static double compute_single(struct rblist *metric_events, struct evlist *evlist, in compute_single() argument 55 evlist__for_each_entry(evlist, evsel) { in compute_single() 78 struct evlist *evlist; in __compute_metric() local 85 evlist = evlist__new(); in __compute_metric() 86 if (!evlist) in __compute_metric() 91 evlist__delete(evlist); in __compute_metric() 95 perf_evlist__set_maps(&evlist->core, cpus, NULL); in __compute_metric() 100 err = metricgroup__parse_groups_test(evlist, pme_test, name, in __compute_metric() [all …]
|
/linux-6.1.9/tools/lib/perf/tests/ |
D | test-evlist.c | 37 struct perf_evlist *evlist; in test_stat_cpu() local 52 evlist = perf_evlist__new(); in test_stat_cpu() 53 __T("failed to create evlist", evlist); in test_stat_cpu() 58 perf_evlist__add(evlist, evsel); in test_stat_cpu() 63 perf_evlist__add(evlist, evsel); in test_stat_cpu() 65 perf_evlist__set_leader(evlist); in test_stat_cpu() 69 perf_evlist__set_maps(evlist, cpus, NULL); in test_stat_cpu() 71 err = perf_evlist__open(evlist); in test_stat_cpu() 74 perf_evlist__for_each_evsel(evlist, evsel) { in test_stat_cpu() 85 perf_evlist__close(evlist); in test_stat_cpu() [all …]
|
/linux-6.1.9/tools/lib/perf/include/perf/ |
D | evlist.h | 13 LIBPERF_API void perf_evlist__add(struct perf_evlist *evlist, 15 LIBPERF_API void perf_evlist__remove(struct perf_evlist *evlist, 18 LIBPERF_API void perf_evlist__delete(struct perf_evlist *evlist); 19 LIBPERF_API struct perf_evsel* perf_evlist__next(struct perf_evlist *evlist, 21 LIBPERF_API int perf_evlist__open(struct perf_evlist *evlist); 22 LIBPERF_API void perf_evlist__close(struct perf_evlist *evlist); 23 LIBPERF_API void perf_evlist__enable(struct perf_evlist *evlist); 24 LIBPERF_API void perf_evlist__disable(struct perf_evlist *evlist); 26 #define perf_evlist__for_each_evsel(evlist, pos) \ argument 27 for ((pos) = perf_evlist__next((evlist), NULL); \ [all …]
|
/linux-6.1.9/tools/perf/bench/ |
D | evlist-open-close.c | 68 static int evlist__count_evsel_fds(struct evlist *evlist) in evlist__count_evsel_fds() argument 73 evlist__for_each_entry(evlist, evsel) in evlist__count_evsel_fds() 79 static struct evlist *bench__create_evlist(char *evstr) in bench__create_evlist() 82 struct evlist *evlist = evlist__new(); in bench__create_evlist() local 85 if (!evlist) { in bench__create_evlist() 91 ret = parse_events(evlist, evstr, &err); in bench__create_evlist() 100 ret = evlist__create_maps(evlist, &opts.target); in bench__create_evlist() 106 evlist__config(evlist, &opts, NULL); in bench__create_evlist() 108 return evlist; in bench__create_evlist() 111 evlist__delete(evlist); in bench__create_evlist() [all …]
|
/linux-6.1.9/tools/lib/perf/include/internal/ |
D | evlist.h | 55 int perf_evlist__alloc_pollfd(struct perf_evlist *evlist); 56 int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd, 59 int perf_evlist__mmap_ops(struct perf_evlist *evlist, 63 void perf_evlist__init(struct perf_evlist *evlist); 64 void perf_evlist__exit(struct perf_evlist *evlist); 79 #define perf_evlist__for_each_entry(evlist, evsel) \ argument 80 __perf_evlist__for_each_entry(&(evlist)->entries, evsel) 95 #define perf_evlist__for_each_entry_reverse(evlist, evsel) \ argument 96 __perf_evlist__for_each_entry_reverse(&(evlist)->entries, evsel) 113 #define perf_evlist__for_each_entry_safe(evlist, tmp, evsel) \ argument [all …]
|
/linux-6.1.9/tools/lib/perf/Documentation/examples/ |
D | counting.c | 21 struct perf_evlist *evlist; in main() local 46 evlist = perf_evlist__new(); in main() 47 if (!evlist) { in main() 56 perf_evlist__add(evlist, evsel); in main() 62 perf_evlist__add(evlist, evsel); in main() 63 perf_evlist__set_maps(evlist, NULL, threads); in main() 64 err = perf_evlist__open(evlist); in main() 69 perf_evlist__enable(evlist); in main() 71 perf_evlist__disable(evlist); in main() 72 perf_evlist__for_each_evsel(evlist, evsel) { in main() [all …]
|